This is the 2nd part of my guide to create a multiboot USB flash disk. The first part I posted on how to install BartPE on a flash drive. Now I will show you how to install several Linux distros on the flash drive. I’m also assuming that you have some sort of knowledge of Linux operating systems.
The first step is to install BartPE as described in my last post. The only way I was able to get this to work was to install it first. Once it has been installed you then need to create a partitioning scheme. When I installed BartPE I set the size to 1.5 GB on an 8GB flash drive so I have plenty of room to put other operating systems. There are several tools that you can use to shink your BartPE partition if needed, I like to use gparted in Linux.
Once you have your BartPE partition to the size you want you then need to create a partition for each distribution of Linux (or any other OS that you want) and a boot partition. My boot partition is set to 8MB and ext2 as the file system.
Here is my partition table:

Device Boot Start End Blocks ID System
/dev/sdb1 1 203 1630566 c W95 FAT32 (LBA)
/dev/sdb2 * 204 204 8032+ 83 Linux
/dev/sdb3 205 976 6201090 5 Extended
/dev/sdb5 333 335 24066 6 FAT16
/dev/sdb6 336 591 2056288+ 83 Linux
/dev/sdb7 205 268 514017 b W95 FAT32
/dev/sdb8 269 332 514048+ b W95 FAT32

You will notice that I have a lot of partitions; I’m testing some other tools that I’m trying to get installed on my flash drive. Once I get them I will post how I have completed it.
Now time to install Backtrack. We will mount the ISO and then copy the contents to the correct partition.

mount –o loop backtrack.iso /mnt/iso
mount /dev/sdb6 /mnt/usb
cp –a /mnt/iso/* /mnt/usb
umount /mnt/usb
umount /mnt/iso

You can do the same for pretty much any OS (I only tested a few Linux distros). Once that is complete you need to install Grub which will allow you to boot to any OS on your flash drive. My boot partition was /dev/sdb2 so I ran the following command

mount /dev/sdb2 /mnt/usb
grub-install –root-directory=/mnt/usb –recheck ‘(hd1)’

I also installed memtest86 on the flash drive, nice utility to have.

cp memtest86plus /mnt/usb/boot

Now you just need to edit your menu.lst so that you can boot into the OS’s. This is the hardest part and i don’t remember how I figured out what to put in (sorry), but here is my menu.lst file

default 0
timeout 5
splashimg=(,1)/boot/grub/robin.xpm.gz

title miniPE
rootnoverify (,0)
chainloader +1

title BackTrack4
root (,5)
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x317
initrd /boot/initrd.gz

title MemTest86+
root (,1)
kernel /boot/memtest86+.bin