gpart oddity

Marcel Moolenaar xcllnt at mac.com
Wed Oct 22 21:03:29 UTC 2008


On Oct 22, 2008, at 1:46 PM, Andriy Gapon wrote:

> Being impatient I actually glimpsed through the code and gathered  
> some more data and I think that the issue is in incorrect value of  
> d_secperunit (offset 60).

Seems to match earlier reports.

> 'cylinders' value reported for ad4s1 is the same as 'cylinders'  
> reported for the whole ad4.
> This is definitely incorrect.

Agreed.

> Then I remembered that I labeled ad4s1 purely through sysinstall and  
> never touched it with disklabel(8), on the other hand I used  
> disklabel to label ad4s2.

That's good to know; not that there's a lot we can do about all
those existing installations...

> My personal conclusions:
> 1. sysinstall seems to have handled those fields incorrectly, somehow.
> 2. those fields do not seem to be of any particular use/importance,  
> so g_part_bsd might be overly strict here.

Being strict is not a bad thing, but given that we put an
invalid label on all new installations I think it's better
gpart doesn't check it or otherwise detect and corrects it.
(we know the absolute sector offset of the label, so if
secperunit is mediasize + offset, we know the not to flag
the label as invalid, patch it up and move on).

> I'll try to boot into a new kernel now (the one without GEOM_MBR and  
> GEOM_BSD).

Could you send a quick "it works" message if this was the
problem?

Thanks,

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the freebsd-geom mailing list