freebsd-dev/sys/geom
John Baldwin f352a0d45f First cut at support for booting a GPT labeled disk via the BIOS bootstrap
on i386 and amd64 machines.  The overall process is that /boot/pmbr lives
in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for
locating and loading /boot/gptboot.  /boot/gptboot is similar to /boot/boot
except that it groks GPT rather than MBR + bsdlabel.  Unlike /boot/boot,
/boot/gptboot lives in its own dedicated GPT partition with a new
"FreeBSD boot" type.  This partition does not have a fixed size in that
/boot/pmbr will load the entire partition into the lower 640k.  However,
it is limited in that it can only be 545k.  That's still a lot better than
the current 7.5k limit for boot2 on MBR.  gptboot mostly acts just like
boot2 in that it reads /boot.config and loads up /boot/loader.  Some more
details:
- Include uuid_equal() and uuid_is_nil() in libstand.
- Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using
  /boot/pmbr and /boot/gptboot.  Note that the disk must have some free
  space for the boot partition.
  - This required exposing the backend of the 'add' function as a
    gpt_add_part() function to the rest of gpt(8).  'boot' uses this to
    create a boot partition if needed.
- Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that
  it can handle a filesystem > 1.5 TB.
- /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O
  unlike boot1 since /boot/pmbr loads all of gptboot up front.  The
  C portion of gptboot (gptboot.c) has been repocopied from boot2.c.
  The primary changes are to parse the GPT to find a root filesystem
  and to use 64-bit disk addresses.  Currently gptboot assumes that the
  first UFS partition on the disk is the / filesystem, but this algorithm
  will likely be improved in the future.
- Teach the biosdisk driver in /boot/loader to understand GPT tables.
  GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is
  similar to the /dev names the kernel uses (e.g. /dev/ad0p2).
- Add a new "freebsd-boot" alias to g_part() for the new boot UUID.

MFC after:	1 month
Discussed with:	marcel (some things might still change, but am committing
			what I have so far)
2007-10-24 21:33:00 +00:00
..
bde Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
cache Despite several examples in the kernel, the third argument of 2007-06-04 18:25:08 +00:00
concat Implement BIO_FLUSH handling by simply passing it down to the components. 2006-10-31 21:23:51 +00:00
eli Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
gate Bump copyright year. 2006-09-08 10:20:44 +00:00
journal Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
label Remove trailing spaces. 2006-09-30 08:16:49 +00:00
mirror Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
multipath Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
nop Remove trailing spaces. 2006-09-30 08:16:49 +00:00
part First cut at support for booting a GPT labeled disk via the BIOS bootstrap 2007-10-24 21:33:00 +00:00
raid3 Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
shsec Add BIO_FLUSH support to GSHSEC class. 2006-11-01 12:30:51 +00:00
stripe Despite several examples in the kernel, the third argument of 2007-06-04 18:25:08 +00:00
uzip If compressed length is zero, return a zero-filled block. 2007-04-24 06:30:06 +00:00
vinum Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
virstor LINT compiled just fine for me, but it seems it breaks tinerbox way of 2007-09-23 15:10:48 +00:00
zero Remove trailing spaces. 2006-02-01 12:06:01 +00:00
geom_aes.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_bsd_enc.c
geom_bsd.c Remove the trailing half of a sentence which was clearly superceded 2006-05-24 11:02:32 +00:00
geom_ccd.c Make CCD be able to read and write Linux software raids. 2006-04-13 20:35:31 +00:00
geom_ctl.c - Be more verbose when saying "foo" not found. 2007-03-30 16:32:08 +00:00
geom_ctl.h
geom_dev.c Implement three new ioctls that can be used with GEOM provider: 2007-05-05 17:02:19 +00:00
geom_disk.c Allow to use ':' in d_ident, which is quite handy character. 2007-05-05 18:09:17 +00:00
geom_disk.h - Extend disk structure to allow to store disk's serial number, which can be 2007-05-05 17:12:15 +00:00
geom_dump.c Make the kern.geom.conftxt sysctl more usable by also dumping the 2005-11-12 20:02:02 +00:00
geom_event.c When orphaning a provider, cancel events related to it. 2007-09-27 20:18:34 +00:00
geom_fox.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_int.h
geom_io.c Implement g_delete_data() similar to g_read_data() and g_write_data(). 2007-05-05 16:35:22 +00:00
geom_kern.c Commit 14/14 of sched_lock decomposition. 2007-06-05 00:00:57 +00:00
geom_mbr_enc.c
geom_mbr.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_pc98_enc.c Fix signed vs unsigned warning. 2005-05-01 09:44:50 +00:00
geom_pc98.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_slice.c Handle GEOM::ident attribute by attaching 'sX' string at the end of ident 2007-05-05 17:52:22 +00:00
geom_slice.h Allow to use g_slice_orphan() from outside. 2006-02-18 11:21:17 +00:00
geom_subr.c - Implement helper g_handleattr_str() function for string attributes 2007-05-05 16:33:44 +00:00
geom_sunlabel_enc.c Support VTOC volume names. This can be useful to distinguish multiple 2005-03-30 09:33:10 +00:00
geom_sunlabel.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_vfs.c Cylinder group bitmaps and blocks containing inode for a snapshot 2007-01-23 10:01:19 +00:00
geom_vfs.h
geom_vol_ffs.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom.h Implement g_delete_data() similar to g_read_data() and g_write_data(). 2007-05-05 16:35:22 +00:00
notes