A bootable USB is commonly used as an operating system installer. To create bootable USB download appropriate .iso,.dmg or .img file and then copy/unpack to a USB.
Commonly, at a time one ISO image is used in a USB and have to reformat drive each time to boot another Operating system. This will end up with many bootable USB drives to keep.
In this tutorial, I will explain how to create a multiboot USB in Linux using the Ventoy tool. This helps to use a single USB for multiple Operating system installations.
Install Ventoy on a USB Drive from Linux
To install Ventoy on a USB drive, first plug in the USB drive in your computer. I am using an Ubuntu 20.04 machine for this ventoy installation.
Please make sure there is nothing important in the drive! It may be you will lose all data on the drive during Ventoy installation.
Download latest Ventoy from the official GitHub repo:
Extract the .tar.gz file downloaded:
$ sudo tar -xf ventoy-1.0.39.linux.tar.gz
Go to the extracted directory:
$ cd ventoy-1.0.39
Now run the installation script that is placed in ventoy directory named as Ventoy2Disk.sh.
$ sudo ./Ventoy2Disk.sh -i /dev/sdb
/dev/XXX is the USB drive. In my case is in /dev/sdb
Press y two times to confirm that usb drive data will be lost.
After the successful installation, check the installed Ventoy version and status with the command:
$ sudo ./Ventoy2Disk.sh -l /dev/sdb
To upgrade ventoy, run:
$ sudo ./Ventoy2Disk.sh -u /dev/sdb
Now, check Ventoy created partitions on a USB drive and allocated space, type
$ sudo fdisk -l /dev/sdb
Two disk partition created on a USB drive:
- /dev/sdb1 - This presents the main partition, which needs to hold ISO image files for the OS and it's formatted with the exFAT format.
- /dev/sdb2 - This partition size of 32MB holds Ventoy bootloader files.
Create a single USB drive for multiple ISO files
Among other tools, Ventoy is one of the best tools to create a bootable USB drive. It supports creating a bootable USB drive with multiple ISO files (multiboot).
All you need to do is to copy ISO images on the USB drive as regular files and boot them directly from a USB drive. Ventoy supported files are ISO/WIM/IMG/VHD(x)/EFI.
01. Download ISO images
Download the appropriate iso images from the vendor website. In this example, I are going to use Ubuntu ISO image, and Pop OS ISO image.
02. Copy ISO images to USB Drive
To copy images to USB drive, usb drive has to be mounted as exfat filesystem.
On Linux, exFAT has been supported with a special implementation called fuse-exfat. In order to mount an exFAT drive on Linux, you need to install fuse-exfat.
Once exFAT installed, mount the usb drive partition ( in my case /dev/sdb1 ) with the following command:
$ sudo mount -t exfat /dev/sdb1 /mnt
Local mount point used is /mnt.
FUSE exfat 1.3.0
Copy as many ISO image files as long there is enough space on the USB drive.
Now copy the ISO files (for ubuntu and pop os) to local mount point /mnt
$ sudo cp /home/nikolao/Downloads/pop-os_20.10_amd64_intel_14.iso /mnt
$ sudo cp /home/nikolao/Downloads/ubuntu-20.04.2.0-desktop-amd64.iso /mnt
This can take some time, just be patient and wait. Once ISO files copied, unmount the drive.
To unmount, type:
$ sudo umount /mnt
That's all you need to do and Ventoy will give a boot menu to select them.
NOTE: A bootable device is only detected in a UEFI-supported laptop. If the user has enabled LEGACY support in the BIOS and if pc isn't detecting USB drive, then need to go and enable legacy support and disable safe boot mode.
Now you are ready to boot up multiple Linux or Windows distributions from a single USB drive.