Ubuntu – create a USB stick that has a permanent Ubuntu install with other bootable ISOs

bootisolive-usbpartitioningusb

Essentially I have a 32GB USB stick, and what I want to create (in an ideal world) is a stick that will contain :

  1. A permanent install of Ubuntu (not the 'Try Ubuntu', as I want to
    save drivers, applications, etc. to use each time).
  2. A few other bootable ISO images (Windows 8 install disk,
    Antivirus tools, System tools, etc.).
  3. And finally, have a separate space for general file storage.

-I have seen guides on how to create a proper install of Ubuntu on a USB device, so I can do that, but then I can't have my bootable ISO images on the same stick.

-I know about Your Universal Multiboot Installer (YUMI) Multiboot, which I haven't tried, but I believe I can use to install multiple bootable ISO images on the same USB stick, however this would only provide the 'Try Ubuntu' version of Ubuntu, so I would have to redownload applications, etc. every time I use it.

I'm sort of trying to create an incredibly multi-purpose USB stick for all eventualities.

Are my dreams possible?

I've had a search through google and the forum, and I can find answers to pieces of my puzzle, but not how to do it all together.

Could I partition my USB stick into three or four partitions and

  1. Do a full install of Ubuntu on one partition
  2. Use YUMI to put all the bootable ISO images on a second partition
  3. Use a third partition for general file storage?

Would that work?
Can I have two separate bootable partitions on a usb with YUMI on one of them? If so, any tips or advice would be appreciated.

Best Answer

A Two Partition Solution

You may be able to get by with 2 (or 3 if you want a Swap) partitions, one for the Full Ubuntu and another for data storage and exchange. Full Ubuntu will install GRUB by default. Modify GRUB to add extra entries that point directly to iso files stored in the first partition along with Ubuntu.

See How to boot from non-Ubuntu live ISO images like Fedora or CentOS? for more details about how to add ISO entries in the GRUB.

Method

First create a primary FAT32 partition in the beginning of the USB for storage. make it the size you want. Alternately, you may shrink the existing partition to the size of general storage partition you want. It is important that this be the first partition, as Windows will only recognize the first partition as the storage partition. The FAT32 format will ensure that it is compatible will most operating systems.

Second Install Ubuntu in the freed up empty space after the first partition. Also make sure the bootloader (GRUB) is installed in the correct USB and not in your hard drive or in the other USB if you are using a Live USB to do the installation from. Choose the whole disk for the GRUB installation. this will look like /dev/sdb, /deb/sdc etc. This will place grub in the MBR. Don't choose a partition such as dev/sdb1.

Third Makes sure everything works so far. Plug the USB into a Windows computer and verify that storage space is readable/ writable. Repeat with Ubuntu and other OSs.

Boot Ubuntu from the USB and make sure it works as expected.

Fourth: Two methods

Easy Method based on Ubuntu Documentation on GRUB2/ISOboot

Install grml-rescueboot

sudo apt-get install grml-rescueboot

Place bootable ISO files in the /boot/grml folder. For example, if the ISO file is in the Downloads folder, type:

sudo mv ~/Downloads/<filename.iso> /boot/grml/

Update GRUB:

sudo update-grub

Next time you boot from the USB, GRUB will have the menu entries for the Full install, as well as all the ISO files.

Manual Method / Hard Method

You may also follow the examples in How to boot from non-Ubuntu live ISO images like Fedora or CentOS? and Ubuntu Documentation ISOboot Examples and edit the file /etc/default/grub and one entry for the first ISO. Make sure the path to the ISO file is correct.

use sudo update-grub command to update the GRUB after editing and saving the /etc/default/grub file.

Repeat for the other ISO files.

Also see this forum post for some more details

Thanks to oldfred for the additional links.

Note: This method of editing GRUB to point to an ISO probably won't work with Windows ISOs.

Hope this helps