Implement non-booting support for the DragonFly 64 bit disklabel:
* Add full kernel support. Both 32 and 64 bit labels will be probed.
* Add a new program, disklabel64, which allows you to create and edit
the new disklabel.
* Add some logic to prevent foot shooting.
DragonFly's 64 bit disklabels start at byte offset 0 on the disk slice
or GPT partition and operate in a slice-relative fashion. No translation
is required when going from on-disk to in-core or vise-versa, unlike the
existing 32 bit disklabels. 512 bytes at the beginning of the label are
reserved for legacy boot code. Specifically, the label starts at sector 0,
NOT sector 1, which means its location on the disk is the same regardless
of the sector size.
The label has a UUID to uniquely identify the storage and a type and
object uuid for each partition. All location specifications are 64 bit
byte offsets, NOT logical blocks. The label enforces an alignment
requirement for label-related I/O and partitions which defaults to 4K
regardless of the sector size. This makes the label 100% portable across
media with different sector sizes within the constraints of the alignment
requirement.
All partitions are specified using byte offsets and sizes, constrained
by the alignment requirement, relative to the base of the label (i.e.
offset 0 in the slice). disklabel64 will adjust the offsets for display
purposes to be relative to the partition table area. The label headers,
partition table, and boot2 areas come BEFORE the partition table area and
partitions which overlap any of those objects are not allowed.
By default, a virgin 64 bit disklabel will reserve 32K for boot2. As of
this writing, boot1 and boot2 blocks have not yet been implemented.
13 files changed: