Date: Tue, 30 Sep 1997 22:35:42 +0200 From: Ollivier Robert <roberto@keltia.freenix.fr> To: "FreeBSD Current Users' list" <freebsd-current@FreeBSD.ORG> Subject: Geometry weirdness with sysinstall/libdisk Message-ID: <19970930223542.44057@keltia.freenix.fr>
next in thread | raw e-mail | index | archive | help
Hi, Why is tst01 (bundled with libdisk) getting my geometry 1) wrong and 2) differently for each of my disks ? It forbid me to use sysinstall as a disk configuration utility for all my other disks because 1. the geometry is wrong and giving it the good one doesn't help, 2. the slices information is decoded wrongly so I can't just modify the existing label with it. sd0 is an IBM DCAS UW 4.3 GB with 2 DOS slices and my booting FreeBSD slice. tst01 sd0 correctly gives: --==##==-- Debug_Disk(sd0) flags=0 bios_geom=1018/132/63 = 8465688 boot1=0x0, boot2=0x0, bootmgr=0x0 --> 0x14040 0 8467200 8467199 sd0 whole 0x00 --> 0x14080 0 63 62 - unused 0x00 --> 0x140c0 63 415737 415799 sd0s1 fat 0x06 = --> 0x14100 415800 5729724 6145523 sd0s2 freebsd 0xa5 C= --> 0x14180 415800 51200 466999 sd0s2a part 0x07 --> 0x14200 467000 262144 729143 sd0s2b part 0x01 --> 0x14240 729144 409600 1138743 sd0s2e part 0x07 --> 0x14280 1138744 1024000 2162743 sd0s2f part 0x07 --> 0x142c0 2162744 819200 2981943 sd0s2g part 0x07 --> 0x14300 2981944 1433600 4415543 sd0s2h part 0x07 --> 0x14340 4415544 1729980 6145523 sd0s2d part 0x07 --> 0x141c0 6145524 2320164 8465687 sd0s3 extended 0x05 = --> 0x14380 6145524 63 6145586 - unused 0x00 --> 0x14140 6145587 2320101 8465687 sd0s5 fat 0x06 = --> 0x143c0 8465688 1512 8467199 - unused 0x00 Now, sd2 is an IBM DORS 2 GB narrow. tst01 sd2 gives this absolutely false geometry: --==##==-- Debug_Disk(sd2) flags=0 bios_geom=13045/54/6 = 4226580 boot1=0x0, boot2=0x0, bootmgr=0x0 --> 0x14040 0 4226725 4226724 sd2 whole 0x00 > --> 0x14080 0 4226725 4226724 - unused 0x00 > The right one is obtained by using sd2c as a device : --==##==-- Debug_Disk(sd2c) flags=0 bios_geom=2063/64/32 = 4225024 boot1=0x0, boot2=0x0, bootmgr=0x0 --> 0x14040 0 4226725 4226724 sd2c whole 0x00 > --> 0x14080 0 4226725 4226724 - unused 0x00 > Anyway, the output of tst01 is still wrong on one account because the real label is the following. Why is disklabel getting the right information when libdisk can't ??? I thought they were using the same ioctl ?? And where is this 13045 coming from ? It doesn't match the -- fictious -- geometry displayed when booting with -v. Controller is an ASUS PCI-875. sd0 on internal wide cable and DORS on the internal narrow one. # /dev/rsd2c: type: SCSI disk: IBM32160 label: flags: bytes/sector: 512 sectors/track: 32 tracks/cylinder: 64 sectors/cylinder: 2048 cylinders: 2063 sectors/unit: 4226725 rpm: 5400 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 40960 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 19) b: 131072 40960 swap # (Cyl. 20 - 83) c: 4226725 0 unused 0 0 # (Cyl. 0 - 2063*) d: 204800 172032 4.2BSD 1024 8192 16 # (Cyl. 84 - 183) e: 716800 376832 4.2BSD 1024 8192 16 # (Cyl. 184 - 533) f: 409600 1093632 4.2BSD 1024 8192 16 # (Cyl. 534 - 733) g: 1024000 1503232 4.2BSD 1024 8192 16 # (Cyl. 734 - 1233) h: 1699493 2527232 4.2BSD 1024 8192 16 # (Cyl. 1234 - 2063*) -- Ollivier ROBERT -=- FreeBSD: There are no limits -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 3.0-CURRENT #35: Sun Sep 21 19:28:07 CEST 1997
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970930223542.44057>