CXO

DIY: Create multi-boot USBs with ease

Get instructions on how to use XBoot or UNetbootin to have a USB stick with more than one operating system.

When you want to have a single USB stick with multiple operating systems, the end result must be a reliable USB drive that contains the operating systems you need. Here's how to do this with two tools: XBoot (using Windows 7) and UNetbootin (from within Linux). Both are simple, but the Linux version requires more manual work.

XBoot in Windows 7

Requirements
  • XBoot
  • ISOs of the operating systems you want
Instructions Download and run XBoot on your Windows 7 machine. To run XBoot, just unzip the downloaded file, change into the newly created directory, and double-click the .exe to run the software. When you run the software, you will see the main window (Figure A). Figure A

The operating systems listed will not show up on your XBoot window unless you installed them.
To add ISO images, open Explorer and drag and drop the ISOs into XBoot. Some ISO images (e.g., Fedora 16) are automatically recognized. When you drag an unrecognized ISO into XBoot, a new window will appear (Figure B) where you must select the ISO (or the closest distribution) from a drop-down. For example, I selected Ubuntu for Bodhi Linux and Puppy Linux for MacPup. After you select the correct version from the drop-down, click Add This File. Figure B

XBoot window when you drag an unrecognized ISO into it.

After all ISOs are added (make sure their combined size does not exceed that of the USB drive), click the Create USB button near the bottom right corner of the main window. Once this completes the process, you can reboot the machine (making sure it will boot from a USB device) and enjoy your multiboot on a stick.

UNetbootin from within Linux

Requirements Instructions

  1. Download the UNetbootin tool for Linux.
  2. From a terminal window, give the downloaded file executable permissions with the command chmod u+x unetbootin-linux-XXX (where XXX is the architecture).
  3. Run UnNetbootin with the command ./unetbootin-linux-XXX (where XXX is the architecture).
  4. From the main window, select the distribution you want to install or use a downloaded ISO (Figure C).
  5. After UNetbootin completes the install of the first OS, reboot the machine to test the OS on the USB drive.

Figure C

Make absolutely sure you select the right USB device from the Drive drop-down before you continue; otherwise, you could wipe out the wrong drive.

Now it gets a little tricky. You must copy everything from the USB drive to a new directory on your hard drive. Then, repeat the steps above, selecting the next OS you want on the USB drive.

Now open two file manager windows: one to the USB drive and one to the newly created directory containing all the files from the first install you did on UNetbootin. You want to copy everything from the hard drive to the USB drive except the following:
  • vesamenu.c32
  • ubnpathl.txt
  • ubnkern
  • ubninit
  • ubnfilel.txt
  • syslinux.cfg
  • ldlinux.sys

In the folder on your desktop, you must open the syslinux.cfg file. From that file, copy the last four lines and paste them in the syslinux.cfg file on the USB drive. Those lines will look like this:

label ubnentry0

menu label DISTRIBUTION

kernel /vmlinuz

append initrd=/initrd.gz pmedia=cd

where DISTRIBUTION is the name of the distribution you originally installed.

You must copy the above four lines between the "label ubnentry1" and "label ubnentry2" entries. Make sure to relabel the "ubnenetryX" entries so they are in consecutive numerical order. After you make the necessary edits, close and save the file and reboot the system.

You should now have a multi-boot USB drive that is in working order. Wth a large enough USB drive, you can carry around any number of operating systems that serve numerous purposes.

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

Editor's Picks