-   Slackware (
-   -   Slackware 10.1 Install on External USB Drive (

SlammedDime 06-19-2005 11:47 PM

Slackware 10.1 Install on External USB Drive
*Disclaimer* - I'll start by saying that I am completely new to *nix systems, and I am very tired at the moment, so most of what I have learned over the course of the day may come out slurred.

I recently got my Thinkpad R51. Love it, no problems, works wonderful. I also have this 160GB drive that i've made external with a Sabrent case. Instead of messing with my notebook hard drive, I figured I would just use this external for linux.

I want to be able to boot/mount this external drive on a Slackware 10.1 install. As it stands now, here is how my drive is setup:

LILO in the MBR
/dev/sda1 - /root
/dev/sda5 - /swap
/dev/sda6 - /usr
/dev/sda7 - /opt
/dev/sda8 - /home

The notebook supports USB booting, and I have installed Slackware completely onto the drive, AND I can actually boot the drive, get the LILO prompt, and start Slackware. HOWEVER, Slackware fails to mount the root partition. I would assume because of the lack of usb support in the kernel.

My question I pose to you, is how can a newbie such as myself compile a kernel that will allow Slackware to mount my external drive on startup. I have no floppy drive on the laptop, so I can't do a rescue boot. The Slackware 10.1 Disc 2 isn't bootable like its predecessors as a rescue disk. I know what I want can be done, I just need to know and learn how. I see this as a challenge, and something that will help me quickly learn the basics of compiling and customizing kernels.

Something I had pondered was using my laptop, somehow repartition the existing drive without loosing any windows info, install a limited version of slackware, enough to compile a kernel with USB support, put the kernel on the install disk, then when installing on the external drive, select that kernel from the cd. then when all is said and done, and i have a working install on the external drive, erase the slackware parition on the laptop drive, and be good to go like it came. Thoughts, suggestions, ideas? Remember, I'm just about completely new to all of this. :) TIA.


kjordan 06-20-2005 01:22 AM

You can just download a LiveCD, mount the drive, and then do a
chroot /mnt/usb /bin/bash
source /etc/profile

and then recompile the kernel.

SlammedDime 06-20-2005 03:02 AM

I have a Knoppix Disc. Knoppix mounts the drive upon startup, so I did the chroot .... and when I tried to do the source command, got

bash: id: command not found
bash: fortune: command not found


Simon Bridge 06-20-2005 04:29 AM

"Slackware fails to mount the root partition."

-- this sounds familiar.
Would you quote me the error message please - and your lilo.conf

If you are using a 2.4.20 or better kernel there should be usb support there. However the module may not automatically load itself. Presumably you could add the appropriate command(s) to your boot script?

On the other note:
You're idea of installing slack to your internal ide hdd is probably a sound one for someone new. I'd normally discourage someone totally new from trying what you have anyway. You'd have to go through the standard method: tidy and repartition first.

You'd end up with a standard install, which you can play with to learn the ropes - then try something more ambitious.

There are many tools for safely repartitioning a windows drive - the only trouble being that they are proprietary - so you gotta pay for them.

Bruce Hill 06-20-2005 05:55 AM

Maybe I'm way off, but something I noticed you posted:

/dev/sda1 - /root
This is not the same as / which is the root partition. You may actually
have / and just added the word root for some reason.

Don't even know if that's applicable, but it's worth what you paid for it.

Simon Bridge 06-20-2005 06:25 AM

Chinaman: you're right! He has listed no "/" partition.

This is part of why I wanted to see lilo.conf - the root partition should be listed there.
But lets just ask right out:

Where is your / partition?

aikempshall 06-20-2005 07:03 AM

I've installed 10.0 onto an external USB 20GB harddrive on an IBM T30 without a floppy drive see -

It took a while before I got it working, had to recompile the kernel to get some modules for inclusion in the initrd. Since upgraded to 10.1 and have managed to get the process semi-automated. On the next release of Slackware 10.2 or 11 I hopefully will get in fully automated. By the way it's USB 1.1 on the T30!

Lilo is installed on the mbr of the external harddrive so nothing has been changed on the internal drive. I suggest you get the tools on a Knoppix CD as I managed to overwrite the MBR on the internal drive.

I would suggest making a bootable Slackware 10.1 CD first with the proposed initrd.

Good luck

SlammedDime 06-20-2005 01:11 PM

I put "/root", however i did mean "/". As I said, I was tired. heh.

As far as the error message:
VFS: Cannot open root device "801" or 08:01
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 08:01

A copy of lilo.conf (sort of, since I can't copy and paste, I'm only typing things that aren't commented):
boot = /dev/sda
message = /boot/boot_message.txt
timeout = 1200


vga = 773

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda1
label = Linux
# Linux bootable partition config ends

aikempshall 06-20-2005 04:02 PM

my lilo.conf looks like -

# LILO configuration file
# generated by 'liloconfig'
# Start LILO global section
boot = /dev/sda
#compact # faster, but won't work on all systems.
timeout = 300
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0 # paranoia setting
# End LILO global section

# Linux bootable partition config begins
image = /boot/vmlinuz
# append="hdc=scsi devfs=mount acpi=on"
append="devfs=mount acpi=on"
root = /dev/sda1
label = Linux
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends

# Windows bootable partition config begins
other = /dev/hda1
label = Windows
table = /dev/hda
# Windows bootable partition config ends

Bruce Hill 06-20-2005 06:07 PM


The Slackware 10.1 Disc 2 isn't bootable like its predecessors as a rescue disk.
The Slackware-10.1 Disc 1 is bootable and can be used as a rescue disk.

The error Kernel panic: VFS: Unable to mount root fs on 08:01 indicates you don't
have support for the / filesystem built into the kernel. So yes, you'll need to compile a
kernel, or get one somewhere, with USB support built-in and not as a module, or you
can make an initrd.img for that.

Google is your friend, this has been done many times in the past.

Simon Bridge 06-20-2005 09:00 PM

SlammedDime: the lilo.conf is quite at odds with the lilo documentation. Did the installer write this?

Some observations:

aikempshall uses an initial ramdisk (initrd). This would be the most robust way of getting external usb drive to mount as the ramdisk image is used by lilo to load the usb (amongst other) modules to start the boot. There is a tool called mkinitrd - you may be able tio access it from a live or rescue CD. However, I would have expected the installer to do this for you. It may not have because lilo does not normally use an initrd. You could reinstall and select GRUB for the bootloader - GRUB always uses an initrd and so the installer should create the right one for you... probably worth a try if you find the other methods tricky.)

Compiling the kernel to have usb support built in, as opposed to using modules, would be rough if you've never done anything like this before.

As has been pointed out - this is something lots of folk have wanted to do. There are many threads in LQ and Google handling what you want. Read around. (Welcome to Slack Linux)

Slackware seems to have one of the steeper learning curves I've seen - tho all OS's are tough if they don't install right first time. If you like Slackware, you may consider a freindlier OS for short term learning purposes then change back when you know more.

My personal recommendation: reinstall with GRUB bootloader. This will likely work automatically and give you further experience with installations. Then you can go round LQ and reply to installer problems :)

SlammedDime 06-21-2005 02:40 AM

K, here's what I decided to do. I used Partition Magic to repartition the laptop hard drive, and I cut it in half. Have 5GB formatted as FAT32 to share between WXP and Slack, and the remainder for Slack itself. I'll just play around with this install, learn the basic ins and outs, learn how to compile a kernel, etc, etc, and then when I've learned a lil, tackle the real project. I'll most likely visit here often (as I've now bookmarked it). Thanks for the help and suggestions. I'll refer back here when I'm ready, hopefully soon. ;)

All times are GMT -5. The time now is 01:32 PM.