The guys from HAK5 (video podcast now on revision3), did an episode about what you're asking.
USB Multipass Tuesday, July 28th, 2009
– running time 35:17
Why carry around
a dozen bootable USB drives when you
could merge 'em all into one?
episode we build a USB Multipass
complete with customized boot menu
ready to launch any of favorite
tools--including Backtrack, Ophcrack,
Kon-boot, dban, freedos, and more.
Plus Shannon reviews the Trinity
Rescue Kit, the boot disc dubbed CPR
for your computer.
Here is their tutorial:
It has been the dream of many to combine the pen-testing, forensics and recovery power of our favorite USB bootable Linux distros into one drive complete with customized boot menu. Finally Frank Castle shares this digital mojo with us. I bring you the USB Muiltipass.
While the video walks you through the step by step I'll provide an overview with links here.
First you'll need three programs, PeToUSB,
Prepare the USB drive by formatting it with PeToUSB. With the drive plugged in run the PeToUSB executable, select the drive, check Enable Disk Format, Quick Format and Force Volume Dismount and click Start. If you are using a drive over 2 GB you will receive an error about dismounting -- it's no big deal -- simply format the drive as Fat32 with the Windows Disk Manager.
grubinst_gui. Select the disk option and pick your USB drive. Be sure to select the correct drive number. If you're not sure which drive is your USB drive check with Windows Disk Manager. Once you are assured the correct drive is selected go ahead and click Install. No options need to be checked, the defaults are fine.
You will then need to copy the grldr file from the
grub4dos package to the root of your USB drive. Finally finish off the install by creating a blank text file in the root of your USB drive called
You can now boot from this drive. Of course there aren't any Linux distributions and utilities installed yet, so let's move on to adding all the goodies.
When it comes to installing distros I'll go ahead and quote Frank Castle as he puts it best.
For most of the distros I added, I started off with an
.iso version of it. I then extracted the
.isos either to my desktop or directly to the root of the thumb drive (or you could just copy the files from a burnt version of the distro, just as long as you get the files to the root of your thumb drive). Most Linux distros come with 2 folders: a boot folder and another folder that actually holds the meat and potatoes of the distro. Since it would be impossible to have 6 or 7 different boot folders that don't overlap on the same thumb drive (without multiple partitions - a route I tried to take for way too long) I simply renamed the boot folder to something like
bootknop depending on the distro, and just left the other folder as is. I then added the appropriate information by using the information by either:
Looking at the information provided in the syslinux or isolinux file in most Linux distros
Looking at a (now taken down) web page with tons of examples (appropriately added to this tutorial under
Trial and Error
Most distros fell under the first of these options: Backtrack 3, Backtrack 4, Knoppix, and Trinity Rescue Kit all worked fine under these conditions
Some distros fell under the examples webpage: these included Ubuntu LiveCD (a different example because there is no boot folder and way more than two folders, but it ended up working without changing any folder names) as well as some others
Few Distros fell into the third option, but the ones that did were a bitch and a half to get working. These included Kon-Boot and OPHcrack.
OPHcrack (the latest version - 2.3.0), a tool I have known, loved, and depended on (at least until I met Kon-boot; thank you) was a apparently different than any of the other distros because just copying the files from the
.iso blah blah blah didn't work. It turns out that you have to burn the Distro to a spare thumb drive using tazusb (Slitaz installer) from http://www.objectif-securite.ch/slitaz/tazusb.exe. You then copy these files to the root of your thumb drive and so on and so on. The second challenge was to get both versions of OPHcrack (XP and Vista) on the drive, since ALL of the files overlapped. It turns out that the only difference in the two versions were the tables provided so I just copied the tables from one CD to the other and proceeded forward as usual.
Kon-Boot was yet another bitch of a thing to get running via USB. No matter what I did it would boot, load, and promptly go back to the Grub bootloader. After a few hours of trial and error, I discovered I had to tell GRUB to tell the BIOS that the hard drive was the first boot device, even though it was obviously the thumb drive, because Windows apparently won't run at all if it isn't the first boot device. This required a few extra lines. Also, for some reason the
.iso file wouldn't work (I could never extract or even see the raw files of Kon-Boot), so i was forced to use the Floppy image (
When it comes to customizing Grub its simply a matter of creating a 640x480 - 14 color splash screen image. This is easy to accomplish with the Gimp. Once you've created a 640x480 image you can crunch the colors be selecting Image, Mode, Indexed and entering 14 ad the maximum colors. Save this file as a XMP, then gzip it. Copy the gz to the root of your USB drive and prepend
splashimage /image.xpm.gz to your
Further information on customizing the grub menu.lst file for your specific distros can be found in the Grub manual. As an example I'll provide my config here:
color blue/black yellow/blue
title BackTrack 4 BETA
kernel /bootbt4/vmlinuz vga=0x317 ramdisk_size=6666 root=/dev/ram0 rw quiet
map --mem /FD0-konboot-v1.1-2in1.img (fd0)
map (hd1) (hd0)
kernel /ntpasswd/vmlinuz rw vga=1 initrd=/ntpasswd/initrd.cgz /ntpasswd/scsi.cgz
kernel /rescuecd initrd=initram.igz video=ofonly vga=0 scandelay=5
initrd /freedos.img floppy
kernel /bootoph/bzImage rw root=/dev/null vga=normal lang=C kmap=us screen=1024x768x16 autologin
I'm sure there will be many questions and further development of this project so as I'll go ahead and point you the episode 524 release thread on the Hak5 forums. Share your thoughts!