Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wd1: mbr partition exceeds disk size



On Thu, Apr 14, 2011 at 07:34:42AM +0200, Michael van Elst wrote:
> On Thu, Apr 14, 2011 at 12:44:17AM +0200, Thomas Klausner wrote:
> > On Wed, Apr 13, 2011 at 08:33:38PM +0000, Michael van Elst wrote:
> > > You start with wdgetdefaultlabel that clips at 2TB, the maximum.
> > > Then you look for a NetBSD partition in the MBR and get the warning
> > > because the MBR shows more sectors than the clipped disklabel.
> > 
> > But fdisk output and disklabel output agree (see my previous email),
> > what am I missing?
> 
> You miss one sector :)
> 
> MBR:
> start 1, size 4294967295 (2097152 MB, Cyls 0-267349/89/4)
> 
> disklabel:
> total sectors: 4294967295
> 
...
> 
> That's correct, but it describes a partition size of exactly 2TB
> while the disklabel can only represent a disk size of 2TB-512.

eh?  Isn't the size of the fdisk partition still 2TB-512, but it just happens 
to start a 
sector later?
So perhaps a fix/workaround is to change the start of the MBR to be 0, not 1.

<         mbr->mbr_part[0].part_start_lo = htole16(1);
>         mbr->mbr_part[0].part_start_lo = htole16(0);

eric


Home | Main Index | Thread Index | Old Index