Ventoy Menu Class Plugin

  • What is menu class

Ventoy use grub2's theme which has a class property in the menu. You can refer https://www.gnu.org/software/grub/manual/grub/grub.html for detail.
To be simply, you can define a class for the ISO files and show an icon in the boot menu. For example, you define a menu with class 'ubuntu' and put a ubuntu.png file in iconsdirectory under the theme directory. Then the icon can be shown in the menu as bellows:

  • Json Configuration

Recommend to use VentoyPlugson, a GUI ventoy.json configurator. Refer VentoyPlugson
A menu_class array is defined to describe the configuration in /ventoy/ventoy.json. Both image file and directory are supported.
Use key to specify a substring of the image file name and dir to specify the full path of a directory.

{
    "menu_class": [
        {
            "key": "MX-",
            "class": "mx"
        },
        {
            "key": "ubuntu",
            "class": "ubuntu"
        },        
        {
            "key": "CentOS-7-",
            "class": "centos"
        },
        {
            "parent": "/ISO/Linux/Arch",
            "class": "arch"
        },
        {
            "dir": "/ISO/Linux",
            "class": "linux"
        }        
    ]
}

Key Type Description
key STRING The key string. Ventoy will do a substring match (case sensitive) with the ISO name and this key. If this key is a substring of the ISO name, then the ISO menu will use the class. Only name of the ISO file will be used for match (not the full path)
parent STRING The full path of a directory. Ventoy will use the class for all the image files under this directory (not including its subdirectories).
Attention: The trailing slash must be removed (For example /ISO/abc is right, /ISO/abc/ is wrong).
dir STRING The full path of a directory. Ventoy will do a full string match (case sensitive) and use the class if matched.
Attention: The trailing slash must be removed (For example /ISO/abc is right, /ISO/abc/ is wrong).
class STRING menu class string (max length: 128)
  1. The class has higher position with higher priority
  2. The match for the key is something like strstr(iso_name, key)
  3. If you have huge number of ISO files in USB and define a long menu_class array, it will take a little long time to load Ventoy's boot menu.
  4. You need to set item_spacing item_padding item_icon_space and other variables in theme.txt for better display (Grub2 theme tutorial)

