kern/141235: 8.0 no longer provides /dev entries for all disk slices [regression]

Garrett Cooper yanefbsd at gmail.com
Fri May 28 17:18:52 UTC 2010


On Fri, May 28, 2010 at 10:07 AM, Garrett Cooper <yanefbsd at gmail.com> wrote:
> On Fri, May 28, 2010 at 8:53 AM,  <dieterbsd at engineer.com> wrote:
>>> You should remove GEOM_PART_* entries. I think that the duplicates you
>>> saw are because you had geom_part still enabled.
>>
>> I thought about that.  Having both GEOM_PART_MBR and GEOM_MBR
>> seemed suspicious, but GEOM_PART_MBR isn't from the config file:
>>
>> grep -i geom GENERIC
>> options         GEOM_PART_GPT           # GUID Partition Tables.
>> options         GEOM_LABEL              # Provides labelization
>>
>> and then I added GEOM_MBR and GEOM_BSD as suggested.  So I don't
>> know where GEOM_PART_MBR comes from or how to get rid of it.
>> I am assuming that "make buildkernel" calls config(8) and config
>> builds opt_geom.h based on the config file, but it must have some
>> other input that I haven't found.
>>
>> It isn't clear to me what the difference between GEOM_PART_MBR and
>> GEOM_MBR is supposed to be (same for GEOM_PART_BSD and GEOM_BSD).
>> conf/NOTES doesn't list a GEOM_GPT, only GEOM_PART_GPT.  I assume
>> that removing GEOM_PART_GPT would break disks using GUID partition
>> tables.
>
> GEOM_MBR is the legacy way to specify GEOM_PART_MBR IIRC (from .../UPDATING):
>
> 20090320:
>        GEOM_PART has become the default partition slicer for storage devices,
>        replacing GEOM_MBR, GEOM_BSD, GEOM_PC98 and GEOM_GPT slicers. It
>        introduces some changes:
>
>        MSDOS/EBR: the devices created from MSDOS extended partition entries
>        (EBR) can be named differently than with GEOM_MBR and are now symlinks
>        to devices with offset-based names. fstabs may need to be modified.
>
>        BSD: the "geometry does not match label" warning is harmless in most
>        cases but it points to problems in file system misalignment with
>        disk geometry. The "c" partition is now implicit, covers the whole
>        top-level drive and cannot be (mis)used by users.
>
>        General: Kernel dumps are now not allowed to be written to devices
>        whose partition types indicate they are meant to be used for file
>        systems (or, in case of MSDOS partitions, as something else than
>        the "386BSD" type).
>
>        Most of these changes date approximately from 200812.

I did a bit more digging and what I discovered wasn't entirely true in
my first statement; yes, GEOM_MBR is the legacy system from first
glance compared to GEOM_PART_MBR, but that doesn't tell the entire
story. The two items (GEOM_PART_MBR and GEOM_MBR) also grossly differ
with one another.

I'm going to take a look at the code in the meantime and try to better
digest what's going on (because it would help with work), but just for
future reference the files that get used [up through 9-CURRENT] are
located at:

/sys/geom/geom_mbr.c
/sys/geom/part/g_part_mbr.c

You can of course determine this info from /sys/conf/files.
HTH,
-Garrett


More information about the freebsd-bugs mailing list