GEOM and NetBSD compatibility question

Barry Bouwsma freebsd-misuser at remove-NOSPAM-to-reply.NOSPAM.dyndns.dk
Sat Aug 14 15:23:49 PDT 2004


[keep replies to the list and I'll catch up later, thanks]

Servus,

I had looked at this a couple years ago, without really finding
a solution, and now I'm experiencing this again when trying to
use my NetBSD partition under FreeBSD-CURRENT and GEOM.

I've applied a hack (first proposed a couple years back) which
allows GEOM to recognize the NetBSD ID.  However, GEOM is getting
confused by the NetBSD disklabel.

GEOM displays the FreeBSD disklabels as relative offsets to the
absolute offset of the DOS partition.  However, it displays the
NetBSD disklabel offsets as absolute offsets, yet it treats them
as relative offsets, and that just don't want to work right.

It's a property of the NetBSD disklabel that the `d' partition
covers the whole disk.  Additionally, I use the additional
available partitions to map parts of the disk outside of the
NetBSD DOS partition (the other FreeBSD partitions) so that I
can access them from NetBSD, which otherwise can't access any
part of the disk outside its DOS partition.

Can this be what is causing GEOM to get confused, or is GEOM
erroneously assuming that the BSD disklabels it has will always
be a relative offset, even if they were created with absolute
offsets?


Here's what GEOM has to say about the NetBSD partition of my
disk:


GEOM: Configure da0s1, start 32256 length 51539572224 end 51539604479
GEOM: Configure da0s2, start 51539604480 length 6440394240 end 57979998719
GEOM: Configure da0s3, start 57979998720 length 11803276800 end 69783275519
GEOM: Configure da0s4, start 69783275520 length 181215934464 end 250999209983
 [ snip a bunch of da0[imo]? that I can't figure out ]
GEOM: Configure da0s1a, start 0 length 134217728 end 134217727
GEOM: Configure da0s1c, start 0 length 51539572224 end 51539572223
GEOM: Configure da0s1e, start 134217728 length 32212254720 end 32346472447
GEOM: Configure da0s1f, start 32346472448 length 1073741824 end 33420214271
GEOM: Configure da0s1g, start 33420214272 length 5368709120 end 38788923391
GEOM: Configure da0s1h, start 38788923392 length 12750648832 end 51539572223

[ okay, here's the weird stuff ]

GEOM: Configure da0s2a, start 51539604480 length 268435456 end 51808039935
GEOM: Configure da0s2b, start 51808039936 length 536870912 end 52344910847
GEOM: Configure da0s2c, start 51539604480 length 6440394240 end 57979998719
GEOM: Configure da0s2d, start 0 length 250999209984 end 250999209983
GEOM: Configure da0s2e, start 52344910848 length 5100273664 end 57445184511
GEOM: Configure da0s2f, start 57445184512 length 534814208 end 57979998719
GEOM: Configure da0s2g, start 80520693760 length 5368709120 end 85889402879
GEOM: Configure da0s2h, start 85889402880 length 10737418240 end 96626821119
GEOM: Configure da0s2i, start 32256 length 134217728 end 134249983
GEOM: Configure da0s2j, start 33420246528 length 5368709120 end 38788955647
GEOM: Configure da0s2k, start 32346504704 length 1073741824 end 33420246527
GEOM: Configure da0s2l, start 38788955648 length 12750648832 end 51539604479
GEOM: Configure da0s2m, start 69783275520 length 10737418240 end 80520693759
GEOM: Configure da0s2n, start 134249984 length 32212254720 end 32346504703
GEOM: Configure da0s2o, start 57979998720 length 268435456 end 58248434175
GEOM: Configure da0s2p, start 96626821120 length 154372388864 end 250999209983

GEOM: Configure da0s3a, start 0 length 268435456 end 268435455
GEOM: Configure da0s3c, start 0 length 11803276800 end 11803276799
GEOM: Configure da0s3e, start 268435456 length 10737418240 end 11005853695
GEOM: Configure da0s3f, start 11005853696 length 797423104 end 11803276799
GEOM: Configure da0s4c, start 0 length 181215934464 end 181215934463
GEOM: Configure da0s4e, start 0 length 10737418240 end 10737418239
GEOM: Configure da0s4f, start 10737418240 length 5368709120 end 16106127359
GEOM: Configure da0s4g, start 16106127360 length 10737418240 end 26843545599
GEOM: Configure da0s4h, start 26843545600 length 154372388864 end 181215934463


Of course, I can't mount any of da0s2? as a filesystem.
da0s2 works fine for what would be da0s2a.  Years ago when
I tried this, the NetBSD swap partition turned out to be
translated by GEOM into the NetBSD /usr and as a result,
I've been wary of -current until now.

I had tried a while back to hack in an absolute/relative
offset toggle, but never was able to make all of GEOM
make use of it.  Meaning nothing, as I'm no programmer
nor hacker and have no idea what I'm doing.


thanks
barry bouwsma



More information about the freebsd-geom mailing list