I installed Slackware on an IDE drive that was in a USB enclosure but wanted to install that drive in another machine as the primary boot drive.

There were two problems:

First was that when installing LILO, I told it to use the master boot sector on /dev/sdc, which was where the system located the USB drive.

Second was that the /etc/fstab was also set up with reference to /dev/sdc1, ..., /dev/sdc3.

After installation was complete, I thought I would test it out by booting directly from it. The system found the external drive and booted its boot loader, which tried to mount its root filesystem on /dev/sdc1, only to fail. Probably because the USB devices hadn't been set up yet. I guess that's what the initrd is for.

Now the machine where this drive will eventually live is a somewhat broken laptop - in particular the screen doesn't work - and I haven't got a monitor lying around. But I did have another laptop with working screen which uses IDE drives, so I put it in there to test.

At the boot prompt, I added the kernel option "root=/dev/hda1" but soon found out that this modern kernel prefixes even IDE drives "sd" so I tried again with "root=/dev/sda1" and lo, the laptop loaded the kernel from my boot partition.

Now the system failed because the /etc/fstab was referring to locations on /dev/sdc. I took the offer to log in as root in single-user mode and remounted the root partition read-write:

mount -o remount,rw /dev/sda1 /

Edit /etc/lilo.conf and /etc/fstab, run lilo, reboot and all is well.

changed April 23, 2013