Ventoy Persistence Plugin

Many distros (like Ubuntu/MX/LinuxMint ...) provide feature for persistence. This allows saving any changes you make to the live system, so that they are still present the next time you boot to it. In normal case, we create a separate partition to do this which is not so flexible.
Now Ventoy brings a new feature here. You have no need to create any partition, no need to add persistent boot parameter. Just put a persistence data file in the 1st partition and tell Ventoy by the json configuration, and that's all.
You can put many different data files for different iso files at a time. You can also share a data file between different iso files as long as it can be supported by the distros. Even you can specify more than one data files to an iso file, Ventoy will provide a menu to choose before boot.

  • Supported Distros

Ubuntu and those distros based on them. Tested list: (Updating)

Distros Tested ISO Label Notes
Ubuntu ubuntu-20.04-desktop-amd64.iso casper-rw
MX Linux MX-19.1_x64.iso MX-Persist
LinuxMint linuxmint-19.3-xfce-64bit.iso casper-rw
elementary OS elementaryos-5.1-stable.20200405.iso casper-rw
Zorin Zorin-OS-15.1-Core-64-bit-r2.iso casper-rw
Kaspersky Rescue Disk krd18.iso casper-rw
  • Json Configuration

A persistence array is defined to describe the configuration in /ventoy/ventoy.json.

{
    "persistence": [
        {
            "image": "/ISO/MX-19.1_x64.iso",
            "backend": "/persistence/MX-19.1_x64.dat"
        },
        {
            "image": "/ISO/ubuntu-20.04-desktop-amd64.iso",
            "backend": [
                "/persistence/ubuntu_20.04_1.dat",
                "/persistence/ubuntu_20.04_2.dat",
                "/persistence/ubuntu_20.04_3.dat"
            ],
            "autosel": 2
        },        
        {
            "image": "/linuxmint-19.3-xfce-64bit.iso",
            "backend": "/persistence/linuxmint_19.03.dat",
            "autosel": 1            
        }
    ]
}

Key Type Description
image STRING The full path of the iso file
backend STRING or ARRAY The persistence backend image file path for the iso file. Can be a single string or string array.
autosel INTEGER Optional. If you set it, that means you auto select the corresponding option in the prompt menu. And the prompt menu will NOT be shown.
0: boot without persistence backend image file
1: boot with the 1st persistence backend image file
2: boot with the 2nd persistence backend image file
......
  • Dual Mode

Supported. You can set different configurations for Legacy BIOS mode and UEFI mode. Please refer Dual Mode Option for details.

  • Backend Image File

The backend image file is a disk image with a label. You can directly download the created image files or create it by yourself.
Download
You can download created image files from https://github.com/ventoy/backend/releases
Create
I have provided a CreatePersistentImg.sh script here.
Download it and just run sudo sh CreatePersistentImg.sh in the linux shell, by default a persistence.dat file will be created with size=1GB fs=ext4 label=casper-rw.

sh CreatePersistentImg.sh  [ -s SIZE_IN_MB ] [ -t FSTYPE ] [ -l LABEL ]   for example:

sh CreatePersistentImg.sh                 ---->  persistence.dat in 1GB size and ext4 filesystem and casper-rw label
sh CreatePersistentImg.sh -l MX-Persist   ---->  persistence.dat in 1GB size and ext4 filesystem and MX-Persist label
sh CreatePersistentImg.sh -s 2048         ---->  persistence.dat in 2GB size and ext4 filesystem and casper-rw label
sh CreatePersistentImg.sh -s 4096 -t xfs  ---->  persistence.dat in 4GB size and xfs  filesystem  (ext2/3/4 xfs are supported)  and casper-rw label

  1. When creating the image file and copy to USB, take care about the buffer. (can use sync to flush the data to the disk)
  2. Different distros use different Labels by default, for example ubuntu use casper-rw and MX Linux use MX-Persist, you can use -l to set it
  3. The backend image file must be put in the first partition. It can be in the root directory or any subdirectory.
  4. Once you have made a backend image file, you can compress and save it as a template in your computer (very small after compressed).
  • Prompt Before Boot (1.0.12+)

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