Date: Thu, 6 Apr 1995 23:45:33 +1000 From: Bruce Evans <bde@zeta.org.au> To: rgrimes@gndrsh.aac.dev.com, roberto@blaise.ibp.fr Cc: bde@zeta.org.au, freebsd-current@FreeBSD.org Subject: Re: Label/slices : how to add a disk ? Message-ID: <199504061345.XAA21963@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> I just got a brand new disk, Conner CFP1080S, geometry reported by boot -v >> is (3659/6/96). The standard translation would give me 1030/64/32. >> >> I've been unable to even put a label on it :-( >> ... >> Apr 6 02:44:26 keltia /kernel: (bt0:2:0): "CONNER CFP1080S 3939" is a type 0 fixed SCSI 2 >> Apr 6 02:44:26 keltia /kernel: sd2(bt0:2:0): Direct-Access 1030MB (2110812 512 byte sectors) >> ... >> fdisk /dev/sd2 >> ******* Working on device /dev/sd2 ******* >> parameters extracted from in-core disklabel are: >> cylinders=3658 heads=64 sectors/track=32 (2048 blks/cyl) >> ^^^^ ^^^^ ^^^ >> good wrong wrong Actually:-) wrong good good >Nope, use the override what the BIOS thinks and tell it >cyliders=1030, heads=64, sectors/track=32. The dummy in-core label for /dev/sd2 is supposed to give the BIOS geometry, but it got the number of cylinders wrong (known bug, it doesn't change it from the H=6/S=96 geometry to the H=64/S=32. There are a lot of different numbers for the number of cylinders for the 6/96 geometry! The BIOS says 3659, the dummy label says 3658, but 2110812/8/96 is 3664 with a remainder of 348. 1030/64/32 is correct (remainder 1372). >> The data for partition 3 is: >> sysid 165,(FreeBSD/NetBSD/386BSD) >> start 0, size 2097152 (1024 Meg), flag 80 >> beg: cyl 0/ sector 0/ head 0; > ^^^^^^^^^ >Redo the fdisk -u, override the calculation of beg/end. Use >cyl 0, sect 1, head 0 for the beg. The default caclulations screw >up and put 0 in for the starting sector :-(. Another known bug. I didn't expect it to cause so much trouble. I expected people who use the whole disk for FreeBSD to not even run fdisk. For this to work, you have to have a disk that doesn't have a partition table. This is easy to arrange by overwriting the partition table: dd if=/dev/zero of=/dev/rsd2 count=1 to clear the MBR or dd if=/dev/zero of=/dev/sd2 bs=1 seek=46 count=66 to clear the partition table (leaving the bootstrap intact) or dd if=/dev/zero of=/dev/sd2 bs=1 seek=510 count=2 to clear only the partition-table-valid magic. Then normal (poor) BSD methods apply: disklabel -w -r [-B] sd2 disktabentry [...] The driver knows almost everything about the disk geometry and puts it in the dummy in-core label on for /dev/rsd2, but there is no convenient way to get the geometry onto the disk /dev/rsd2c. There is no dummy in-core label for /dev/rsd2c because the disk isn't considered to be a BSD disk until it is labeled. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504061345.XAA21963>