Date: Wed, 6 Sep 2000 11:11:24 +0200 From: Michel TALON <talon@lpthe.jussieu.fr> To: freebsd-stable@freebsd.org Subject: Re: fdisk won't work on new hard drives can't get Message-ID: <20000906111124.A9444@lpthe.jussieu.fr> In-Reply-To: <Pine.SOL.3.96L.1000905200510.25345A-100000@unix11.andrew.cmu.edu>; from gcs@andrew.cmu.edu on Tue, Sep 05, 2000 at 08:07:23PM -0400 References: <Pine.SOL.3.96L.1000905200510.25345A-100000@unix11.andrew.cmu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 05, 2000 at 08:07:23PM -0400, Gregory C Schohn wrote: > hi - I've recently purchased 2 different 18GB scsi drives (a barracuda & a > cheetah, but the layout of the disks are identical). For the past month, > I've not been able to get partitions laid on them that FreeBSD is willing > to notice correctly (w/ disklabel & fdisk). > > I've tried a lot of different things. Originally I tried writing the > partition information w/ sysinstall - that didn't work, then I tried fdisk > w/ -u (& -i -u) & that didn't work. Each time that I wrote the values out > - the light would flicker on the disk, but the partition table wasn't > changed (presumably some other sector was changed). > > I've upgraded my machine a couple of times (& I'm going to be doing it > once more now) & replaced /dev/MAKEDEV & the affiliated disks (da1 & da2) > - yet I still can't get this to work... > > Here's the output from fdisk on the drives (I had successfully partitioned > them under solaris86 which is why the solaris partitions are there). > fdisk: invalid fdisk partition table found > ******* Working on device /dev/da2 ******* > parameters extracted from in-core disklabel are: > cylinders=2181 heads=255 sectors/track=63 (16065 blks/cyl) > > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=2181 heads=255 sectors/track=63 (16065 blks/cyl) > > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 130,(Linux swap or Solaris x86) > start 5136, size 5125728 (2502 Meg), flag 0 > beg: cyl 0/ sector 34/ head 81; > end: cyl 311/ sector 18/ head 97 > The data for partition 2 is: > sysid 6,(Primary 'big' DOS (> 32MB)) > start 5128816, size 30414368 (14850 Meg), flag 0 > beg: cyl 311/ sector 19/ head 97; > end: cyl 164/ sector 18/ head 166 > The data for partition 3 is: > The data for partition 4 is: > sysid 165,(FreeBSD/NetBSD/386BSD) > start 1, size 35037764 (17108 Meg), flag 80 (active) > beg: cyl 0/ sector 2/ head 0; > > note - I didn't put the 4th partition on - it continues to tell me > that that parition exists - even though solaris (when I ran the installer) > knew of only the first 2. > > Also - when I step through the sysinstall utility & try to make slices > after I lay the partitions, it tells me that the devices aren't > configured. > > It seems like my devices are hosed, but they've been rebuilt. > > when I try running disklabel on one of these disks > disklabel: ioctl DIOCGDINFO: Invalid argument > & device not configured when I try it on the slices. > I have a similar experience, with a 20 Gigs Western Digital Ultra 66 drive. I have installed FreeBSD, Linux and Win98 on it, and have seen a problem with fdisk. Note that it is FreeBSD 4.1-Release, so a recent fdisk. Linux is on first slice, 2 Gigs. FreeBSD is on second slice 2.5 Gigs. I wanted to allocate the rest to Win98. Problem Win98 refused to install on the partition fdisked and newfs_msdos. So i used Dos fdisk to delete the third partition and recreate it, then Dos format /s c: to format it. Then Win98 install went out fine (i had to disable ATA 66 in the BIOS before running Dos programs otherwise nothing worked. I then installed drivers coming with the Abit mobo, and reenabled ATA 66). Rebooting to FreeBSD i discovered that the Dos slice began at cylinder 1024 and ended at last cylinder. There was a 2 Gig hole from the end of FreeBSD slice to the beginning of Dos slice. Why Dos fdisk did that, i don't know. It is not a very verbose program! But more important, while sector numbers were fine, the cylinder indications were completely bogus. They say the slice is beginning cylinder 1023 and ending cylinder 1023. I can see above similar bogus cylinder informations. I have tried to use fdisk -u to restore correct numbers, but to no avail. At best one gets starting cylinder 0, ending cylinder = number of cylinders remaining. So i changed nothing. Since apparently only sector numbers are relevant, this caused no problem. However the problem came when i installed Linux, namely Mandrake 7.1. I have been much impressed by the very nice installer. The Ultra 66 mode was properly recognized and install went out fine and quick. I asked to put lilo on the Linux partition and rebooted to find that F2 did not fire up Linux. Using the Mandrake cdrom in rescue mode and doing mount /dev/hda2 /mnt lilo -r /mnt i discovered the problem. There was a Windows label in lilo.conf and since cylinder numbers were botched, lilo aborted. Erasing it and rerunning lilo installed the boot sector on /dev/hda2 and allowed linux access. Moral, it would be fine to fix the fdisk problems in FreeBSD. Moreover this program is horrendous to use, and the documentation is close to 0. As far as disklabel is concerned, it is of the same vein. One has to compute a lot of entries from what fdisk reports, write an entry in /etc/disktab and run disklabel -r -w <slice> before having something reasonable. The label auto does not work, at least on my ata drive. This could be easily automated. Manually it took me two hours to figure out, in order to reuse an old disk. -- Michel TALON To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000906111124.A9444>