How to Install and Use Ventoy (1.1.04) for Bootable USBs on Linux

Jarret B

Well-Known Member
Staff member
Joined
May 22, 2017
Messages
454
Reaction score
520
Credits
19,511
Ventoy turns a USB stick into a multi-boot drive. You install Ventoy once, then just copy ISO/WIM/IMG/VHD(X)/EFI files onto the USB and boot them from Ventoy’s menu—no re-imaging each time. It works with BIOS and UEFI, supports optional Secure Boot, and can use persistence via plugins.

I've done an article before on using Ventoy, but I didn't get into it too deeply. So, we should try it.

There are many additions you can use for Ventoy, so we can cover these.

Downloading Ventoy

To get Ventoy, you can go to the main website download page at 'https://www.ventoy.net/en/download.html'. For Linux, you need the file 'ventoy-1.1.04-linux.tar.gz'. Keep in mind that there is a listing for the SHA256 key as well as 'c77603e8b5cd51d75eb7dd54ea9bd2961c83c7fca8539541b86127f2e790673f '.

You’ll got to ‘sourceforge.net’ after you click on the download link. Make sure you click on the proper link for the Linux version or Ventoy at ‘sourceforge.net’.

The file you download should be the current version, mine is '1.1.04'. So, let's look at checking the SHA checksum and verify the download was correct.

Checking the Download

We need to go to the Downloads folder, or wherever you saved or moved the file. Create a file, one that has no similar filename and uses a valid name. For my example, I'll use 'SHA256SUM'. Inside the file, place the hash followed by a space and the filename. It should look like:

Code:
 c77603e8b5cd51d75eb7dd54ea9bd2961c83c7fca8539541b86127f2e790673f ventoy-1.1.04-linux.tar.gz

Save the file and exit your editor. Next, you'll test the file. Keep in mind that you can place multiple file names and hash information. Every time you run the command, it will check all files in the folder and compare them to the hash information, if it exists. So, you may get some error messages about files not having hash information. To perform the hash check:

Code:
sha256sum -c SHA156SUM

The result should show the message 'ventoy-1.1.04-linux.tar.gz: OK'.

Performing a checksum is completely up to you to check.

Extracting Ventoy

To extract the files, you can use the following commands:

Code:
tar xvf ventoy-1.1.04-linux.tar.gz
cd ventoy-1.1.04

Now you should have the extracted files and be ready to start. After installing Ventoy, all you need is a USB flash drive and a Linux Operation System ISO file.

Listing the files now, using 'ls', shows the extracted folders and files.

Now, you can use the following command to create a Ventoy USB:

Code:
sudo sh Ventoy2Disk.sh -i /dev/sdX

Replace 'X' with the device name for the USB drive. To see attached devices, you can use the command 'lsblk'. Just make sure you select the right one because the app will prompt you twice before it formats the device and you lose everything on it.

The different scripts are:
  • Ventoy2Disk.sh
  • VentoyWeb.sh
  • VentoyVlnk.sh
  • CreatePersistenceImg.sh
  • ExtendPersistenceImg.sh
  • VentoyPlugson.sh

NOTE: There is a VToyBoot script to allow the booting of VHD files. VToyBoot is addressed in another article.

Supported Images

Before we make the USB flash drive a Ventoy drive, we need to go over the images supported by Ventoy.

You can use any of:
  • ISO
  • WIM
  • VHD – requires images that are no longer available
  • VHDX – requires images that are no longer available
  • IMG
  • VTOY – requires images that are no longer available
  • EFI
These files can be on the Ventoy USB drive or can be on the local machine, but we'll get to that.

Ventoy2Disk

This is the main shell script that can make a Ventoy USB flash drive from a command-line.

Let's look at the parameters required for this script.

The command is:

Code:
sudo sh Ventoy2Disk.sh -i /dev/sdx

The '/dev/sdx' is used to specify which drive to install Ventoy. If you need to determine which disk it is, you can use the 'lsblk' command or even look in 'GParted'.

By default, the drive is a Master Boot Record (MBR) drive. If you want a GUID Partition Table (GPT) drive, then add the parameter '-g'.

If you need 'Secure Boot' support, use the parameter (-s) to enable it (which is the default), but can you can disable it by adding '-S'.

You can also preserve some space at the end of the partition by adding '-r MB_Size'. So, to reserve a gigabyte, you can add the parameter '-r 1000'.

VentoyWeb

'VentoyWeb' lets you install Ventoy to a USB flash drive from a Graphical User Interface (GUI), more accurately from a Web Browser. Figure 1 shows and example.

Figure 01.jpg

FIGURE 1

The only usable parameter for changing the default is the Port (-p Port_Number). The default Port number is '24680'.

From here, you can see that it automatically detected the USB flash drive on '/dev/sda'. The GUI also shows that the current version of Ventoy installed is 1.1.04 and it is the same on the flash drive. If there was a difference in the version, then you could click on the Update button to perform an update, losing no data that is already on the flash drive.

If the flash drive didn't have Ventoy already installed on it, then you can click on 'Install' to get it set up.

The GUI may also select the incorrect flash drive, so you may need to change the drive.

VentoyVlnk

The script will create a link to a supported image file on a local drive. When you boot the Ventoy flash drive, the user has a choice to open the link to the local file.

The parameters are:
  • -c IMAGE - the supported image
  • -l Vlink-file - gives information about the linked file
  • -v - verbose information
Once you enter the proper command, it creates a link that has 'vlnk' before the existing extension. For example, if I use the command 'sudo sh VentoyVlnk.sh -c ~/Downloads/linuxmint-22.1-xfce.iso', it will generate a file named 'linuxmint-22.1-xfce.vlnk.iso' in the current folder.

Once it creates the link, you can place it on the Ventoy flash drive, even in a folder.

