[773] in linux-scsi channel archive
Installing an old SCSI drive -- A parable
daemon@ATHENA.MIT.EDU (Clifford Beshers)
Mon Nov 6 20:51:43 1995
Date: Mon, 6 Nov 1995 12:11:52 -0500
From: Clifford Beshers <beshers@cs.columbia.edu>
To: linux-scsi@vger.rutgers.edu
The difficulties I had getting an old SCSI disk running convinced me
that the linux management tools and documentation need a few
additions. I'm telling this story so that developers will understand
the problem. It is also a tribute to the original Unix design and
tools, I think.
A friend recently retired his old NeXT machines, and loaned me a
Seagate ST1480N ~450MB disk that came out of them. At the same time,
I bought an ASUS PCI MB with Triton chipset and NCR53c810 SCSI
controller.
I had great difficulty getting things running. Linux 1.2.13 just hung
during the partition check at boot time, even though it had recognized
the SCSI controller and drive correctly. I tried 1.3.35, same
problem. I tried the latest version of the NCR53c7,8xx drivers.
Better error messages, but same trouble. Eventually I removed the
drive and discovered that the mounting bracket was touching the
resistors mounted on the bottom of the drive. Clearly, I had
installed it incorrectly.
I bent the bracket, reinstalled, and flew through the boot process,
all hopeful that I would be running after a few minutes.
From there I ran into two problems:
1) it was not clear to me how to configure the drive in terms of
sectors, heads and cylinders;
2) fdisk has no facility for forcing a new partition table to be
written over a bogus table.
As for the first problem, I eventually found the information in
SCSI-HOWTO, but it took a while to decipher. As I understand it now,
the actual geometry of the SCSI drive is completely hidden by the
controller. My drive actually has something like 1476 cylinders, but
my current setup says 1007. The controller merely allows access to a
linear list of blocks. This business of the disk geometry in fdisk is
there exclusively for backward compatibility with the DOS standard and
BIOS. Is this correct?
If so, I think this information needs to be reorganized and moved
closer to the front of SCSI-HOWTO. I'll try to get to this in a month
or so if nobody else does, though I'm not sure I'm a good candidate
because my understanding is so shallow.
Finally, I have major gripes with fdisk. After I booted successfully,
fdisk still wouldn't work, and would hang when trying to print the
partition table. Since this disk had a NeXT system on it, I wasn't
surprised that the information was bogus. What did surprise me is
that *nowhere* does it say how to *create*, not edit, a partition
table.
I read the following, included with Slackware 3.0:
fdisk man page
/usr/doc/util-linux-2.4/README.fdisk
/usr/doc/faq/howto/SCSI-HOWTO.gz
/usr/doc/faq/howto/LILO-FAQ.gz
/usr/lib/lilo/doc/user.tex
/usr/lib/lilo/doc/tech.tex
Also:
man -k format
man -k init
...etc...
Returned nothing useful.
I eventually realized that my disk really was working just fine, and
that fdisk was hanging from it's own stupidity. I tested this by
doing:
cat >/dev/sda
hello there, world.
^D
cat </dev/sda
My 'hello' message came right back at me. Also:
wc </dev/sda
returned the expected number of bytes on the disk. Clearly, the
controller and device driver understood the disk now.
I concluded that all would be well if I could get fdisk started with a
real partition table. The only place I knew I could get one was my
existing disks:
cat </dev/hda >/dev/sda
I interrupted this after a minute or so, and ran fdisk again. The
information was wrong, of course, copied from an IDE disk, but I could
then delete all the partitions, write the empty partition table,
reboot with the disk geometry reset by the bios, and then go about
making partitions and filesystems.
My purpose in telling all this is to point out some holes in the
management tools and documentation. As I said, if nothing changes by
the time I get some free time, I will write and submit some changed
documentation.
Thanks,
Cliff
--
Clifford Beshers Office: (212) 939-7087 Lab: (212) 939-7101
Columbia University Fax: (212) 666-0140
500 West 12Oth St., Room 450 WWW: http://www.cs.columbia.edu/~beshers
New York, NY 10027 Email: beshers@cs.columbia.edu