Can I create a USB stick that has a permanent Ubuntu install with other bootable ISOs?
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