{"id":2405,"date":"2023-10-19T23:16:44","date_gmt":"2023-10-20T03:16:44","guid":{"rendered":"https:\/\/blog.lufamily.ca\/kang\/?p=2405"},"modified":"2023-10-19T23:16:45","modified_gmt":"2023-10-20T03:16:45","slug":"rescue-usb-using-ventoy","status":"publish","type":"post","link":"https:\/\/blog.lufamily.ca\/kang\/2023\/10\/19\/rescue-usb-using-ventoy\/","title":{"rendered":"Rescue USB using Ventoy"},"content":{"rendered":"\n<p>In a previous <a href=\"https:\/\/blog.lufamily.ca\/kang\/2020\/02\/22\/encrypted-live-usb-stick\/\" data-type=\"post\" data-id=\"856\">post<\/a>, I described how I created an encrypted USB as a mechanism to pass information to my sons should anything happen to myself or my wife during our vacation last year.<\/p>\n\n\n\n<p>Well we are about to go on another long trip, and I decided to streamline the process with <a href=\"https:\/\/www.ventoy.net\/en\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">Ventoy<\/a>.<\/p>\n\n\n\n<p>Instead of creating a custom Live image whenever a new Ubuntu distribution is released, I have decided to use Ventoy to separate the Linux distribution away from the encrypted data.<\/p>\n\n\n\n<p>Even though Ventoy supports persistence live distributions, I stayed away from them because I want to be able to replace the current distributions on the USB with new distributions with the least amount of work.<\/p>\n\n\n\n<p>Below are the instructions that I used to create this Ventoy USB in an Ubuntu desktop environment.<\/p>\n\n\n\n<p>Download Ventoy from <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/ventoy\/Ventoy\/releases\" target=\"_blank\">https:\/\/github.com\/ventoy\/Ventoy\/releases<\/a>. Since we are on an Ubuntu operating system, so we want to download the <code>tar.gz<\/code> file. Once the <code>tar.gz<\/code> file is downloaded, extract the file and you should have a <code>ventoy-X.Y.Z<\/code> subdirectory with <code>X.Y.Z<\/code> being the version number of Ventoy.<\/p>\n\n\n\n<p>Identify the target USB key device using the <code>lsblk<\/code> command (e.g. <code>\/dev\/sdb<\/code>) and goto the <code>ventoy-X.Y.Z<\/code> subdirectory and execute a command like the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo .\/Ventoy2Disk.sh -I -r 10000 \/dev\/sdb<\/code><\/pre>\n\n\n\n<p>The above command will reserve 10000 MB as a tail end partition which we can use for a LUKS (encrypted) partition. We can create this LUKS partition called Succession by using the <a rel=\"noreferrer noopener\" href=\"https:\/\/apps.gnome.org\/DiskUtility\/\" target=\"_blank\">GNOME Disks app<\/a>. We use a key that is at least 24 characters in length. It can be longer if you like but it becomes quite cumbersome to type.<\/p>\n\n\n\n<p>Mount the LUKS partition, and then copy the the private data to the LUKS partition which was previously named Succession. My private data resides on the <code>bigbird<\/code> host.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>scp -r bigbird:\/Volumes\/Personal\\\\ Information \/media\/kang\/Succession<\/code><\/pre>\n\n\n\n<p>After the copying is completed, ensure that the &#8220;Personal Information&#8221; directory has the proper permission set (e.g. <code>chmod 777 \"Personal Information\"<\/code>).<\/p>\n\n\n\n<p>Assuming that all the ISO images are in the ISO directory, copy all the ISO images by executing the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar cf - ISO | (cd \/media\/kang\/Ventoy; tar xvf - )<\/code><\/pre>\n\n\n\n<p>I included the following ISO images:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>clonezilla-live-3.1.0-22-amd64.iso<\/li>\n\n\n\n<li>kali-linux-2023.3-live-amd64.iso<\/li>\n\n\n\n<li>kali-linux-2023.3-live-arm64.iso<\/li>\n\n\n\n<li>ubuntu-22.04.3-desktop-amd64.iso<\/li>\n\n\n\n<li>ventoy-1.0.96-livecd.iso<\/li>\n\n\n\n<li>Win10_22H2_English_x64v1.iso<\/li>\n<\/ul>\n\n\n\n<p>Note that not all the above ISO images are required, but the live Linux distrbituions are convenient in case you want to access the emergency information in the Succession LUKS partition in a hurry. The other ISO&#8217;s are just handy to have.<\/p>\n\n\n\n<p>NOTE: When booting into a linux kernel with a PC with a discrete GPU that may not be compatible with a Live Distribution, you may need to use the <code>nomodeset<\/code> boot option.<\/p>\n\n\n\n<p>Below is a YouTube video I made that shows how to gain access to the private encrypted data on the USB.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/8lN2hfE4ruk?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-CA&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<\/div><figcaption class=\"wp-element-caption\">Booting from the USB on a gaming PC using a discrete GPU<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In a previous post, I described how I created an encrypted USB as a mechanism to pass information to my sons should anything happen to myself or my wife during our vacation last year. Well we are about to go on another long trip, and I decided to streamline the process with Ventoy. Instead of &hellip; <a href=\"https:\/\/blog.lufamily.ca\/kang\/2023\/10\/19\/rescue-usb-using-ventoy\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Rescue USB using Ventoy&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[111],"tags":[],"class_list":["post-2405","post","type-post","status-publish","format-standard","hentry","category-tech"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7V6i8-CN","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/posts\/2405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/comments?post=2405"}],"version-history":[{"count":7,"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/posts\/2405\/revisions"}],"predecessor-version":[{"id":2412,"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/posts\/2405\/revisions\/2412"}],"wp:attachment":[{"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/media?parent=2405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/categories?post=2405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lufamily.ca\/kang\/wp-json\/wp\/v2\/tags?post=2405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}