If you use the '-l' parameter and specify the 'vlnk' file, it shows the location of the linked file and lets you know if the file exists.

Keep in mind that the image file must be local to the machine. When booting in Ventoy, it has no network ability to access remote files.

CreatePersistenceImg

When you boot an image from Ventoy, any changes you make or files you save do not remain after you reboot the system. You need to create a persistent drive to store changes to remain.

There are a few parameters that you can use:
  • -s file_size – size of the persistence file in MB
  • -t type_of_file_system – lets you specify a file system other than EXT4, which is the default
  • -l label_name – sets the label of the persistence filename
The default file system is EXT4, the default label is ‘casper-rw’ and the filename is ‘persistence.img’.

It creates the file in the folder where you run the ‘CreatePersistenceImg.sh’. Make sure you use ‘sudo’ to get elevated privileges.

Once created, copy the file to the ‘ventoy’ folder on the Ventoy flash drive. If the ‘ventoy’ folder doesn’t exist, you’ll need to create it.

Then you need to create a JSON file so the file uses by the menu item. An example follows:

Code:
{
    "persistence" : [
        {
            "image": "/linuxmint-22-mate-64bit.iso",
            "backend": "/persistence.dat"
        }
    ]
}

If you wanted to do multiple image files with persistence, the same persistence file, then use the following as an example:

Code:
{
    "persistence":[
        {
            "image": "/linuxmint-22-mate-64bit.iso",
            "backend":[
                "/persistence.dat"
            ]
        },
        {
            "image": "/Fedora-Workstation-Live-x86_64-30-1.2",
            "backend":[
                "/persistence.dat"
            ]
        }
    ]
}

At the boot menu, you will choose your Operating System (OS) that you added persistence to in the JSON file. After selecting the entry, you are then prompted whether to use the persistence.

You can have persistence for multiple image files on the menu, but they must all share the same persistence file.

NOTE: If you want true persistence that is separate to each OS, then you need to boot a VHD using VToyBoot. This will be an article following this one.

This has all been manually done, but we can use a GUI to set up the JSON file. The way to do it is to start the 'VentoyPlugson.sh' and select the Persistence Plugin from the left pane.

ExtendPersistenceImg

With this shell script, you can extend the size of the persistence data fail by a specified amount. The parameters to use are:
  • data_file - the datafile to extend the size
  • size_in_MB - how much the size needs to be increased in MB
An example is to extend a data file on a USB drive by increasing its size by 3 GB, or 3000 MB:

Code:
sudo sh ExtendPersistenceImg.sh /media/jarret/Ventoy/persistence.dat 3000

So, if the existing file is already 2 GB, then it is made 5 GB. This works if the format is the default of EXT4. If you use a different format, then the extension most likely will not work.

Once the extension is made, then you simply boot from the Ventoy flash drive and you will have extra space.

Keep in mind that the extension is nondestructive, so the data remains intact.

For extreme cases, you may want to shrink the persistence file. This is done by using a negative (-) value in the 'size_in_MB' parameter. Shrinking the file is also nondestructive, as long as the new size can hold the existing data.

VentoyPlugson

The 'Plugson' utility is a GUI based utility to manage the Ventoy flash drive. There are multiple options listed on the left to allow for various management.

The only parameter used is to specify the device location. The following is an example:

Code:
sudo sh ./VentoyPlugson.sh /dev/sda

Once you run it, you will get a message that you need to open a web browser and go to '127.0.0.1:24681'. Figure 2 shows an example.

Figure 02.jpg

FIGURE 2

The options available through 'VentoyPlugson' are:
  • Device Information - shows device information for the flash drive
  • Global Control Plugin - global settings, such as language, etc.
  • Theme Plugin - set info on a theme for the Ventoy menu at boot
  • Menu Alias Plugin - Set alias for menu if theme exists
  • Menu Tip Plugin - set tips for files or folders
  • Menu Class Plugin - set files as a specific class then associate an icon for each class
  • Auto Install Plugin - lets you add a script for unattended installation
  • Persistence Plugin - you can modify the persistence file and which images are associated with it
  • Injection Plugin - allows you to inject files or scripts into the image when booted
  • Boot Conf Replace Plugin - lets you set a conf file for booting with special hardware
  • Password Plugin - set a password for Ventoy or images
  • Image List Plugin - you can specify which folders to search for images, not just default to all
  • Auto Memdisk Plugin - use MemDisk mode when booting
  • DUD Plugin - allows the use of a Driver Update Disk to load special drivers at boot for the hardware
The basics of the 'VentoyPlugson' GUI is here, but to go into more detail would be for a very lengthy read.

Conclusion

This should give you a basic understanding of using Ventoy.

Being able to boot various Operating Systems from an image file is very handy instead of needing to reformat a drive over and over. This is a great way to quickly and easily test new Operating Systems, if Ventoy supports them.
 
Last edited by a moderator:



A search for that phrase did not reveal any additional articles. I only noticed because I wanted to link the previous Ventoy article for future readers. I chose that because it was pretty specific and unique.

Anyhow, I believe the prior article referred to is this one:


(I did not find VToyBoot in that article, nor by search.)
 
I have a second article dedicated to VToyBoot that will be next month
 
That'll help it make sense. How it was written, 'is addressed in', indicates it is already addressed or does with what I recall from English classes years ago. I suppose that it'll be appropriate longer and soon. After all, once you've done that article it will be addressed forever more.
 
Thank you Jarret.
 
Keep in mind that some distros may have trouble booting from Ventoy because they expect a physical root filesystem, which they won't find when the system is running from the squashfs in a loop-mounted ISO. In those cases, switching to Ventoy's Memdisk mode can help bypass the issue.
 


Follow Linux.org

Members online


Top