<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ventoy on Douglas Domingos :: CompSci@UFCG</title><link>https://dougdomingos.netlify.app/tags/ventoy/</link><description>Recent content in Ventoy on Douglas Domingos :: CompSci@UFCG</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Wed, 20 Nov 2024 18:49:01 -0300</lastBuildDate><atom:link href="https://dougdomingos.netlify.app/tags/ventoy/index.xml" rel="self" type="application/rss+xml"/><item><title>Creating a Multiboot USB Drive with Ventoy</title><link>https://dougdomingos.netlify.app/posts/multiboot-usb-with-ventoy/</link><pubDate>Wed, 20 Nov 2024 18:49:01 -0300</pubDate><guid>https://dougdomingos.netlify.app/posts/multiboot-usb-with-ventoy/</guid><description>Introduction During a deploy of our custom Linux Mint images in one of the labs at UFCG, I&amp;rsquo;ve learned about Ventoy – an interesting tool for creating bootable USB drives. Of all the tools I&amp;rsquo;ve used for this task (like Rufus and Etcher), Ventoy catched my interest for three reasons:
It does not require flashing the ISO into the USB drive It allows you to add multiple ISO files to the USB drive, without tweaking with disk partitions It allows you to choose which image to boot from at startup Ventoy is also very easy to install and use, as it provides packages with graphical interface for Linux, so you don&amp;rsquo;t have to worry with cryptic shell commands.</description><content>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>During a deploy of our custom Linux Mint images in one of the labs at UFCG, I&amp;rsquo;ve
learned about &lt;a href="https://www.ventoy.net/en/index.html">Ventoy&lt;/a> – an interesting
tool for &lt;strong>creating bootable USB drives&lt;/strong>. Of all the tools I&amp;rsquo;ve used for this
task (like Rufus and Etcher), Ventoy catched my interest for three reasons:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>It does not require flashing the ISO&lt;/strong> into the USB drive&lt;/li>
&lt;li>It allows you to &lt;strong>add multiple ISO files&lt;/strong> to the USB drive, without
tweaking with disk partitions&lt;/li>
&lt;li>It allows you to &lt;strong>choose which image to boot from at startup&lt;/strong>&lt;/li>
&lt;/ol>
&lt;p>Ventoy is also very easy to install and use, as &lt;strong>it provides packages with
graphical interface&lt;/strong> for Linux, so you don&amp;rsquo;t have to worry with cryptic shell
commands. But that&amp;rsquo;s boring, so we&amp;rsquo;re going to get our hands dirty anyways
&amp;#x1f971;&lt;/p>
&lt;h2 id="how-ventoy-works">How Ventoy works?&lt;/h2>
&lt;p>While installing Ventoy on an USB drive, it will create two main partitions:&lt;/p>
&lt;ul>
&lt;li>The EFI partition (formatted as &lt;code>FAT&lt;/code>), where Ventoy&amp;rsquo;s bootloader and
configurations are stored, and only 32MB in size&lt;/li>
&lt;li>The main partition (usually formatted as &lt;code>exFAT&lt;/code> or &lt;code>FAT32&lt;/code>), where you can
place your ISO files&lt;/li>
&lt;/ul>
&lt;p>When booting from the USB drive, &lt;strong>Ventoy&amp;rsquo;s bootloader will look for ISO files&lt;/strong>
inside the main partition and &lt;strong>list them at the boot menu&lt;/strong>. Please note that
the disk layout may vary, depending on whether you choose the
&lt;a href="https://www.ventoy.net/en/doc_disk_layout.html">MBR&lt;/a> or
&lt;a href="https://www.ventoy.net/en/doc_disk_layout_gpt.html">GPT&lt;/a> partitioning scheme.&lt;/p>
&lt;h2 id="using-ventoy-on-linux">Using Ventoy on Linux&lt;/h2>
&lt;p>As mentioned before, we&amp;rsquo;ll be installing Ventoy through CLI – like &lt;em>real&lt;/em> Linux
users would. So, you&amp;rsquo;ll need to download the binary packages (e.g.
&lt;code>ventoy-1.0.XX-linux.tar.gz&lt;/code> file), which are avaliable at
&lt;a href="https://sourceforge.net/projects/ventoy/files/">SourceForge&lt;/a>. I recommend
unpacking the tarball at &lt;code>/opt&lt;/code> for convenience.&lt;/p>
&lt;p>Inside the package, you&amp;rsquo;ll see a bunch of executable files. Since we won&amp;rsquo;t use a
graphical interface, our focus is in the &lt;code>Ventoy2Disk.sh&lt;/code> script.&lt;/p>
&lt;blockquote>
&lt;p>If you wish to install Ventoy using a graphical interface, &lt;strong>execute one of
the files labeled with the &lt;code>VentoyGUI&lt;/code> prefix&lt;/strong>. Please note that you have to
choose &lt;strong>the executable with the same architecture as your machine&lt;/strong> (e.g.
&lt;code>VentoyGUI.x86_64&lt;/code> for 64-bit machines).&lt;/p>
&lt;p>You may also &lt;strong>use an Web UI&lt;/strong> by executing the &lt;code>VentoyWeb.sh&lt;/code> and opening
your browser at &lt;code>http://localhost:24680&lt;/code>&lt;/p>
&lt;/blockquote>
&lt;p>If you plan to use Ventoy frequently, it might be interesting to &lt;strong>add the
executables to your &lt;code>$PATH&lt;/code>&lt;/strong>. For that, I have an article on how to install
packages manually on Linux, which you can find
&lt;a href="https://dougdomingos.github.io/v2/posts/installing-packages-in-opt">here&lt;/a>.&lt;/p>
&lt;h2 id="installing-ventoy-on-a-usb-drive">Installing Ventoy on a USB drive&lt;/h2>
&lt;p>Now that we have the package set up on our machine, let&amp;rsquo;s take a look on how to
use &lt;code>Ventoy2Disk.sh&lt;/code>. After running the script without any arguments, we get the
following output:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>[...]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Usage: Ventoy2Disk.sh CMD [ OPTION ] /dev/sdX
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> CMD:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -i install Ventoy to sdX (fails if disk already installed with Ventoy)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -I force install Ventoy to sdX (no matter if installed or not)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -u update Ventoy in sdX
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -l list Ventoy information in sdX
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> OPTION: (optional)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -r SIZE_MB preserve some space at the bottom of the disk (only for install)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -s/-S enable/disable secure boot support (default is enabled)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -g use GPT partition style, default is MBR (only for install)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -L Label of the 1st exfat partition (default is Ventoy)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> -n try non-destructive installation (only for install)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Although the text is pretty straightforward, we need to find &lt;strong>which device is
our USB drive&lt;/strong> – specified by &lt;code>/dev/sdX&lt;/code>. For that, you can use the &lt;code>lsblk&lt;/code>
command to list all the block devices in the system. Here&amp;rsquo;s a sample output for
this command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span>user@host:~# lsblk
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>[...]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sda 8:0 0 238,5G 0 disk
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├─sda3 8:3 0 237,5G 0 part /
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>└─sda4 8:4 0 1G 0 part /boot/efi
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sdb 8:16 1 7,5G 0 disk
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├─sdb1 8:17 1 7,5G 0 part /media/dougsilva/Ventoy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>└─sdb2 8:18 1 32M 0 part
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>[...]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>USB devices are usually mounted at the &lt;code>/media&lt;/code> directory&lt;/strong>. In my case, the
USB drive is represented by &lt;code>sdb&lt;/code> device, so I must pass &lt;code>/dev/sdb&lt;/code> as the
installation device to the &lt;code>Ventoy2Disk.sh&lt;/code> script. Below are some examples on
how to configure your installation:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span># Install Ventoy on /dev/sdX. This will fail if Ventoy is already installed.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo ./Ventoy2Disk.sh -i /dev/sdX
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span># Force install on /dev/sdX, ignoring any existent Ventoy installation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo ./Ventoy2Disk.sh -I /dev/sdX
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span># Install on /dev/sdX while keeping a 500MB free space at the end of the device
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo ./Ventoy2Disk.sh -i -r 500 /dev/sdX
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span># Install on /dev/sdX with GPT partition style and labelling the main partition as &amp;#34;Multiboot USB&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo ./Ventoy2Disk.sh -i -g -L &amp;#34;Multiboot USB&amp;#34; /dev/sdX
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Please note that installing Ventoy &lt;strong>WILL ERASE ALL DATA FROM THE DEVICE&lt;/strong>, so
you should backup any important files from the USB drive before installation.
Also, while installing through command-line, &lt;strong>be careful to not mistake your
USB drive for another device&lt;/strong>.&lt;/p>
&lt;blockquote>
&lt;p>You can also use the &lt;code>fdisk -l&lt;/code> command to list the devices of your machine
with a more verbose output. This allows you to search for a device with &lt;code>grep&lt;/code>
(i.e. &lt;code>fdisk -l | grep &amp;quot;YOUR_DEVICE&amp;quot;&lt;/code>).&lt;/p>
&lt;/blockquote>
&lt;h2 id="booting-up-the-usb-drive">Booting up the USB drive&lt;/h2>
&lt;p>After the installation is complete, you can simply drag-and-drop your ISO files
into the main partition, reboot your machine and boot from the USB drive. If you
had no unpleasant surprises during installation, you should see the following
screen:&lt;/p>
&lt;p>&lt;img alt="Ventoy Menu screen" src="https://dougdomingos.netlify.app/images/ventoy-iso-menu.png" title="Ventoy Menu screen">&lt;/p>
&lt;p>From here, simply choose which ISO you wish to boot, and select the
&lt;code>Boot in normal mode&lt;/code> option. For more information about boot modes, read
&lt;a href="https://www.ventoy.net/en/doc_secondary_boot_menu.html">the documentation&lt;/a>.&lt;/p>
&lt;blockquote>
&lt;p>Some machines have &lt;strong>a hot key for entering the Boot Menu&lt;/strong> at startup, so you
don&amp;rsquo;t need to &lt;strong>manually change the boot order&lt;/strong> in your BIOS. Please check
out &lt;a href="https://www.disk-image.com/faq-bootmenu.htm">this list&lt;/a> for reference.&lt;/p>
&lt;/blockquote>
&lt;h2 id="considerations-about-secure-boot">Considerations about Secure Boot&lt;/h2>
&lt;p>Since Ventoy 1.0.76, &lt;strong>Secure Boot support is enabled by default&lt;/strong>. This means
that Ventoy should work &lt;strong>whether Secure Boot is enabled in your machine or
not&lt;/strong>.&lt;/p>
&lt;p>If Secure Boot is indeed enabled in your machine, you should see the screen
below when booting Ventoy for the first time. Please follow these instructions
in &lt;a href="https://www.ventoy.net/en/doc_secure.html">Ventoy&amp;rsquo;s documentation&lt;/a> on how to
allow Ventoy on Secure Boot.&lt;/p>
&lt;p>&lt;img alt="Ventoy&amp;rsquo;s Secure Boot prompt screen" src="https://dougdomingos.netlify.app/images/sb-first-boot.png" title="Ventoy's Secure Boot prompt screen">&lt;/p>
&lt;p>However, if you see &lt;strong>another error screen&lt;/strong> while booting Ventoy, &lt;strong>your system
may not support Ventoy on Secure Boot&lt;/strong>. As such, you&amp;rsquo;ll need to disable the
option in your Ventoy installation and your BIOS.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>Until now, Ventoy has proved to be a handy tool for testing Linux distributions
and keeping backup ISOs for system recovery. It&amp;rsquo;s easy to install and use, it&amp;rsquo;s
lightweight and also quite fast when compared to similar tools.&lt;/p>
&lt;p>While I have not tried installing a system through Ventoy, I plan to try it out
soon with Fedora, and if everything goes as expected, I may use it to setup a
dual-boot installation with Windows in the (not so) far future.&lt;/p></content></item></channel></rss>