Subject: fdisk from scripts
To: None <current-users@netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: current-users
Date: 06/16/2001 17:20:55
The fdisk man page mentions a 'fdisk -b cyl/heads/sects' for writing
the bios geometry in the MBR.  (I hope I've got this weird dos
terminology right.)

As far as I can tell 'fdisk -f -b 1023/15/63 wd0' does nothing.
Running a subsequent 'fdisk wd0' give me the same BIOS geometry.

    NetBSD disklabel disk geometry:
    cylinders: 13424 heads: 15 sectors/track: 63 (945 sectors/cylinder)

    BIOS disk geometry:
    cylinders: 527 heads: 255 sectors/track: 63 (16065 sectors/cylinder)

    Partition table:
    0: <UNUSED>
    1: <UNUSED>
    2: <UNUSED>
    3: <UNUSED>

Am I reading the man page wrong or is fdisk broke? 

I'd really like the align the number of heads in the bios and netbsd
geometries so that I can set the netbsd partition to start on cylinder
1 from both netbsd's and the bios's standpoint.  Some of my computers
won't boot from a partition that isn't on a bios cylinder boundary.
I'd like to write a universal "build this disk" script that clears
everything and rebuilds from scratch.

-wolfgang
-- 
       Wolfgang Rupprecht <wolfgang+gnus@dailyplanet.wsrcc.com>
		    http://www.wsrcc.com/wolfgang/
Coming soon: GPS mapping tools for Open Systems. http://www.gnomad-mapping.com/