Ventoy – Creating a Persistent Live Bodhi Linux USB Drive

Ventoy – Creating a Persistent Live Bodhi Linux USB Drive

Revision for “Ventoy – Creating a Persistent Live Bodhi Linux USB Drive” created on May 1, 2023 @ 18:51:09

Title
Ventoy - Creating a Persistent Live Bodhi Linux USB Drive
Content
<h1>Creating a Persistent Bodhi Linux USB Drive using Ventoy</h1> <strong>Ventoy</strong> is a powerful tool for creating a bootable "live" Linux session on a USB drive. While Linux has the ‘<strong>dd</strong>’ function (a simple way to create a standard bootable/live USB), <strong>Ventoy</strong> takes this to the next level. Not only can it create a live USB drive, but it can also create a <em>persistent</em> 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, <strong>Ventoy</strong> 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 <strong>Ventoy</strong>, and creating a live USB drive with Bodhi Linux. The second part will cover creating a persistent USB drive with Bodhi Linux on it. <h2><strong>Contents</strong></h2> Part I <ol> <li>Create a Working Environment</li> <li>Download Ventoy</li> <li>Install Ventoy</li> </ol> Part II <ol> <li>Create a File Structure</li> <li>Create a File System</li> <li>Create a Json File</li> <li>Final Step</li> </ol> <h2>Part I</h2> <h3> 1. Create a Working Environment</h3> We suggest making it a  habit to <em>create</em> 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 (<a href="https://www.bodhilinux.com/a/thunar/">Thunar</a>/<a href="https://www.bodhilinux.com/a/pcmanfm/">PCManFM</a>/etc.). <em>Make</em> a directory in your home folder called <strong>ventoy</strong>. <pre>mkdir ventoy</pre> <img class="size-full wp-image-4634 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/mkdirventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="641" height="58" /> <em>Change</em> to the working directory we called <strong>ventoy</strong>. <pre>cd ventoy</pre> <img class="size-full wp-image-4631 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/cdventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="642" height="83" /> <h3><strong>2. Download Ventoy</strong></h3> To download Ventoy, you can either navigate to the project's Github <a href="https://github.com/ventoy/Ventoy">download page</a> using your preferred browser, or use the command line. <pre>wget https://github.com/ventoy/Ventoy/releases/download/v1.0.51/ventoy-1.0.51-linux.tar.gz</pre> <img class="size-full wp-image-4633 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/dlventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="642" height="39" /> <em>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</em> &nbsp; You should see something like this if the download was a success. <img class="size-full wp-image-4632 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/dlsuccessventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="642" height="254" /> <h3><strong>3. Install Ventoy</strong></h3> The file we downloaded is a <strong>tar.gz</strong> file. This is a compressed file that will need to be <em>uncompressed</em> for us to access its contents. <pre>tar -xvzf  ventoy-1.0.51-linux.tar.gz</pre> <img class="alignnone size-full wp-image-4640 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/decompressventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="642" height="56" /> This will output a list of all the files and folders from the compressed <strong>tar.gz</strong> file, <img class="size-full wp-image-4641 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/decompressoutputventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="642" height="419" /> and <em>create</em> a folder in your working directory called <strong>ventoy-1.0.51</strong>. To clarify, your working directory should now contain the <strong>tar.gz</strong> file we downloaded <em>and</em> a folder with the contents of the compressed file as below. <img class="size-full wp-image-4642 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/listdecompressedventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="650" height="54" /> The newly created <strong>ventoy-1.0.51</strong> contains the following files and folders: <img class="size-full wp-image-4643 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/lsfilesventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="642" height="87" /> Next we will install Ventoy on a USB drive using the <strong>Ventoy2Disk.sh</strong> script. In order to do this, we need to find the path to the USB drive by using the <strong>df </strong>command with the <strong>-h </strong>flag so that it is readable. <pre>df -h</pre> You should see something like this: <img class="size-full wp-image-4644 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/usbpathventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="642" height="198" /> The highlighted line shows the path to the USB drive: <strong>/dev/sdb1</strong>. Here we see it is mounted on <strong>media </strong>and is called <strong>Ventoy</strong>. Run the <strong>Ventoy2Disk.sh</strong> script and point it to the USB drive using the path we found by using the <strong>df </strong>command in the previous step. <em>Note: we only need the letters<strong> sdb </strong>- 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.</em> <pre>sudo sh ventoy-1.0.51/Ventoy2Disk.sh -i /dev/sdb</pre> <img class="size-full wp-image-4658 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/writetodriveventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="806" height="77" /> You should see the following warning: <img class="size-full wp-image-4660 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/warningventoypng.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="806" height="412" /> You will be prompted once more to confirm - <em>type</em> <strong>y</strong> then <em>press </em><strong>enter</strong>. After the installer runs, you should be greeted with a success message, below. <img class="size-full wp-image-4661 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/installwinventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="806" height="62" /> <h2></h2> <h2>Part II</h2> <h3><strong>1. Create a File Structure</strong></h3> Now that we have Ventoy successfully installed on the USB drive, next we need to <em>create</em> a file structure on it. <em>Create</em> three folders named <strong>ISO</strong>, <strong>persistence</strong>, and <strong>ventoy</strong>. <em>Note: Linux is case sensitive - note upper and lower case letters</em> <pre>mkdir /media/Ventoy/ISO persistence ventoy</pre> It should look like this: <img class="size-full wp-image-4664 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/threefoldersventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="800" height="332" /> <h3><strong>2. Create a File System</strong></h3> In the <strong>Ventoy</strong> folder (created when the tar.gz file was <em>decompressed</em>) is a file called <strong>CreatePeristentImage.sh</strong>. This script generates a <strong>.dat</strong> file that is a filesystem that will hold your persistent data. Properties of the <strong>.dat</strong> file can be set using flags, however for our purposes, the default setup will be fine. Default <strong>persistence.dat</strong> files are created with size=1GB fs=ext4 label=casper-rw. Simply run the script by doing: <pre>sudo sh CreatePersistentImage.sh</pre> <img class="size-full wp-image-4665 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/persistentimageventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="646" height="76" /> This should return something like the following: <img class="size-full wp-image-4666 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/persisimgwrtioventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="716" height="312" /> Additionally it should have generated a <strong>persistence.dat</strong> file in your working directory. The <strong>.dat</strong> file generated will be called <strong>persistence.dat</strong>; <em>rename</em> it <strong>bodhi-6.0.0-64.dat</strong>. <h3><strong>3. Create a Json File</strong></h3> Another file is required for persistence to work. <em>Copy</em> and <em>paste</em> the following into <a href="https://www.bodhilinux.com/a/leafpad/">Leafpad</a> (or your favorite text editor) and save it as <strong>ventoy.json</strong>. <pre><strong>{</strong> <strong>    "persistence": [</strong> <strong>        {</strong> <strong>            "image": "/ISO/bodhi-6.0.0-64.iso",</strong> <strong>            "backend": "/persistence/bodhi-6.0.0-64.dat"</strong> <strong>        }</strong> <strong>    ]</strong> <strong>}</strong></pre> <img class="size-full wp-image-4667 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/jstortextfileventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="618" height="204" /> <h3><strong>4. Finally </strong></h3> The last step is to put the generated<strong> bodh-6.0.0-64.dat</strong>, <strong>bodhi-6.0.0-64.iso</strong>, and <strong>ventoy.json</strong> files in the relevant folders as shown. <pre>tree /media/<em>user</em>/Ventoy/</pre> <em>Note: substitute your user name for</em> user <img class="size-full wp-image-4668 aligncenter" src="https://www.bodhilinux.com/trial/wp-content/uploads/2021/11/movefilesventoy.png?x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737&amp;x55737" alt="" width="666" height="352" /> Reboot, and you should have a persistent Bodhi Linux [library term="version"]-64 bit USB drive. Nice work! <a href="https://www.bodhilinux.com/">Bodhi Linux Home</a> <a href="https://www.bodhilinux.com/w/wiki/">Bodhi Linux – Wiki Home Page</a> <a href="https://www.bodhilinux.com/w/bodhi-linux-how-to/">Bodhi Linux – Wiki Table of Contents</a>
Excerpt


