NetBSD/OpenBSD Disklabels

Loren M. Lang lorenl at alzatex.com
Thu Jun 16 00:04:52 GMT 2005


I have been working on patching geom_bsd to be able to read netbsd and
openbsd disklabels that I have on my quad boot system.  I currently have
it working, but I have a couple of questions about the proper way to do
this.  The two major changes I had to make to geom_bsd were to increase
the number of partitions from 8 to 16.  I did this by defining
MAXPARTITIONS before any of the header files were included.  The second
change was to fix the offset calculations of the partitions.  Since the
c and d partitions are done a little differently, I couldn't rely on
there offsets to detect the offset of the disklabels.  I decided to use
the a partition instead since that's starts at the beginning of the
slice 99% of the time.  The most correct answer might be to ask the MBR
label what it's offset is if there is an MBR label underneath.  The
logic in geom_bsd seems to be that all offsets are relative to disk
where the c partitions offset starts at the disklabel unless any
partition starts before c, then offsets are assumed relative to the
disklabel.

The patch I am using is:
http://www.tallye.com/~sttng359/unix/netbsd-dl.patch

-- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: CEE1 AAE2 F66C 59B5 34CA  C415 6D35 E847 0118 A3D2
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20050615/e84594eb/attachment.bin


More information about the freebsd-geom mailing list