Built-in Class Description
vtoyret All the return to previous menu will use this class
vtoydir If none of the item in menu_calss match, Ventoy will use it as the default class for directory.
vtoyiso If none of the item in menu_calss match, Ventoy will use it as the default class for ISO file.
vtoywim If none of the item in menu_calss match, Ventoy will use it as the default class for WIM file.
vtoyimg If none of the item in menu_calss match, Ventoy will use it as the default class for IMG file.
vtoyefi If none of the item in menu_calss match, Ventoy will use it as the default class for EFI file.
vtoyvhd If none of the item in menu_calss match, Ventoy will use it as the default class for VHD(x) file.
vtoyvtoy If none of the item in menu_calss match, Ventoy will use it as the default class for vtoy file.
F4boot Please refer Special Notes
boot_windows F4 Localboot --- Search and boot Windows
boot_g4d F4 Localboot --- Search and boot Grub4dos
boot_disk F4 Localboot --- Boot the 1st/2nd/3rd local disk
boot_uefi F4 Localboot --- Search and boot BOOTX64.EFI
F5tool Please refer Special Notes
debug_menu_lang F5 Tools --- Menu Language Select
menu_lang_item F5 Tools --- Menu Language Select --- English/Chinese Simplified...
debug_temp_set F5 Tools --- Temporary Control Settings
debug_temp_win11_bypass F5 Tools --- Temporary Control Settings --- Bypass CPU/TPM/SecureBoot check when install Windows 11
debug_temp_win11_nro F5 Tools --- Temporary Control Settings --- Bypass online account requirement when install Windows 11
debug_temp_linux_remount F5 Tools --- Temporary Control Settings --- Mount Ventoy partition after boot Linux
debug_temp_second_menu F5 Tools --- Temporary Control Settings --- Show secondary boot menu
debug_power F5 Tools --- Power
debug_reboot F5 Tools --- Power --- Reboot
debug_halt F5 Tools --- Power --- Halt
debug_efisetup F5 Tools --- Power --- Reboot to EFI setup
debug_hwinfo F5 Tools --- Hardware Information
debug_krdlayout F5 Tools --- Keyboard Layouts
debug_kbd F5 Tools --- Keyboard Layouts --- QWERTY_USA/AZERTY/CZECH_QWERTY...
debug_resolution F5 Tools --- Resolution Configuration
debug_videomode F5 Tools --- Resolution Configuration --- Resolution Item (e.g. 1024x768x32)
debug_screen_mode F5 Tools --- Screen Display Mode
debug_text_mode F5 Tools --- Screen Display Mode --- Force Text Mode
debug_gui_mode F5 Tools --- Screen Display Mode --- Force Graphics Mode
debug_theme_select F5 Tools --- Theme Select
debug_theme_item F5 Tools --- Theme Select --- Theme Item
debug_json F5 Tools --- Check plugin json configuration (ventoy.json)
debug_control F5 Tools --- Check plugin json configuration (ventoy.json) --- Check global control plugin configuration
debug_theme F5 Tools --- Check plugin json configuration (ventoy.json) --- Check theme plugin configuration
debug_autoinstall F5 Tools --- Check plugin json configuration (ventoy.json) --- Check auto install plugin configuration
debug_persistence F5 Tools --- Check plugin json configuration (ventoy.json) --- Check persistence plugin configuration
debug_menualias F5 Tools --- Check plugin json configuration (ventoy.json) --- Check menu alias plugin configuration
debug_menutip F5 Tools --- Check plugin json configuration (ventoy.json) --- Check menu tip plugin configuration
debug_menuclass F5 Tools --- Check plugin json configuration (ventoy.json) --- Check menu class plugin configuration
debug_injection F5 Tools --- Check plugin json configuration (ventoy.json) --- Check injection plugin configuration
debug_automemdisk F5 Tools --- Check plugin json configuration (ventoy.json) --- Check auto memdisk plugin configuration
debug_imagelist F5 Tools --- Check plugin json configuration (ventoy.json) --- Check image list plugin configuration
debug_imageblacklist F5 Tools --- Check plugin json configuration (ventoy.json) --- Check image blacklist plugin configuration
debug_bootconf_replace F5 Tools --- Check plugin json configuration (ventoy.json) --- Check boot conf replace plugin configuration
debug_dud F5 Tools --- Check plugin json configuration (ventoy.json) --- Check dud plugin configuration
debug_pwd F5 Tools --- Check plugin json configuration (ventoy.json) --- Check password plugin configuration
debug_custom_boot F5 Tools --- Check plugin json configuration (ventoy.json) --- Check custom boot plugin configuration
debug_util F5 Tools --- Ventoy UEFI Utilities
debug_util_efidrv F5 Tools --- Ventoy UEFI Utilities --- Show EFI Drivers
debug_util_blinit F5 Tools --- Ventoy UEFI Utilities --- Fixup Windows BlinitializeLibrary Failure
sel_auto_install Prompt menu to select auto install script
sel_persistence Prompt menu to select persistence file
sel_wim Prompt menu to select winpe wim file
second_normal Secondary boot menu --- Boot in normal mode
second_wimboot Secondary boot menu --- Boot in wimboot mode
second_grub2 Secondary boot menu --- Boot in grub2 mode
second_memdisk Secondary boot menu --- Boot in memdisk mode
second_checksum Secondary boot menu --- File checksum
second_return Secondary boot menu --- Return to previous menu
  • Special Notes

All the submenus under F4 and F5 will inherit the built-in class of their parent menu. For example:
For F5 Tools ---> Check plugin json configuration (ventoy.json) --> Check theme plugin configuration
It has class of debug_theme debug_json and F5tool. So it will show debug_theme.png if exist or debug_json.png if exist or F5tool.png if exist.

  • Multi-Mode

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

  • Directory Level