Packages needed: syslinux, cfdisk (or fdisk if you’re more comfortable with that), qemu (optional)
cd
dmesg # Look for USB device. Will probably be something like sdc.
sudo cfdisk /dev/sdc # WARNING! Make sure /dev/sdc is your memory stick before continuing!
Remove all partitions and create one new partition from the empty space. Set type to W95 FAT32 (0b), and set Bootable. Write and quit!
Create a fat32 filesystem on the memory stick
sudo mkfs.vfat /dev/sdc1
sudo mount /dev/sdc1 /mnt
Download a GNU/Linux dist iso, for example Debian Live
mkdir debian
wget http://cdimage.debian.org/cdimage/squeeze_live_alpha1/i386/iso-hybrid/debian-live-60alpha1-i386-standard.iso
sudo mount -o loop debian-live-60alpha1-i386-standard.iso debian
sudo cp -R debian/* /mnt
cd /mnt
sudo mv isolinux syslinux
cd syslinux
sudo mv isolinux.cfg syslinux.cfg
sudo sed -i 's/isolinux/syslinux/g' syslinux.cfg
sudo cp /usr/lib/syslinux/{vesa,}menu.c32 .
You should now have a working single dist bootable USB memory stick. Let’s try it
sudo umount /mnt
sudo qemu /dev/sdc # this should present you with the boot menu of the dist you used, in this example debian live
All well so far, clean up and prepare for adding another dist to the USB memory stick.
cd
sudo umount debian
rmdir debian
Adding a second dist to the USB memory stick. The following steps may be repeated with different dists until your memory stick is full!
mkdir puppy
wget http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux/puppy-5.0.1/lupu-501.iso
sudo mount -o loop lupu-501.iso puppy
sudo mount /dev/sdc1 /mnt
sudo mkdir /mnt/puppy
sudo cp -R puppy/* /mnt/puppy
Now all we need to do is to add a menu entry for Puppy to the root syslinux menu
vim /mnt/syslinux/syslinux.cfg
You can view the syslinux.cfg (or isolinux.cfg) to see what the dist uses for entries, for Puppy it is:
label puppy
kernel vmlinuz
append initrd=initrd.gz pmedia=cd
Copy these lines and add them to the end of /mnt/syslinux/syslinux.cfg
Also, change the two last lines to say
kernel /puppy/vmlinuz
append initrd=/puppy/initrd.gz pmedia=cd
That’s it, you now have a bootable USB memory stick with two different linux live dists. To test it out just umount and qemu
Repeat the last steps (from “mkdir puppy”) to add more dists!
Update: corrections and emphasis on warnings


