Slackware "USB Boot CD" HOWTO
After installing a minimal Slackware 11.0 on my USB2.0 external drive (see this thread)
http://www.linuxquestions.org/questi...d.php?t=518905, 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.
Code:
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
Stage 5
mount cd or partition with Slackware packages.
Code:
mount -t iso9660 /dev/hdc /mnt/cdrom
(the cd drive should become free when you chroot to your new root directory)
Install kernel 2.6.17.13 plus modules using the Slackware 11.0 install cd 2
Code:
installpkg /mnt/cdrom/extra/linux-2.6.17.13/kernel-generic-2.6.17.13-i486-1.tgz
installpkg /mnt/cdrom/extra/linux-2.6.17.13/kernel-modules-2.6.17.13-i486-1.tgz
rm /etc/rc.d/rc.modules
ln -s rc.modules-2.6.17.13 rc.modules
Stage 5
Make your initrd.gz (a mini linux system that allows your main system to boot).
Code:
cd /boot
mkinitrd -c -k 2.6.17.13 -m reiserfs:uhci-hcd:ehci-hcd:ohci-hcd:usb-storage
Stage 6
Prepare the build directory and files, isolinux is on cd 1.
Code:
mkdir /bootcd
cp /boot/initrd.gz /bootcd/initrd.gz
cp /boot/vmlinuz-generic-2.6.17.13 /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
Code:
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.
Then run the following commands
Code:
cd ..
umount tmp/
rmdir tmp/
gzip -c -9 initrd > initrd.img
Stage 8
Build the bootcd.iso, this is done in the /bootcd directory.
Code:
mkisofs -o bootcd.iso -b isolinux.bin -c boot.cat\
-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.