Tuesday, May 25, 2021

Create Multiboot USB Drives With Ventoy In Linux


Ventoy is a free, open source and cross-platform program to create multiboot USB drives in Linux and MS Windows. You don't need to format your USB devices over and over. Just create a bootable USB drive once and add as many as ISOs you want in future. Ventoy will automatically create the menu entries for the newly added ISOs and add them to the boot menu. Once you created the multiboot USB, boot your system with the USB drive, select the ISO you want to load and start using it in no time. It is that simple!

Features


Ventoy ships with dozens of useful features as listed below.

  •     Very easy to install and use.
  •     Fast (limited only by the speed of copying iso file).
  •     You don't need to extract the ISOs. Just boot from the ISO file directly.
  •     It supports Legacy + UEFI.
  •     Supports UEFI Secure Boot.
  •     Persistence storage support.
  •     You can create bootable drives with ISO files larger than 4GB.
  •     Almost all type of OSes are supported. The developer claims more than 200 ISO files have been tested with Ventoy.
  •     Auto installation supported. Meaning - you can add your template or script for unattended deployment. For instance, kickstart script for Redhat/CentOS, autoYast xml for SUSE, preseed script for Debian. Put a script or template in the USB drive and tell ventoy to use it for unattended installation. You can also update these scripts at any time. No need to create a new ISO file, just use the original ISO.
  •     Read-only to USB drive during boot.
  •     The normal usage of USB drives is unaffected. Meaning - you can use the USB drives for other purposes (E.g. File copy)
  •     Upgrade Ventoy when a new version is available without recreating the bootable USB drive again. Data nondestructive during version upgrade.
  •     No need to update Ventoy when a new distro is released.
  •     To add a new OS, just copy/paste the ISO into the USB drive. No need to start all over again.
  •     Supports Memdisk mode. On some machines the ISOs may not load. In such cases, you can use Memdisk mode. In this mode, Ventoy will load the whole ISO file into memory and then boot it.
  •     Plugin Framework.
  •     Native boot menu style for Legacy & UEFI.
  •     Cross-platform. It supports Linux and Windows.
  •     Free and Open source!!

    
Create Multiboot USB Drives With Ventoy In Linux

First, you need to find your USB drive name. Refer the following guide to learn different ways to find disk drive details in Linux.

# sudo fdisk -l

output:
[...]
Disk /dev/sdc: 14.54 GiB, 15597568000 bytes, 30464000 sectors
Disk model: Cruzer Blade    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4d924612

As you can see, the USB drive name is /dev/sdc.

Next, download the latest Ventoy script from the releases page.
Go to the location where you downloaded the script and extract it. I have extracted it in a folder named "ventoy" in Desktop. Cd into the Ventoy directory:

# cd ventoy

Now, run the following command to create multiboot USB drive:

# sudo sh Ventoy2Disk.sh -I /dev/sdc

 
You will be prompted to confirm the USB bootable creation process. Double check the USB drive name and type Y and press ENTER to continue:

***********************************************************
*                Ventoy2Disk Script                       *
*             longpanda  admin@ventoy.net                 *
***********************************************************

Disk : /dev/sdc
Model: SanDisk Cruzer Blade (scsi)
Size : 14 GB

Attention:
You will install Ventoy to /dev/sdc.
All the data on the disk /dev/sdc will be lost!!!

Continue? (y/n)y

All the data on the disk /dev/sdc will be lost!!!
Double-check. Continue? (y/n)y

Create partitions on /dev/sdc by parted ...
Done
mkfs on disk partitions ...
create efi fat fs /dev/sdc2 ...
mkfs.fat 4.1 (2017-01-24)
success
mkexfatfs 1.3.0
Creating... done.
Flushing... done.
File system created successfully.
writing data to disk ...
sync data ...
esp partition processing ...

Install Ventoy to /dev/sdc successfully finished.

After a few seconds, the multiboot USB drive will be created. The above command will create two partitions. You can verify it with fdisk command:

# sudo fdisk -l

Disk /dev/sdc: 14.54 GiB, 15597568000 bytes, 30464000 sectors
Disk model: Cruzer Blade    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9f2f0556

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sdc1           2048 30398463 30396416 14.5G  7 HPFS/NTFS/exFAT
/dev/sdc2  *    30398464 30463999    65536   32M ef EFI (FAT-12/16/32)

Now open your file manager and copy the ISO files in the first partition. Don't worry if you can't find which one is the first partition. Your file manager will display the first partition only.

Alternatively, go to the location where you saved ISO files and copy all ISO files from command line with rsync like below:

# rsync *.iso /media/$USER/ventoy/ --progress -ah

Please note that in some Linux distros, the USB might be mounted under "/run/media/" location.

Done! We have just created multiboot USB drive with Ventoy.

Boot your system with USB drive and you will be pleased with the Ventoy boot menu:


Share:

0 comments:

Post a Comment