Diskgeometry - sysinstall bug?
Erik Norgaard
norgaard at locolomo.org
Fri Nov 26 04:17:58 PST 2004
Hi,
I have problems making sysinstall behave, interactive or scripted. The
disk is 60GB Hitachi Travelstar, on boot the kernel FreeBSD 5.3-STABLE
identifies the geometry as: 116280/16/63, but sysinstall refuses these
values as insane, and tries to rewrite the disk geometry to 7296/255/63.
Using all disk for slice 1 sysinstall writes the disklabel, but it fails
to initialize the swap partition claming no such device /dev/ad0s1b, or
I get write errors when I try to install.
On reboot (pxe), even though the new partition table and geometry was
written, the kernel identifies the disk with the original geometry. It
appears that I should go with the geometry the kernel thinks.
How do I get my disk sliced up from here?
Thanks, Erik
I have found the following code in disks.c which seems to be responsible:
if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) {
Sanitize_Bios_Geom(d);
}
I have previously had FreeBSD 4.10 on the disk, installed from CD with
no problems. On my laptop (40GB), the disk geometry is 77520/16/63
which should also fail in the above check I have 6.0-CURRENT, installed
originally as 5.2.1 but upgraded with cvsup.
Running fdisk manually, I get the following output:
parameters extracted from in-core disklabel are:
cylinders=116280 heads=16 sectors/tracks=63 (1008 blks/cyl)
Figures below won't work with BIOS for partions not in cyl 1
parameters to be used for BIOS calculations are
cylinders=116280 heads=16 sectors/tracks=63 (1008 blks/cyl)
Information from DOS bootblock is:
1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 117210177 (57231 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 567/ head 15/ sector 63
2: <UNUSED>
3: <UNUSED>
4: <UNUSED>
Confirming to write disk, fdisk prints the following summary:
/dev/ad0: 116280 cyl 16 hd 63 sec
Part Start Size Type Flags
1 63 117210177 0xa5 0x80
This all looks OK, just like the kernel likes it...
--
Ph: +34.666334818 web: www.locolomo.org
S/MIME Certificate: http://www.locolomo.org/crt/2004071206.crt
Subject ID: A9:76:7A:ED:06:95:2B:8D:48:97:CE:F2:3F:42:C8:F2:22:DE:4C:B9
Fingerprint: 4A:E8:63:38:46:F6:9A:5D:B4:DC:29:41:3F:62:D3:0A:73:25:67:C2
More information about the freebsd-questions
mailing list