Re: How to confuse geom_part_mbr

From: Marcel Moolenaar <xcllnt_at_mac.com>
Date: Wed, 11 Nov 2009 17:58:20 -0800
On Nov 11, 2009, at 5:43 PM, Dag-Erling Smørgrav wrote:

> Marcel Moolenaar <xcllnt_at_mac.com> writes:
>> Dag-Erling Smørgrav <des_at_des.no> writes:
>>> The machine won't boot, even though you have a valid partition table
>>> on ad0 that points to a valid bsdlabel in ad0s1.
>> No, you don't have a valid partition table on ad0, because
>> you didn't remove the BSD disklabel in sector 2 on ad0.
> 
> Yes, I do have a valid partition table.  It is exactly byte-by-byte
> identical to the one I get after I zero sector two and re-run fdisk.
> The fact that there is unwanted data in sector 2 does *not* make it any
> less valid.

Of course it does. It's the same as GPT. There's a MBR in
front of it and if you don't know about GPT tables, you'll
see the MBR, otherwise you'll use the GPT.

The difference is that the MBR in front of a BSD disklabel
is not supposed to have partitions. But you may not be
able to distinguish boot code from a valid partition entry.

> 
> What's more, this could have easily been avoided if geom_whatever gave
> the partition table precedence over the label it found in sector 2.

That break standard BSD disklabels, because they would be
probed as MBRs.

-- 
Marcel Moolenaar
xcllnt_at_mac.com
Received on Thu Nov 12 2009 - 00:58:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC