Subject: Re: how to add a partition beyond BIOS cylinder 1024
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 06/16/2003 08:01:56
> 
> david@l8s.co.uk (David Laight) writes:
> 
> > > fdisk won't let me add the dos partition: when I specify where the dos
> > > partition should be, fdisk thinks that these locations are off the
> > > disk, and resets the values so that they live inside the 1024
> > > cynlinder boundary.
> > > 
> > > I guess that since the partition I want to add is past the first 1024
> > > cylinders, no go.
> > 
> > That really shouldn't be a problem.
> > Which version of fdisk are you running? (objdump -j .ident -s /sbin/fdisk)
> 
> It appears to be fdisk.c 1.55

Ok, there is a medium sized rototil of fdisk between there and 1.65.
(In particular checks for overlapping partitions and support for editing
the extended partition.)  This clearly isn't responsible for your problems :-)

> > What does sysctl machdep.diskinfo report?
> 
> I get no output from "sysctl machdep.diskinfo"

Ok an old copy of sysctl.

> > What is the output of 'fdisk wd0'?
> 
> mingus:/root [10] # fdisk wd0
> Disk: /dev/rwd0d
> NetBSD disklabel disk geometry:
> cylinders: 16383 heads: 16 sectors/track: 63 (1008 sectors/cylinder)
> 
> BIOS disk geometry:
> cylinders: 1023 heads: 240 sectors/track: 63 (15120 sectors/cylinder)
> 
> Partition table:
> 0: sysid 7 (OS/2 HPFS or NTFS or QNX2 or Advanced UNIX)
>     start 63, size 8179857 (3994 MB), flag 0x0
>         beg: cylinder    0, head   1, sector  1
>         end: cylinder  540, head 239, sector 63
> 1: sysid 169 (NetBSD)
>     start 8179920, size 20480544 (10000 MB), flag 0x80
>         beg: cylinder  541, head   0, sector  1
>         end: cylinder 1022, head 239, sector 63
> 2: <UNUSED>
> 3: <UNUSED>

That looks fine.
Note that the 'end:' line of the NetBSD partition reports CHS values that
are at the end of the area addressable using CHS and the bios geometry.
This is absolutely fine, and completely normal.
Those fields in the disklabel only have 10 bits for the cylinder, 8 bits
for the head and 6 for the sector.

	David

-- 
David Laight: david@l8s.co.uk