Subject: bin/13234: fdisk can't change bios geometry
To: None <gnats-bugs@gnats.netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: netbsd-bugs
Date: 06/17/2001 18:10:49
>Number:         13234
>Category:       bin
>Synopsis:       fdisk can't change bios geometry
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 17 18:10:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Rupprecht
>Release:        NetBSD-current May 30, 2001
>Organization:
W S Rupprecht Computer Consulting, Fremont CA
>Environment:
	
System: NetBSD pasillo.wsrcc.com 1.5W NetBSD 1.5W (WSRCC_INTEL) #18: Wed Jun 13 05:47:36 PDT 2001 wolfgang@capsicum.wsrcc.com:/v/src/netbsd/src/sys/arch/i386/compile/WSRCC_INTEL i386
Architecture: i386
Machine: i386
>Description:

	fdisk when invoked from a script using the following line will
	not write the bios/mbr geometry.  It appears to do nothing, 
	leaving the default geometry.

	    fdisk -f -i -b ${DLCYL}/${DLHEAD}/${DLSEC} ${disk}

>How-To-Repeat:

    #!/bin/sh
    partition_id=169 
    disk=wd0
    dd if=/dev/zero of=/dev/r${disk}d bs=64k count=10
    fdisk -f -i ${disk}
    eval `fdisk -S $disk`
    echo "Writing the sector-0 partition table"
    fdisk -f -i -b ${DLCYL}/${DLHEAD}/${DLSEC} ${disk}
    echo "Configuring partition-4 of sector-0 partition table"
    fdisk -3 -afu -s ${partition_id}/0/${DLSIZE} ${disk}
    fdisk ${disk}
    # end

 	Thanks to Rex McMaster for sending a script known to work under
	netbsd 1.5 .  Whatever broke, seems to have broken recently.

>Fix:

	Find a windoze box, fdisk there.  (Ok thats a joke!)
>Release-Note:
>Audit-Trail:
>Unformatted: