Date: Sun, 26 Jan 1997 00:33:02 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: jmz@cabri.obs-besancon.fr (Jean-Marc Zucconi) Cc: freebsd-hackers@freebsd.org Subject: Re: fdisk headache Message-ID: <Mutt.19970126003302.j@uriah.heep.sax.de> In-Reply-To: <9701252225.AA13971@cabri.obs-besancon.fr>; from Jean-Marc Zucconi on Jan 25, 1997 23:25:57 %2B0100 References: <9701252225.AA13971@cabri.obs-besancon.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
As Jean-Marc Zucconi wrote: > I try to add another disk, but it seems that something has changed > since my last drive installation because fdisk doesnt want to write a > correct information. Why are you using fdisk at all? You are running Unix, you aren't running on a PC, you are not supposed to use fdisk (unless other systems on your disk force you to this step). :-) > My new drive is probed as: > (ncr1:6:0): "QUANTUM FIREBALL_TM3200S 300N" type 0 fixed SCSI 2 > sd4(ncr1:6:0): Direct-Access > sd4(ncr1:6:0): 10.0 MB/s (100 ns, offset 8) > 3067MB (6281856 512 byte sectors) > sd4(ncr1:6:0): with 6810 cyls, 5 heads, and an average 184 > sectors/track > (why 6810*5*184 != 6281856 ???) So, if you don't understand it -- why do you boot with -v at all? We deliberately took this line out of the default messages: sd4(ncr1:6:0): with 6810 cyls, 5 heads, and an average 184 ^^^^^^^^^^^^^^ ...and this should be taken as a good indication that nobody claims the equation C*H*S = <total number of sectors> should assumed to be true. It's just the other way round: the SCSI drive can report about its number of heads, cylinders, and total number of blocks. Since it can't report about the number of sectors per track (and this number would barely make sense at all), the boot message calculates that average from the other three figures. > When I start fdisk it tells me that the drive has 19035cyl, 6heads, > 55sec/trk. Wanting to change the values to 6810/5/184, I get You can't. You are limited by the BIOS constraints in an fdisk table. The best you could do is changing it to 1024/x/y where x and y match the emulation your BIOS is using. > The data for partition 3 is: > sysid 165,(FreeBSD/NetBSD/386BSD) > start 1, size 6265199 (3059 Meg), flag 80 > beg: cyl 0/ sector 2/ head 0; > end: cyl 666/ sector 55/ head 5 > The last value is obviously wrong, but if try to change it to > something more realistic, eg. 6810/5/183, fdisk interpret my values as > 666/55/5 !!!!! Because it will be (silently) masked by 0x3ff. > The real problem is then when I want to label the disk: I get > > ioctl DIOCWLABEL: Operation not supported by device > sd4s4: type 0xa5, start 1, end = 6265199, size 6265199 > sd4s4: C/H/S end 666/5/55 (220109) != end 6265199: invalid The slice code knows about various BIOS problems. It assumes a few bogus geometry values (including the 1024 cylinders one). However, the total number of sectors in the BSD slice must still match the `c' partition value -- 6265199. > Is there a solution? I don't care if the geometry is incorrect as long > I can disklabel/newfs the drive and use the 3067 Mb!!! The simplest solution (assuming you only want FreeBSD there) is: . wipe out your junked fdisk table: dd if=/dev/zero of=/dev/rsd4 count=10 . give the entire disk to FreeBSD: disklabel -Brw sd4 auto . edit the partitions as you need: disklabel -e sd4 -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Mutt.19970126003302.j>