Difference between revisions of "Custom Live USB"
m (→Ventoy: Add ventoy plugin doc link.) |
(see also) |
||
Line 77: | Line 77: | ||
} | } | ||
</source> | </source> | ||
+ | |||
+ | == See also == | ||
+ | *[[Create a LiveCD]] ''- legacy method from years ago'' | ||
+ | [[Category:Linux]] |
Revision as of 23:58, 30 January 2022
Contents
Custom ISO
It can be useful to customize an image to preinstall packages or pre-configure settings so that when the image gets live booted those packages are already installed and usable.
Ubuntu
CUBIC (Custom UBuntu Iso Creator) is a easy tool for customizing Ubuntu based distribution images such as Mint. The process gives you a virtual shell and you can install packages and configure the OS as you normally would, after doing this CUBIC packages it back up into an ISO. There appears to be many advanced options but for reinstalling applications and pre-saving data it is straight forward.
Debian
Looks like live-build is an option for customizing Debian ISOs but this method looks more difficult that CUBIC.
Multi ISO USB
Ventoy is a great tool if you would like to have multiple bootable ISOs on a single USB drive. Ventoy is fairly easy to use since it has a few scripts to handle things for you.
Ventoy Usage
- Download Ventoy from its releases.
- Run the the appropriate (for your architecture) Ventoy GUI program.
- Select your USB drive and flash it with the Ventoy software.
- Unplug and replug your USB drive.
- Copy any ISOs you like onto the drive (probably labeled "Ventoy").
- Boot into your usb and select the ISO you would like to boot from the menu.
Persistent Storage
Live images will not normally persist storage which can really limit their use-case, however there seems to be some options for solving this.
Partitioning/File
It seems possible for Ubuntu (and Debian?) distributions to persist storage through partitions or a file. It looks like if you partition your USB that has the ISO formatted on it with partitions labeled casper-rw and home-rw Ubuntu will detect these and use them as persistent storage. Alternatively it appears you can create a loopback file in the root directory that will be used as well, this file must be named casper-rw.
Ventoy
Ventoy has a plugin that allows you to use a persistent storage file for storing your data and this storage can be configured to be used across the images that support it's format.
Plug your Ventoy USB in and open a terminal and cd into your USB directory.
Run:
# Note: this will create the persistent file in whatever directory you run it so ensure you are in the mounted USB.
sudo /PATH/TO/VENTOY/CreatePersistentImg.sh -s <SIZE_IN_MB>
Note: You can do the next part manually if the UI scares you.
After that finishes change to your Ventoy installation directory and run:
# Note this script won't work if you are not in the right directory.
./VentoyPlugson.sh /YOUR/USB/MOUNT # e.g. /dev/sdb
Open your browser and navigate to http://127.0.0.1:24681 and configure the plugin by:
- Click Persistence Plugin on the left.
- Click Add down the bottom right.
- Fill the File Path with the path of your ISO inside the Ventoy USB.
- Fill the Dat Path with the path of the generated persistence file inside the Ventoy USB.
Once that is done reboot and choose the ISO from the menu then choose the with persistence option.
Manually Configure Ventoy
Instead of using the VentoyPlugson UI you can manually configure Ventoy to use the persistent storage file.
- Create the folder called ventoy in the root of your Ventoy USB if it doesn't already exist.
- Edit or create a file in there called ventoy.json.
- Modify the file to include the following JSON:
{
"persistence":[
{
"image": "/YOUR_IMAGE_NAME.iso",
"backend":[
"/persistence.dat"
]
}
]
}
See also
- Create a LiveCD - legacy method from years ago