Re: SCSI disk devices

Doug Ledford (
Fri, 02 May 1997 00:35:03 -0500

> From: rohrer keith w <>
> Date: Thu, 1 May 1997 16:53:07 -0500 (CDT)
> Assuming you don't use lilo or that you use a boot floppy. Otherwise
> the new SCSI disk will move your root disk in the BIOS' enumeration, and
> lilo won't find the kernel (or half of itself) anymore.
> Not that this invalidates your point: to ensure that a disk is the
> first SCSI disk, there's currently only one choice, making it ID 0.
> Keith
> On a PC, you are absolutely correct, and I hadn't thought of that.

Sorta correct is more like it. Depending on the SCSI controller, you can set
the boot device SCSI ID. In the case of 2940 cards with BIOS version 1.23 or
above, this results in that particular SCSI ID being set as the BIOS disk
0x80, or drive C. Then it isn't until after the boot that the drive gets put
into the new order. As a result, you can modify the fstab layout, without
changing LILO (or re-running it for that matter, since re-running it will
confuse the hell out of LILO since the current disk order won't be the same as
at boot time) and things will actually boot and run fine. I do this when
setting up new systems. It's fairly painless to do this:

cd /
mkdir tmpmnt
mount /dev/newdisk /tmpmnt
for i in *
if [ "$i" != "tmpmnt" ]; then
cp -dpvPR $i /tmpmnt
umount /tmpmnt

shut the system down, move the new disk to SCSI ID 0 and the existing first
disk back if need be, modify the Adaptec BIOS to point at the original boot
disk, boot the machine up, passing the root=/dev/newdisklabel S on the lilo
prompt, get up in single user mode, run lilo to init the boot sector on the
new disk, reboot again, change the BIOS back to the way it should be, then
voila, you have a new working hard disk all set up and booting and everything.
This same thing can be used to save fubarred hard drives in machines where
they won't boot anymore and the machine doesn't have a floppy (I have quite a
few of those machines as well).

* Doug Ledford                      *   Unix, Novell, Dos, Windows 3.x,     *
*    873-DIAL  *     WfW, Windows 95 & NT Technician   *
*   PPP access $14.95/month         *****************************************
*   Springfield, MO and surrounding * Usenet news, e-mail and shell account.*
*   communities.  Sign-up online at * Web page creation and hosting, other  *
*   873-9000 V.34                   * services available, call for info.    *