Subject: Re: Dicing with disks
To: Andy Ball <ball@cyberspace.org>
From: Frederick Bruckman <fredb@immanent.net>
List: port-i386
Date: 08/01/2001 13:18:48
On Wed, 1 Aug 2001, Andy Ball wrote:

> Okay, I /think/ I probably need to use fdisk because I will be booting
> from the disk.  If I'm correct, fdisk partition '0' is the whole disk
> minus the boot track.

No, it's the whole disk; disklabel "d" is the whole disk, too, and "c"
should be the whole disk minus one track.

> I'm not sure why the BIOS thinks the disk only
> has 902 cylinders, that's odd.  I'm banging my head against disklabel
> at the moment, but here's my current 'fdisk wd0' output...

It doesn't matter to the BIOS, since the boot blocks are never going
to go into that last cylinder. Are you sure NetBSD can utilize that
last cylinder? If not, it may not fail until the disk is nearly full.
You can do a trial read with

	dd if=/dev/rwd0d of=/dev/null bs=184k skip=900 count=3

or write (zeros) with

	dd if=/dev/zero of=/dev/rwd0d bs=184k skip=900 count=3

If you get an error on the last cylinder with either command, scale
back.

> ----------------------------------<fdisk wd0>-----------------------------------
> NetBSD disklabel disk geometry:
> cylinders: 903 heads: 8 sectors/track: 46 (368 sectors/cylinder)
>
> BIOS disk geometry:
> cylinders: 902 heads: 8 sectors/track: 46 (368 sectors/cylinder)
>
> Partition table:
> 0: sysid 169 (NetBSD)
>     start 46, size 332258 (162 MB), flag 0x80
>         beg: cylinder    0, head   1, sector  1
>         end: cylinder  902, head   7, sector 46
> 1: <UNUSED>
> 2: <UNUSED>
> 3: <UNUSED>
> --------------------------------------------------------------------------------
>


Frederick