Ventoy Auto Installation Plugin

Many distros provide unattended deployment solution. You just need to give a script or template for the installation.
For example, unattend xml for Windows, kickstart script for Redhat/CentOS, autoYast xml for SUSE, preseed script for Debian and so on.
In normal case, if you want to make an unattended deployment, you need to recreate a new iso file based on the original iso file, and add the script or template into the new iso file.
Now Ventoy brings a new feature here. You don't need to recreate a new iso file, just use the original one. You just need to put a script or template in the USB drive and tell ventoy, that's all. You can specify more than one scripts for an iso file at a time, ventoy will provide a menu to choose before boot. You can also update these scripts whenever you want.

  • Supported Distros (Updating)

In theory, as long as the distribution supports automatic installation through script or template, Ventoy can support it, but it takes time to test each one.

Distros Template Example Notes
Windows Unattend XML unattended.xml Windows
Deepin/UOS INI deepin.ini Deepin/UOS series
RHEL8/CentOS8 Kickstart script kickstart8.cfg Distros based on them are also supported.
RHEL7/CentOS7/Fedora Kickstart script kickstart7.cfg Distros based on them are also supported.
RHEL6/CentOS6 Kickstart script kickstart6.cfg Distros based on them are also supported.
Debian Preseed script preseed.cfg Debian series
Ubuntu Server (< 20.x) Preseed script preseed.cfg Earlier Ubuntu Server Edition
Ubuntu Server (20.x+) cloud-init cloud-init-user-data Ubuntu Server After 20.x Edition
SUSE autoYast XML autoYast.xml SLES and openSUSE

Attention! The sample script here is just for reference. You need to modify it for your hardware enviroment, especially the configuration for disk partition.

  • Json Configuration

Recommend to use VentoyPlugson, a GUI ventoy.json configurator. Refer VentoyPlugson
A auto_install array is defined to describe the auto installation configuration in /ventoy/ventoy.json.

{
    "auto_install": [
        {
            "image": "/abc/centos.iso",
            "template": "/ventoy/script/centos_kickstart.cfg"
        },
        {
            "image": "/ISO/cn_windows_server_2012_r2_vl_x64_dvd_2979220.iso",
            "template": [
                "/ventoy/script/windows_unattended1.xml",
                "/ventoy/script/windows_unattended2.xml",
                "/ventoy/script/windows_unattended3.xml",
                "/ventoy/script/windows_unattended4.xml",
                "/ventoy/script/windows_unattended5.xml",
                "/ventoy/script/windows_unattended6.xml"
            ],
            "autosel": 2
        },
        {
            "image": "/ISO/cn_windows_server_2016.iso",
            "template": [
                "/ventoy/script/windows_unattended7.xml",
                "/ventoy/script/windows_unattended8.xml",
                "/ventoy/script/windows_unattended9.xml"
            ],
            "autosel": 3,
            "timeout": 10
        },
        {
            "image": "/SLE-12-SP3-Server-DVD-x86_64-GM-DVD1.iso",
            "template": "/ventoy/script/suse_autoyast.xml"
        },
        {
            "parent": "/ISO/SUSE",
            "template": "/ventoy/script/suse_autoyast.xml"
        },
        {
            "image": "/ubuntu-16.04-server-amd64.iso",
            "template": "/ventoy/script/ubuntu_server.seed",
            "autosel": 1
        }
    ]
}

Key Type Description
image STRING The full path of the iso file. This option supports fuzzy matching, please refer About Path Matching
parent STRING The full path of the parent directory. All iso files under this directory will use the same template. The trailing slash must be removed.
template STRING or ARRAY The full path of the installation template for the iso file. Can be a single string or an array of strings.
autosel INTEGER Optional. If you set it, that means you auto select the corresponding option in the prompt menu. If not set, default is 1.
0: boot without installation template
1: boot with the 1st installation template
2: boot with the 2nd installation template
3: boot with the 3rd installation template
......
timeout INTEGER Prompt menu timeout. Optional, if you set it the value must be greater than or equal to 0
When greater than 0:
Prompt menu will be popped up, the default selected menu item is as described above, when timeout the corresponding menu item will be selected.

When equal to 0:
Prompt menu will be popped up, the default selected menu item is as described above, no timeout, will wait for user selection all the time.

When not set:
if autosel exist, then the corresponding menu item will be used and the prompt menu will NOT be popped up anymore.
if autosel not exist, it's the same as it set equal to 0.
  • Variables Expansion (1.0.77+)

When we do auto installation, there are some configurations in the installation script that cannot be fixed and hard-coded. The most common is the disk name or disk id.
For example, we set DISK0 or /dev/sda in the auto installation script file, but in some computer, it is not the right disk we want.
So this may install the OS to the wrong disk, or even to the disk where Ventoy is located.
Besides, sometimes we want to dynamically input some variables when install, for exmaple ComputerName UserName ...

So Ventoy supports Variables Expansion in the auto installation script since 1.0.77. The variables must be in $$XXX$$ format (XXX is the variables name).

Attention:
1. The auto installation script which contains variables must be in UTF-8 encoding.
2. The variables name XXX can only contain digits, underscores and letters. The length must be less than 63. For example: $$USERNAME$$
3. Each line in the script can only contain at most 1 variables.
4. For common variables, Ventoy will pop up a prompt box to prompt the user to enter the actual value of the variables.
5. For built-in variables, Ventoy will not pop up box and will automatically expand its value depend on its meaning.
6. All built-in variables name are begin with VT_, all common variables name can NOT begin with VT_.
7. Ventoy will automatically check whether the installation script contains variables or not.
8. Variables expansion will not modify the original installation script file in the Ventoy USB drive.

Built-in Variables Example Description
VT_WINDOWS_DISK_1ST_NONVTOY 0 The first non-Ventoy disk. According to the disk ID in Windows and can only be used in Windows unattend.xml.
VT_WINDOWS_DISK_1ST_NONUSB 1 The first non-USB disk. According to the disk ID in Windows and can only be used in Windows unattend.xml.
VT_WINDOWS_DISK_MAX_SIZE 1 The disk with the largest capacity. According to the disk ID in Windows and can only be used in Windows unattend.xml.
VT_WINDOWS_DISK_CLOSEST_XXX 2 The disk whose capacity most closest to XXX GB.
The XXX must be replaced with a specific value, for example VT_WINDOWS_DISK_CLOSEST_300 means the disk most closest to 300GB.
Can only be used in Windows unattend.xml.
VT_LINUX_DISK_SDX_1ST_NONVTOY sda The first non-Ventoy disk in sda sdb sdc ...
Only check disks whose name is sdX. Other disks whose name like hda/vda/nvme0n1 are not checked.
Can only be used in Linux installation script.
VT_LINUX_DISK_SDX_1ST_NONUSB sdb The first non-USB disk in sda sdb sdc ...
Only check disks whose name is sdX. Other disks whose name like hda/vda/nvme0n1 are not checked.
Can only be used in Linux installation script.
VT_LINUX_DISK_MAX_SIZE sdc The disk with the largest capacity.
Not limited to disks in sdX, all disks will be checked (e.g. hdX/vdX/nvmeX...).
Can only be used in Linux installation script.
VT_LINUX_DISK_CLOSEST_XXX sda The disk whose capacity most closest to XXX GB.
The XXX must be replaced with a specific value, for example VT_LINUX_DISK_CLOSEST_300 means the disk most closest to 300GB.
Not limited to disks in sdX, all disks will be checked (e.g. hdX/vdX/nvmeX...).
Can only be used in Linux installation script.


Prompt box for common variables:


unattend.xml




kickstart.cfg


  • Multi-Mode

Supported. You can set different configurations for different BIOS mode. Please refer Multi-Mode Option for details.

  • Prompt Before Boot (1.0.12+)

When you boot an iso file with auto installation config, a prompt will be shown. You can choose whether to use the auto installation template and which template to use for this time.