Subject: fdisk fun
To: None <port-i386@netbsd.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: port-i386
Date: 01/23/2007 15:18:33
I am trying to replace a dying SCSI disk, but can't get the new one to boot
because I can't create an MBR partition which starts at 0. Try as I might,
fdisk insists on starting at 63. How can I teach it otherwise?
NetBSD-4.99.6/i386 of 14 Dec
Bootable old disk:
# fdisk -vvv sd0
Disk: /dev/rsd0d
NetBSD disklabel disk geometry:
cylinders: 11474, heads: 10, sectors/track: 312 (3120 sectors/cylinder)
total sectors: 35843670
BIOS disk geometry:
cylinders: 1023, heads: 1, sectors/track: 16 (16 sectors/cylinder)
total sectors: 35843670
Partition table:
0: <UNUSED> (sysid 0)
start 0, size 0
beg: cylinder 0, head 0, sector 0
end: cylinder 0, head 0, sector 0
1: <UNUSED> (sysid 0)
start 0, size 0
beg: cylinder 0, head 0, sector 0
end: cylinder 0, head 0, sector 0
2: <UNUSED> (sysid 0)
start 0, size 0
beg: cylinder 0, head 0, sector 0
end: cylinder 0, head 0, sector 0
3: NetBSD (sysid 169)
start 0, size 16 (0 MB, Cyls 0-0), Active
beg: cylinder 0, head 0, sector 1
end: cylinder 0, head 0, sector 16
Non-bootable new disk:
# fdisk -vvv sd2
Disk: /dev/rsd2d
NetBSD disklabel disk geometry:
cylinders: 18496, heads: 8, sectors/track: 480 (3840 sectors/cylinder)
total sectors: 71132959
BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 71132959
Partition table:
0: <UNUSED> (sysid 0)
start 0, size 0
beg: cylinder 0, head 0, sector 0
end: cylinder 0, head 0, sector 0
1: <UNUSED> (sysid 0)
start 0, size 0
beg: cylinder 0, head 0, sector 0
end: cylinder 0, head 0, sector 0
2: <UNUSED> (sysid 0)
start 0, size 0
beg: cylinder 0, head 0, sector 0
end: cylinder 0, head 0, sector 0
3: NetBSD (sysid 169)
start 63, size 71132896 (34733 MB, Cyls 0/1/1-4427/209/37), Active
beg: cylinder 0, head 1, sector 1
end: cylinder 1023, head 209, sector 37
Bootselector disabled.
So yes, the BIOS is happy not to skip the first track... The old disk has
3 Aug 2000 bootblocks on it, so presumably fdisk changed in the meantime?
Cheers,
Patrick
# disklabel -rt sd0
ibm18|Automatically generated label:\
:dt=SCSI:se#512:ns#312:nt#10:sc#3120:nc#11474:\
:su#35843670:\
:pa#2081040:oa#0:ta=4.2BSD:ba#8192:fa#1024:\
:pb#8324160:ob#2081040:tb=4.2BSD:bb#8192:fb#1024:\
:pc#35798880:oc#0:\
:pd#35843670:od#0:\
:pe#418080:oe#10405200:te=4.2BSD:be#8192:fe#1024:\
:pf#4162080:of#10823280:tf=4.2BSD:bf#8192:ff#1024:\
:pg#12489360:og#14985360:tg=4.2BSD:bg#8192:fg#1024:\
:ph#8324160:oh#27474720:th=4.2BSD:bh#8192:fh#1024:
# disklabel -rt sd2
ST36G|Automatically generated label:\
:dt=SCSI:se#512:ns#480:nt#8:sc#3840:nc#18496:\
:su#71132959:rm#14996:\
:pa#2100480:oa#0:ta=4.2BSD:ba#0:fa#0:\
:pc#71132959:oc#0:\
:pd#71132959:od#0:\
:pe#12583680:oe#2100480:te=4.2BSD:be#0:fe#0:\
:pf#20974080:of#14684160:tf=4.2BSD:bf#0:ff#0:\
:pg#12583680:og#35658240:tg=4.2BSD:bg#0:fg#0:\
:ph#22891039:oh#48241920:th=4.2BSD:bh#0:fh#0: