DragonFly commits List (threaded) for 2008-07
DragonFly BSD
DragonFly commits List (threaded) for 2008-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sbin/gpt Makefile boot.c gpt.c gpt.h


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Jul 2008 17:45:26 -0700 (PDT)

dillon      2008/07/29 17:45:26 PDT

DragonFly src repository

  Modified files:
    sbin/gpt             Makefile gpt.c gpt.h 
  Added files:
    sbin/gpt             boot.c 
  Log:
  Add a terrible hack to GPT which allows non-EFI BIOSes to boot from it.
  With a freshly made gpt on a disk you can run 'gpt boot da0' (specifying
  the correct whole-disk name) and GPT will do the following:
  
  * It will create a 100MB partition #0 in the GPT
  
  * It will fake up a slice 1 in the PMBR for the BIOS and the loader that
    aliases partition #0 in the GPT.
  
  The BIOS and loader will see a bootable slice 1 while the kernel, once
  booted, will see a GPT.  This can cause confusion because the kernel
  will NOT see the fake slice 1 any more, and the partition number in the
  GPT of the boot partition 0 (aka da0s0).
  
  The boot partition (da0s0 from the point of view of the kernel) needs
  to have a 32 bit disklabel and a UFS filesystem in da0s0a which contains
  the kernel image and boot sub-directory.  In the boot sub-directory the
  loader.conf file must contain a line that points to the root mount, which
  say you may have created with gpt add as partition #1.
  
  Older kernels may require the root mount to also be in a disklabel, so you
  might have to put a 32 or 64 bit disklabel in partition #1 as well.
  This requirement will be removed soon relative to this commit (since the
  idea with GPT is to not have to use disklabels).
  
      vfs.root.mountfrom="ufs:ad0s1a"
      vfs.root.mountfrom="ufs:ad0s1"
  
  Revision  Changes    Path
  1.2       +1 -1      src/sbin/gpt/Makefile
  1.5       +2 -1      src/sbin/gpt/gpt.c
  1.2       +1 -0      src/sbin/gpt/gpt.h


http://www.dragonflybsd.org/cvsweb/src/sbin/gpt/Makefile.diff?r1=1.1&r2=1.2&f=u
http://www.dragonflybsd.org/cvsweb/src/sbin/gpt/gpt.c.diff?r1=1.4&r2=1.5&f=u
http://www.dragonflybsd.org/cvsweb/src/sbin/gpt/gpt.h.diff?r1=1.1&r2=1.2&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]