Linux vDisk Boot Plugin

This plugin is used by Ventoy to boot vdisk file (vhd/vdi/raw ...with a Linux distro in it) on a real machine.
Both Legacy BIOS and UEFI are supported. The advantages of this model are:
  1. The Linux OS runs on a physical machine, not in a virtual machine, so there is no loss in efficiency.
  2. The Linux OS does not need a disk or partition, just in a file.
For example, Windows is your main OS, and you put some Ubuntu/Debian/Arch... VHD file in D:\
You can boot any of them as you want. If you don't need it anymore, just delete it as a normal file.

  • Supported vDisk Format

  1. Fixed size vhd (vhdx is not supported)
  2. Fixed size vdi
  3. Raw Disk Image

  • Supported Linux Distros (Updating)

Distro Test ISO Legacy BIOS UEFI Notes
In theory, other distros which use dracut/initramfstool/mkinitcpio to build initramfs are also supported.

  • Usage

  1. Install Linux to vDisk
  2. Create vhd/vdi with fixed size (dynamic type not supported) and install supported Linux distro into the vhd/vdi.
    You can make use of VirtualBox, the installation process is no different from normal installation.


    It should be noted that, when you boot the vdisk file with a real machine, the BIOS mode must be the same with when the Linux distro was installed.
    That is to say:
    If you installed the Linux distro by VirtualBox in UEFI mode, you must change your real machine to UEFI mode before boot it.
    If you installed the Linux distro by VirtualBox in Legacy BIOS mode, you must change your real machine to Legacy BIOS mode before boot it.

    Currently, many PC/laptop are UEFI mode by default. However, the VirtualBox is Legacy BIOS mode by default.
    You can change the VirtualBox BIOS mode as follows:

  3. run vtoyboot script in the Linux OS
  4. After install and boot into the linux distro. Run vtoyboot script to make some process to support Ventoy boot.
    vtoyboot is a project developed with Ventoy and released separately. Download its package from here:
    https://github.com/ventoy/vtoyboot/releases

    Put the downloaded package into the linux distro, decompress it and run vtoyboot.sh as root sudo sh vtoyboot.sh
    Note that vtoyboot will be updated to support more Linux distros and fix bugs, so please use the latest release.

  5. Copy to USB drive, change the suffix to .vtoy and boot with Ventoy
  6. After completing the first 2 steps, now you can copy the vdi/vhd file to the Ventoy USB drive and boot it.
    For facilitate identification and processing, you need to change the file suffix to .vtoy

    It is recommended to keep the original suffix while adding a .vtoy suffix. For example: CentOS7.vhd.vtoy   ubuntu20.04.vdi.vtoy   Manjaro.vhd.vtoy


  • Boot vDisk at Local disk by Ventoy

The manual above is for copy the vdisk file to the USB drive and boot with Ventoy. You can also use a custom boot menu to boot the vdisk file at local disk by Ventoy.
Please refer Menu Extension Plugin for details about the custom boot menu.

Add a menu like follows to ventoy_grub.cfg, only need to change my_vdisk_path to the absolute path of the actual file (from the root of that partition).

menuentry "Boot My Linux VHD" {    
    set my_vdisk_path="/VHD/mylinux.vhd.vtoy"
    
    if search -n -s vdiskhd -f "$my_vdisk_path"; then
        vtoyboot_common_func "($vdiskhd)$my_vdisk_path"
    else
        echo "$my_vdisk_path not found"
    fi
}