Booting Slackware from an external USB
I've spent two whole days trying to get this to work and I believe I may be on the verge of insanity.
In any event, my goal is to have Slackware 13.0 be installed on an external USB drive and for any computer I use to be able to boot from that USB drive and load Linux.
I used fdisk to completely repartition the external hard drive making the first partition for '/' and toggling the boot flag on it.
I installed lilo on the USB drive, rebooted, disabled the internal hard drive, and instructed the computer to boot from USB.
"No boot options available."
I assumed there was a problem with the MBR. I booted into Slackware setup, performed a lilo -mbr on the external hard drive. Rebooted.
Still "No boot options available."
What could possibly be wrong? Yes, my computer does support booting from USB.
Do all hard drives have MBR's? Does fdisk overwrite the MBR when you partition it? If it does, do I have to ignore the first 1MB when I partition my disk so that lilo can boot from it? I remember having to do similar with 'parted' when I had to format a flash drive for being bootable.
The other problem I have is that the /dev/sda can change. Just because a USB drive is /dev/sda today doesn't mean it won't be /dev/sdb tomorrow. Is it even possible to have a boot loader load correctly, considering that you hard code the device name into the /etc/lilo.conf? I was thinking of using grub to manually choose where to boot at load, but that doesn't seem to be an option as grub looks like (i may be mistaken) it tries to find a root and then looks for the grub config info in that drive. I also don't think that grub loads USB drivers at runtime, nor do I think lilo does either, which makes me wonder even more if it's remotely possible.
Never mind; I figured it out. Apparently the OS was taking a while to initialize the USB drive, so it never read the hard drive. If I made it wait a bit longer it found it and loaded Slack.
Also for people wanting to install on USB - you need to make sure that the kernel you're using loads USB drivers before it tries to mount the drive. For Slack users it'd be on the initrd; check the mkinitrd command.
You can overcome problems of hard-coding device names by using either labels or UUIDs.
|All times are GMT -5. The time now is 11:51 AM.|