on the search for instructions to create an ubuntu live stick with persistence I stumbled across Ventoy. This is a very cool tool to create a muti-boot USB stick. Basically what you do is, format a USB stick with Ventoy2Disk.sh
and then you simply copy iso files onto the stick. When you plug the stick into a PC and boot it choosing the stick as your boot device, it Ventoy will automatically provide a nice menu listing all your iso's to choose from. Simply choose an iso and boot it. Like this you can carray a single usb stick with many different ISO's on it around and boot the one you need each time.
but there is more! so called plugins let you customize ventoy and the behaviour of the boot menu. One of the plugins is a persistence plugin, where you can create persistence files and then assign them to iso images to store persitence data for the specific linux distro onto it. very cool! you can even add multiple persistence files for a single image and then choose from a sub-menu which one to use on each boot.
Ventoy is configured using a json file in the following path on the stick /ventoy/ventoy.json
. in there, you can configure all those plugins as described on the documentation
so here is an example. we will create a stick that contains the ubuntu desktop and ubuntu server image. after a timeout of 10 seconds, the desktop image will automatically boot with persistence enabled.
sudo Ventoy2Disk.sh -i /dev/sdc
where sdc is your memory stick. If you want to force-overwrite an existing ventoy stick use -I
(capital I instead of -i
)
sudo ./CreatePersistentImg.sh -s 2048
will create a new file called persistence.dat
in the current working directory. copy this file to the stick as well.
ventoy/ventoy.json
. here is the content which will do what I described above: { "persistence": [ { "image": "/ubuntu-20.04.1-desktop-amd64.iso", "backend": "/persistence_ubuntu.dat", "autosel": 1 } ], "control": [ { "VTOY_MENU_TIMEOUT": "10" }, { "VTOY_DEFAULT_IMAGE": "/ubuntu-20.04.1-desktop-amd64.iso" } ] }