-   Slackware (
-   -   Slackware "USB Boot CD" HOWTO (

samac 01-21-2007 07:17 AM

Slackware "USB Boot CD" HOWTO
Slackware "USB Boot CD" HOWTO

After installing a minimal Slackware 11.0 on my USB2.0 external drive (see this thread), I had to be able to boot it from a laptop, the bios of which, does not support USB booting.

Stage 1
Install Slackware on the USB drive, using huge26.s, connected to the machine that you will use the USB drive with.

Stage 2
Reboot using a rescue cd/live distribution, and do all the following instructions as root.

Stage 3
Mount your USB linux system eg.

mount -t reiserfs /dev/sda5 /mnt/hd
mount -t ext2 /dev/sda1 /mnt/hd/boot
mount -t reiserfs /dev/sda7 /mnt/hd/home

Stage 4
chroot to the mount point

chroot /mnt/hd
Stage 5
mount cd or partition with Slackware packages.

mount -t iso9660 /dev/hdc /mnt/cdrom
(the cd drive should become free when you chroot to your new root directory)
Install kernel plus modules using the Slackware 11.0 install cd 2

installpkg /mnt/cdrom/extra/linux-
installpkg /mnt/cdrom/extra/linux-
rm /etc/rc.d/rc.modules
ln -s rc.modules- rc.modules

Stage 5
Make your initrd.gz (a mini linux system that allows your main system to boot).

cd /boot
mkinitrd -c -k -m reiserfs:uhci-hcd:ehci-hcd:ohci-hcd:usb-storage

Stage 6
Prepare the build directory and files, isolinux is on cd 1.

mkdir /bootcd
cp /boot/initrd.gz /bootcd/initrd.gz
cp /boot/vmlinuz-generic- /bootcd/linux
cp /mnt/cdrom/isolinux/isolinux.bin /bootcd/isolinux.bin
echo "DEFAULT linux initrd=initrd.img ro root=/dev/sda5" > /bootcd/isolinux.cfg

Stage 7
Time to rebuild the initrd.gz

cd /bootcd/
mkdir tmp/
gunzip initrd.gz
mount -o loop initrd tmp/
cd tmp

pico rootdev and add a line similar to this

pico rootfs and add a line similar to this

pico linuxrc and add after the modules section but before the lvm section.

sleep 10
Then run the following commands

cd ..
umount tmp/
rmdir tmp/
gzip -c -9 initrd > initrd.img

Stage 8

Build the bootcd.iso, this is done in the /bootcd directory.

mkisofs -o bootcd.iso -b isolinux.bin -c\
-no-emul-boot -boot-load-size 4 -boot-info-table -J\
-hide-rr-moved -R .

Remember the final .
Then burn your iso, I use k3b but this can also be done from the command line using cdrecord.

Stage 9
Put the cd where it belongs, make sure your external USB drive is connected and on, boot and enjoy.

vbisis 01-23-2007 12:12 AM

sounds great!

I will try as soon as possible ;)

tux21 02-03-2007 09:11 AM

echo "DEFAULT linux initrd=initrd.img ro root=/dev/sda5" > /bootcd/isolinuxcfg


echo "DEFAULT linux initrd=initrd.img ro root=/dev/sda5" > /bootcd/isolinux.cfg


gzip -c 9 initrd > initrd.img


gzip -c -9 initrd > initrd.img


cp /mnt/cdrom/isolinux/isolinux.bin /bootcd/isolinux.bin

is in disk 1


installpkg /mnt/cdrom/slackware/extra/linux-


installpkg /mnt/cdrom/extra/linux-

in disk 2


mkisofs -o bootcd.iso -b isolinux.bin -c \
-no-emul-boot -boot-load-size 4 -boot-info-table -J \
-hide-rr-moved -R .

must be done while in /bootcd directory.bEFORE that initrd.img must be copied in /bootcd

samac 02-03-2007 10:24 AM

Thanks tux21

I have made the changes.

I guess I should try to learn to proof read, and also write things down rather than do them from memory.

More importantly, did this work for you.


tux21 02-03-2007 02:24 PM

ofcourse it did.

yours is one of the few guides for people like me with 5 yr old pc

by the way where did you get this info from?

samac 02-03-2007 02:45 PM

I pieced it together from about a half dozen sources and reading the info in the boot cd text files.


All times are GMT -5. The time now is 11:20 AM.