How to boot multiple ISO images from one USB drive on Linux

Last updated on January 25, 2021 by Dan Nanni

A bootable USB drive allows you to instantly run a full-fledged OS from the file system on the USB drive, rather than from the host computer's hard drive. Such capability is quite useful in various scenarios, for example, when you need to diagnose and repair a corrupted file system of a host computer, or when you want to test drive an alternative OS or the latest release of your favorite Linux distro before installing it. You can easily create a bootable USB by burning an ISO image on a USB drive with tools like Gparted or UNetbootin. There is nothing fancy.

However, for people like me who would like to try out all sorts of Linux distros and different releases of each distro for testing purposes, as part of writing tutorials, what would be nice is the ability to boot multiple ISO images from a single USB drive. However, a typical bootable USB drive or memory stick can only boot from a single ISO file stored on the drive. It is not only inconvenient as I need to re-format the USB drive with a new ISO file every time I need to boot from a different ISO file, but also quite wasteful as a typical USB drive has much bigger space than a single ISO image. Although it's possible to boot ISO files using GRUB, it's rather cumbersome to modify GRUB configuration each time you want to add a new ISO file to try. Also, the GRUB-based approach does not provide the portability of a USB drive.

What is Ventoy?

Ventoy is an open-source tool conceived to exactly fill this need: create a single USB drive for multiple ISO files. Essentially Ventoy is a multi-ISO bootloader. With Ventoy, you no longer need to format a USB drive again and again to boot from multiple ISO images. A single USB drive can hold more than one ISO files, and you can conveniently choose one of them from a boot menu. You got a new OS image you want to try? Simply copy it in the remaining space of your multi-boot USB drive, and instantly you get yourself one more boot option. Awesome! Isn't it?

Ventoy supports multiple boot options (x86 legacy BIOS, x86_64 UEFI, ARM64 UEFI and IA32 UEFI), as well as multiple disk image formats (ISO, WIM, IMG, VHD, VHDX, EFI), and can even boot secure-boot systems with keys. According to the official source, Ventoy has been tested for different OSes (Linux, Windows, UNIX, VMware, Xen, etc), and for more than 90% Linux distros registered in Distrowatch.com. That is pretty impressive to say the least. As you will see in this tutorial, the whole Ventoy setup is quite a breeze!

In the rest of the tutorial, I show you how to create a multi-boot USB device on Linux using Ventoy. Read on.

Install Ventoy on a USB Drive

In order to create a multi-boot USB drive, you need to install Ventoy on the USB drive. This is just one-time installation. Subsequently all you need to do is to copy or update ISO images on the USB drive as regular files. Ventoy on the USB drive will take care of the rest.

To install Ventoy on a USB drive, first plug in the drive to your computer. Do not mount the drive, and make sure there is nothing important in the drive as you will lose all data on the drive during Ventoy installation.

Download Ventoy tarball from the official website, and extract its content.

$ tar -xf ventoy-1.0.33-linux.tar.gz
$ cd ventoy-1.0.33

Run the installation script Ventoy2Disk.sh as follows. In this tutorial, it is assumed that the USB drive is mapped to /dev/sda. Replace it with your own.

$ sudo ./Ventoy2Disk.sh -i /dev/sda

Press y to continue. The USB drive will automatically be partitioned and Ventoy will be installed on the drive.

After installation, you can verify installation status and check installed Ventoy version with:

$ sudo ./Ventoy2Disk.sh -l /dev/sda

Upgrade Ventoy on a USB Drive

When a new version of Ventoy is released, you can upgrade the previously installed Ventoy as follows. Note that any ISO image files stored in the USB drive are not affected and remain safe during Ventoy upgrade.

$ sudo ./Ventoy2Disk.sh -u /dev/sda

Create a Multi-ISO USB Drive with Ventoy

During Ventoy installation, all previous disk partitions on the USB drive are destroyed, and two disk partitions are created on it. The 32MB-size partition holds Ventoy bootloader files. The rest of the space is allocated for the main partition, which will hold ISO image files.

In order to create a multi-ISO USB drive, all you have to do is to copy your ISO files to the main partition of the drive. As shown below, the main partition is mapped to /dev/sda1, and formatted with exFAT format.

1. Mount exFAT Disk Partition

To copy ISO files over to the main partition, you need to mount the partition first. To mount an exFAT-type partition, you need to install exFAT tools first, which are exFAT userspace filesystem implementation.

2. Copy ISO Files to Ventoy Disk Partition

Once exFAT tools are installed, you can mount the Ventoy's main disk partition as follows. The local mountpoint used is /mnt.

$ sudo mount -t exfat /dev/sda1 /mnt

Once the partition is mounted successfully, go ahead and copy your ISO images to the USB drive thru the local mount point. You can copy as many ISO files as the space of /dev/sda1 allows.

$ sudo cp /path/to/iso-file /mnt

Once all ISO files are copied over to the USB drive, unmount the partition with:

$ sudo umount /mnt

Note that unmount can take some time if the ISO files are in the disk cache and not flushed to the USB drive yet. Userspace file system tools such as exfat-fuse are rather slow. So wait patiently until the partition is fully unmounted. Only then are you ready to boot using those ISO files.

Boot Multiple ISO Files with Ventoy USB Drive

Now let's boot using the USB drive we created. As you expected, you will be greeted with a nice boot menu listing all the ISO files that you copy over to the USB drive. All you have to do is to choose one of them, and Ventoy will take care of the rest of booting process. Sweet!

I tested booting into two ISO images using Ventoy, and both worked perfectly.

CentOS 8:

Fedora Workstation Live 33:

Summary

In this tutorial I demonstrated a pretty nice tool called Ventoy, which can make your life easier when you are venturing from one OS to another and yet another. If you are a technician repairing a broken OS on many different platforms on a daily basis, Ventoy should be a must-have utility in your tool sets. What do you think?

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin (1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g).

Xmodulo © 2020 ‒ About ‒ Powered by DigitalOcean