OldNewDate CreatedAuthorActions
May 1, 2023 @ 18:51:09 oblio
November 16, 2021 @ 19:16:45 oblio
November 16, 2021 @ 19:16:15 [Autosave] oblio
November 16, 2021 @ 18:47:26 oblio
November 16, 2021 @ 17:42:41 oblio
November 16, 2021 @ 17:41:20 oblio
November 16, 2021 @ 17:33:48 oblio
November 16, 2021 @ 17:18:42 oblio
November 16, 2021 @ 17:13:40 oblio
November 12, 2021 @ 14:54:44 oblio
November 12, 2021 @ 14:22:16 oblio
November 12, 2021 @ 14:16:59 oblio
November 12, 2021 @ 02:46:48 oblio
November 12, 2021 @ 02:32:03 oblio
November 12, 2021 @ 02:27:43 oblio
November 12, 2021 @ 02:23:59 oblio
November 12, 2021 @ 02:21:29 oblio
November 12, 2021 @ 02:16:13 oblio
November 12, 2021 @ 02:14:54 oblio
November 12, 2021 @ 02:13:07 oblio
November 12, 2021 @ 02:11:42 oblio
November 12, 2021 @ 01:46:36 oblio
November 12, 2021 @ 01:44:23 oblio
November 12, 2021 @ 01:36:48 oblio
November 11, 2021 @ 23:22:22 oblio
November 11, 2021 @ 21:36:11 oblio
November 11, 2021 @ 21:33:37 oblio
November 11, 2021 @ 21:23:21 oblio
November 11, 2021 @ 21:21:49 oblio
November 11, 2021 @ 21:21:20 oblio
November 11, 2021 @ 21:01:27 oblio
November 11, 2021 @ 20:55:07 oblio
November 11, 2021 @ 20:43:18 oblio
November 11, 2021 @ 18:02:26 oblio
November 11, 2021 @ 17:51:08 oblio
November 11, 2021 @ 17:35:06 oblio
November 11, 2021 @ 17:34:28 oblio
November 11, 2021 @ 17:27:20 oblio
November 11, 2021 @ 17:26:28 oblio
November 11, 2021 @ 17:09:21 oblio
November 11, 2021 @ 16:55:34 oblio
November 11, 2021 @ 16:35:38 oblio
November 11, 2021 @ 16:26:07 oblio
November 11, 2021 @ 15:17:43 oblio