Ventoy – Creating a Persistent Live Bodhi Linux USB Drive
Page Contents
Creating a Persistent Bodhi Linux USB Drive using Ventoy
Ventoy is a powerful tool for creating a bootable “live” Linux session on a USB drive. While Linux has the ‘dd’ function (a simple way to create a standard bootable/live USB), Ventoy takes this to the next level. Not only can it create a live USB drive, but it can also create a persistent USB drive to use as plug-and-go Operating System that allows saving files and configurations.
The basics are simple and the defaults will generally get you started. However, Ventoy is highly user configurable and allows a great deal of user control. Further still, it has the ability to create a live USB drive with more than one distro on it.
The first part of this tutorial will cover downloading and installing Ventoy, and creating a live USB drive with Bodhi Linux. The second part will cover creating a persistent USB drive with Bodhi Linux on it.
Contents
Part I
- Create a Working Environment
- Download Ventoy
- Install Ventoy
Part II
- Create a File Structure
- Create a File System
- Create a Json File
- Final Step
Part I
1. Create a Working Environment
We suggest making it a habit to create a new working directory for Ventoy. This will assist in keeping everything tidy, less confusing, and will ensure that all the files we need to create and use are all located in one place. We will primarily use the command line, but feel free to use a graphical file manager if you prefer (Thunar/PCManFM/etc.).
Make a directory in your home folder called ventoy.
mkdir ventoy
Change to the working directory we called ventoy.
cd ventoy
2. Download Ventoy
To download Ventoy, you can either navigate to the project’s Github download page using your preferred browser, or use the command line.
wget https://github.com/ventoy/Ventoy/releases/download/v1.0.51/ventoy-1.0.51-linux.tar.gz
Note: the version number is/was correct at the time of writing, however this has most likely changed by now, so double check on the downloads page
You should see something like this if the download was a success.
3. Install Ventoy
The file we downloaded is a tar.gz file. This is a compressed file that will need to be uncompressed for us to access its contents.
tar -xvzf ventoy-1.0.51-linux.tar.gz
This will output a list of all the files and folders from the compressed tar.gz file,
and create a folder in your working directory called ventoy-1.0.51. To clarify, your working directory should now contain the tar.gz file we downloaded and a folder with the contents of the compressed file as below.
The newly created ventoy-1.0.51 contains the following files and folders:
Next we will install Ventoy on a USB drive using the Ventoy2Disk.sh script. In order to do this, we need to find the path to the USB drive by using the df command with the -h flag so that it is readable.
df -h
You should see something like this:
The highlighted line shows the path to the USB drive: /dev/sdb1. Here we see it is mounted on media and is called Ventoy.
Run the Ventoy2Disk.sh script and point it to the USB drive using the path we found by using the df command in the previous step.
Note: we only need the letters sdb – any numbers that follow should be omitted from the path. Additionally, this must be run as sudo – the password for this is your Bodhi Linux logon password.
sudo sh ventoy-1.0.51/Ventoy2Disk.sh -i /dev/sdb
You should see the following warning:
You will be prompted once more to confirm – type y then press enter. After the installer runs, you should be greeted with a success message, below.
Part II
1. Create a File Structure
Now that we have Ventoy successfully installed on the USB drive, next we need to create a file structure on it. Create three folders named ISO, persistence, and ventoy.
Note: Linux is case sensitive – note upper and lower case letters
mkdir /media/Ventoy/ISO persistence ventoy
It should look like this:
2. Create a File System
In the Ventoy folder (created when the tar.gz file was decompressed) is a file called CreatePeristentImage.sh. This script generates a .dat file that is a filesystem that will hold your persistent data. Properties of the .dat file can be set using flags, however for our purposes, the default setup will be fine. Default persistence.dat files are created with size=1GB fs=ext4 label=casper-rw. Simply run the script by doing:
sudo sh CreatePersistentImage.sh
This should return something like the following:
Additionally it should have generated a persistence.dat file in your working directory. The .dat file generated will be called persistence.dat; rename it bodhi-6.0.0-64.dat.
3. Create a Json File
Another file is required for persistence to work. Copy and paste the following into Leafpad (or your favorite text editor) and save it as ventoy.json.
{ "persistence": [ { "image": "/ISO/bodhi-6.0.0-64.iso", "backend": "/persistence/bodhi-6.0.0-64.dat" } ] }
4. Finally
The last step is to put the generated bodh-6.0.0-64.dat, bodhi-6.0.0-64.iso, and ventoy.json files in the relevant folders as shown.
tree /media/user/Ventoy/
Note: substitute your user name for user
Reboot, and you should have a persistent Bodhi Linux 7.0.0-64 bit USB drive. Nice work!
Bodhi Linux Home
Bodhi Linux – Wiki Home Page
Bodhi Linux – Wiki Table of Contents