OpenSource For You

How to Make Your USB Boot with Multiple ISOs

This DIY article is for systems admins and software hobbyists, and teaches them how to create a bootable USB that is loaded with multiple ISOs.

-

Systems administra­tors and other Linux enthusiast­s use multiple CDs or DVDs to boot and install operating systems on their PCs. But it is somewhat difficult and costly to maintain one CD or DVD for each OS (ISO image file) and to carry around all these optical disks; so, let’s look at the alternativ­e—a multi-boot USB.

The Internet provides so many ways (in Windows and in Linux) to convert a USB drive into a bootable USB. In real time, one can create a bootable USB that contains a single OS. So, if you want to change the OS (ISO image), you have to format the USB. To avoid formatting the USB each time the ISO is changed, use Easy2Boot. In my case, the RMPrepUSB website saved me from unnecessar­ily formatting the USB drive by introducin­g the Easy2Boot option. Easy2Boot is open source - it consists of plain text batch files and open source grub4dos utilities. It has no proprietar­y software.

Making the USB drive bootable

To make your USB bootable, just connect it to your Linux system. Open the disk utility or gparted tool and format it as

Fat32 (0x0c). You can choose ext2/ext3 file systems also, but they will not load some OSs. So, Fat32 is the best choice for most of the ISOs.

Now download the grub4dos-0.4.5c (not grub4dos0.4.6a) from https://code.google.com/p/grub4dos-chenall/ downloads/list and extract it on the desktop.

Next, install the grub4dos on the MBR with a zero second time-out on your USB stick, by typing the following command at the terminal: sudo ~/Desktop/grub4dos-0.4.5c/bootlace.com - -time-out =0 / dev/sdb

Copying Easy2Boot files to USB

Your pen drive is ready to boot, but we need menu files, which are necessary to detect the .ISO files in your USB.

The menu (.mnu) files and other boot-related files can be downloaded from the Easy2boot website. Extract the Easy2Boot file to your USB drive and you can observe the different folders that are related to different operating systems and applicatio­ns. Now, just place the correspond­ing .ISO file in the correspond­ing folder. For example, all the Linux-related .ISO files should be placed in the Linux folder, all the backup-Linux related files should be placed in the correspond­ing folder, utilities should be placed in the utilities folder, and so on.

Your USB drive is now ready to be loaded with any (almost all) Linux image files, backup utilities and some other Windows related .ISOs without formatting it. After placing your required image files, either installati­on ISOs or live ISOs, you need to defragment the folders in the USB drive. To defrag your USB drive, download the defragfs-1.1.1.gz file from http:// defragfs. sourceforg­e. net/ download.html and extract it to the desktop. Now run the following command at the terminal:

sudo umount /dev/sdb1

sdb1 is the partition on my USB which has the E2B files.

sudo mkdir ~/Desktop/usb && sudo mount /dev/sdb1 ~/Desktop/ usb sudo perl ~/Desktop/defragfs ~/Desktop/usb -f

That’s it. Your USB drive is ready with a number of ISO files to boot on any system. Just run the defragfs command every time you modify (add or remove) the ISO files in the USB to make all the files in the drive contiguous.

Using the QEMU emulator for testing

After completing the final stage, test how well your USB boots with lots of .ISO load on it, using the QEMU tool. Alternativ­ely, you can choose any of the virtualisa­tion tools like Virtual Box or VMware. We used QEMU (it is easy but somewhat slow) in our Linux machine by typing the following command at the terminal:

sudo qemu –m 512M /dev/sdb

Your USB will boot and the Easy2Boot OS selection menu will appear. Choose the OS you want, which is placed under the correspond­ing folder. You can use your USB in real time, and can add or remove the .ISOs in the correspond­ing folders simply by copy-pasting. You can use the same USB for copying documents and other files by making all the files that belong to Easy2Boot contiguous.

 ??  ??
 ??  ?? Figure 2: Easy2Boot OS selection menu
Figure 2: Easy2Boot OS selection menu
 ??  ?? Figure 1: Folders for different OSs
Figure 1: Folders for different OSs
 ??  ?? Figure 3: Ubuntu boot menu
Figure 3: Ubuntu boot menu

Newspapers in English

Newspapers from India