Guide to Creating a Multi-OS Bootable USB Flash Drive Using Ventoy

If you desire to generate a multi-boot USB flash drive containing several operating system images, Ventoy stands out as one of the perfect tools available. Ventoy facilitates the creation of a bootable USB drive where you can insert ISO images of the OS distributions that you require. When initiating a boot sequence from this USB drive, you have the option to select the operating system for installation on your machine, or which LiveCD image to boot from.

Generating a Multi-ISO Bootable Flash Drive via Ventoy

Ventoy is an unrestricted open-source instrument accessible on both Windows and Linux (https://github.com/ventoy/Ventoy/releases).

  1. Download the archive, extract it to a local drive, and run Ventoy2Disk.exe as an administrator;
  2. Select the USB flash drive you want to burn the Ventoy bootloader to and click Install;
  3. The USB drive will be cleared. By default, Ventoy creates an MBR partition table with two partitions: a small FAT32 partition for the EFI boot loader (based on grub2) and a large exFAT partition. This configuration allows the USB flash drive to boot on both BIOS and UEFI computers with Secure Boot. Almost any operating system can access the exFAT partition, and there is no maximum file size limit of 4 GB as with FAT32. You can change these settings in the Options menu.
  4. Now copy to the main partition of the Ventoy drive the ISO image files containing the operating system distros you need;
  5. When booting from this USB drive, the Ventoy GUI menu will appear with a list of available ISO images. By default, Ventoy will scan all directories and display a list of the ISO, WIM, VHDX, and IMG image files it has found. Create a .ventoyignore file in a folder to exclude it from scanning.
  6. You can proceed with the installation of any of the available operating systems in the ISO files, or boot from your LiveCD.

An error may occur when booting from a Ventoy flash drive on a computer with UEFI Secure Boot mode enabled:

Verification failed: 0x1A Security Violation

To fix this, you must add Ventoy keys to the computer’s MOK (Machine Owner Key).

  1. Click OK -> and press any key;
  2. Select Enroll key from disk;
  3. Then go to VTOYEFI -> select ENROLL_THIS_KEY_IN_MOKMANAGER.cer file
  4. Continue -> Yes -> Yes
  5. Restart your computer. With the Ventoy keys added to UEFI NVRAM, the computer will consider them trustworthy and continue booting from the USB key.

Ventoy can load ISO contents into RAM in several ways:

  • Normal mode — only the files needed to boot are loaded into RAM. This mode can cause boot problems with some ISO images and computers (especially those with legacy BIOSes).
  • Memdisk mode – The entire ISO image will be loaded into memory (you will need enough RAM on your computer). This boot mode is more stable and reliable.

Winboot mode allows to boot directly from the WIM Windows image.

For instance, in order for the WinPE-based images (like Hiren’s BootCD PE) to work correctly, I had to boot them in Memdisk mode on my computer. This can be achieved by pressing F1 followed by Ctrl + D. Doing so allows the entire WinPE ISO image to be loaded into memory:

Loading ISO file to memory

Employing Ventoy Extension Plugins

You have the ability to personalize your Ventoy multi-boot USB flash drive using plug-ins. The ventoy/ventoy.json file found in the data partition serves the purpose of customizing settings for the boot manager (please note that this file does not exist by default).

In the past, I provided a guide on how to manually boot a WinPE image in memdisk mode. Add the lines below to the ventoy.json file to make certain ISO images boot automatically in this mode:

{

"auto_memdisk": [

"/ISO/HBCD_PE_x64.iso",

"/ISO/Win11PE.iso"

]

}

Once you’ve done this, all the ISO images specified will always load in RAM.

In the control section, global options can be configured. For instance:

"control":[

{ "VTOY_DEFAULT_SEARCH_ROOT": "/ISO" }

{ "VTOY_WIN11_BYPASS_CHECK": "1" },

{ "VTOY_WIN11_BYPASS_NRO": "1" },

]

The Injection plugin permits the inclusion of extra files or archives such as drivers and tools in the setup environment.

{  

"injection": [

{

"image": "/ISO/win7.iso",

"archive": "/driver/win-driver.zip"

}

]

}

In the context of Windows PE, the chosen extracted archive will be found in the install environment under the drive label X:

The Auto_Install plugin provides the option to set up the auto installation of the OS. For Windows, it supports the unattended.xml answer file.

 "auto_install" : [

{

"image": "/ISO/windows_server_2022.iso",

"template": "/windows2022_unattended.xml"

}

]

For Linux, you can also create answer files: kickstart8.cfg (RHEL, Rocky, Centos) or preseed.cfg (Debian, Ubuntu).

Using plugins, you can customize the appearance of the Ventoy boot menu, use themes, add icons to ISO files and folders. etc.

Use the VentoyPlugson.exe tool to configure the Ventoy plugin parameters from the GUI. The tool generates the correct ventoy.json file and automatically saves it to the Ventoy data partition.

With Ventoy, you can do away with the need for multiple flash drives with different OS install images. All your distros can now be stored on a USB stick. To write a new image to the USB key, simply copy the ISO image file.


Posted

in

, ,

by

Tags: