Ventoy, multiboot DVD creator

Posted on do 04 februari 2021 in misc

Installer USB drives

Quick blog.

The other day, I was looking for a tool to create a USB drive with multiple installer ISOs on it. Mainly, I needed a Fedora installer DVD (for my laptop, to make the switch to btrfs), and a Red Hat Enterprise Linux 8.3 DVD to reinstall my dad's workstation (which currently runs CentOS 8, and is in need of actual RHEL).

There used to be a tool called Yumi to do this with, but their site is dead, and so is multiboot.org. I'm not even going to bother linking to them :/

Then, on some forum about multiboot DVDs, I read that their demise might have to do with something called "ventoy", which is being actively maintained and would make both obsolete. Or so they say.

Needless to say, I was intregued.

Ventoy

It was even better than I hoped. In ye olde days, the way I remember multiboot DVD creators worked, was to extract the contents of installer DVDs onto a USB drive, and slap some fairly fragile syslinux magic in front of it. From what I remember, this only worked with Linux and other *nix like operating systems (no Windows), but I could be wrong.

Ventoy does it completely differently. You run a script to prepare your USB device, which partitions it and installs a bootloader, and after that, litteraly the only thing you need to do is drop ISO files onto your USB disk. That's it.

After that, you can unplug it. You are now done.

Installing machines

Next, you fire up the machine you need to install, and hit F12 or whatever to make the boot menu pop up. Select your USB drive (which you have inserted into the machine), and wait for a few seconds. You should see a grub-like menu that allows you to pick one of the ISOs and boot from it to install your machine:

Very plain ventoy boot menu

As you can see, I have mine set up with Fedora, CentOS Stream 8, RHEL8 and even good old Windows 10. In order to not have to pick an ISO filename but a human-friendly description, you can drop a tiny ventoy.json file like below into a directory called ventoy containing something like this:

{
    "menu_alias": [
        {
            "image": "/archlinux-2021.01.01-x86_64.iso",
            "alias": "ArchLinux 2021.01.01"
        },
        {
            "image": "/CentOS-Stream-8-x86_64-20210126-dvd1.iso",
            "alias": "CentOS Stream 8 (20210126)"
        },
        {
            "image": "/debian-10.7.0-amd64-DVD-1.iso",
            "alias": "Debian 10.7.0 (Buster)"
        },
        {
            "image": "/Fedora-Workstation-Live-x86_64-33-1.2.iso",
            "alias": "Fedora 33 Workstation"
        },
        {
            "image": "/rhel-8.3-x86_64-dvd.iso",
            "alias": "Red Hat Enterprise Linux 8.3"
        },
        {
            "image": "/systemrescue-7.01-amd64.iso",
            "alias": "System Rescue 7.01"
        },
        {
            "image": "/ubuntu-20.10-desktop-amd64.iso",
            "alias": "Ubuntu Desktop 20.10"
        },
        {
            "image": "/Win10_1709_EnglishInternational_x64.iso",
            "alias": "Windows 10 installer"
        }
    ]
}

The above json makes the menu item for rhel-8.3-x86_64-dvd.iso show up as Red Hat Enterprise Linux 8.3, which is much better (and you can get it for free these days, did you know?)

Plugins

There are more plugins to configure. For example to add icons to your menu (like the Fedora logo for the Fedora DVD, or the Red Hat logo for the Red Hat ISO). It is also possible to add a raw image file containing an operating system and boot that, if I understand corractly. Haven't tried that yet though.

With the change we made above, my Ventoy menu now looks like this:

My Ventoy boot menu

With the additional menu_class and theme plugins and a little configuration, my menu looks like this:

My Ventoy boot menu with icons

Crowded, but nice ;)

To do this, you need to copy over the theme directory in the ventoy tarball onto your USB drive into the ventoy directory. Ventoy does not ship with all the icons I use, so you'll have to spend some cycles googling for them (I'm not sure if I can redistribute them, so I won't take the risk there). Just drop them into the /ventoy/theme/icons directory.

You have to call the Ubuntu logo ubuntu.png, the Windows logo windows.png, etc., and use the json below as ventoy.json. This has to do with the way the menu_class plugin works. I'll refer to their docs if you want to know more.

{
    "theme": {
        "file": "/ventoy/theme/theme.txt",
        "display_mode": "GUI",
        "ventoy_left": "5%",
        "ventoy_top": "95%",
        "ventoy_color": "#0000ff"
    },

    "menu_alias": [
        {
            "image": "/archlinux-2021.01.01-x86_64.iso",
            "alias": "ArchLinux 2021.01.01"
        },
        {
            "image": "/CentOS-Stream-8-x86_64-20210126-dvd1.iso",
            "alias": "CentOS Stream 8 (20210126)"
        },
        {
            "image": "/debian-10.7.0-amd64-DVD-1.iso",
            "alias": "Debian 10.7.0 (Buster)"
        },
        {
            "image": "/Fedora-Workstation-Live-x86_64-33-1.2.iso",
            "alias": "Fedora 33 Workstation"
        },
        {
            "image": "/rhel-8.3-x86_64-dvd.iso",
            "alias": "Red Hat Enterprise Linux 8.3"
        },
        {
            "image": "/systemrescue-7.01-amd64.iso",
            "alias": "System Rescue 7.01"
        },
        {
            "image": "/ubuntu-20.10-desktop-amd64.iso",
            "alias": "Ubuntu Desktop 20.10"
        },
        {
            "image": "/Win10_1709_EnglishInternational_x64.iso",
            "alias": "Windows 10 installer"
        }
    ],
    "menu_class": [
        {
            "key": "ubuntu",
            "class": "ubuntu"
        },
        {
            "key": "arch",
            "class": "arch"
        },
        {
            "key": "rhel",
            "class": "red-hat"
        },
        {
            "key": "Fedora",
            "class": "fedora"
        },
        {
            "key": "debian",
            "class": "debian"
        },
        {
            "key": "CentOS",
            "class": "centos"
        },
        {
            "key": "Win",
            "class": "windows"
        },
        {
            "key": "rescue",
            "class": "rescue"
        }
    ]

}

Note you have to specify a theme in ventoy.json in order to make the icons work.

Next?

Packaging?

This tool is actually so useful, I might actually package it, but I'm not 100% sure what the best way to do that would be: the delivery as a tarball containing all required pieces is a bit odd.

Maybe. Who knows.

Translation?

Some of the error messages ventoy provides you with are in Chinese. I might take a shot at translating some bits (not that I speak any Chinese, but Google Translate does).

Anyway, have fun!