{"id":2768,"date":"2024-10-17T09:05:52","date_gmt":"2024-10-17T07:05:52","guid":{"rendered":"https:\/\/nothing2hide.org\/en\/?page_id=2768"},"modified":"2025-08-01T16:12:48","modified_gmt":"2025-08-01T14:12:48","slug":"3-flasg-drive-installation","status":"publish","type":"page","link":"https:\/\/nothing2hide.org\/en\/piguard\/3-flasg-drive-installation\/","title":{"rendered":"3. Flash drive installation"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This guide explains how to copy a Linux image onto a USB key from a Windows or Linux system.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/nothing2hide.org\/en\/wp-content\/uploads\/sites\/3\/2024\/10\/image-9.png\" alt=\"\" class=\"wp-image-2753\" srcset=\"https:\/\/nothing2hide.org\/en\/wp-content\/uploads\/sites\/3\/2024\/10\/image-9.png 1024w, https:\/\/nothing2hide.org\/en\/wp-content\/uploads\/sites\/3\/2024\/10\/image-9-300x200.png 300w, https:\/\/nothing2hide.org\/en\/wp-content\/uploads\/sites\/3\/2024\/10\/image-9-768x512.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The ISO image provided by Nothing2Hide<\/li>\n\n\n\n<li>A USB flash drive(at least 4 GB)<\/li>\n\n\n\n<li>A Windows or Linux computer.<\/li>\n\n\n\n<li>An external USB wifi adapter <a href=\"https:\/\/www.amazon.com\/ASUS-USB-AC53-Nano-Dual-Band-Compatible\/dp\/B071KV2SMV\/ref=sr_1_1?crid=2K0VXYSG0Y9C&amp;dib=eyJ2IjoiMSJ9.hslnIn5M8nhuJOErN3rypoWpDihq_yOLHU-M45qolhW_lEvW98Fo4VuBgTd4Vq9i6Y6E7fiUeHgDVQJ_subRxo6HNljx4IMpkxJCEFGu1NE07wClaONtIv7MO3WBdc-wRxo4B8Zz6xLh971N2wkvJl1e6ORgt5cOaE1Z8S2S_9Ezb_G_VdLVyEmGkCjpkWio0m9D-D1e89-5ORD5yqbgVLuOioCQO3HUkMn2Fau9Jrw.W1VkFfK3gylSda_UPikMTzLsfmGCYizREhZNY58dz_g&amp;dib_tag=se&amp;keywords=ac53+usb+wifi&amp;qid=1754055229&amp;sprefix=ac53+usb+wifi%2Caps%2C158&amp;sr=8-1\">Asus AC53<\/a> (or any wifi dongle atheros compatible)<\/li>\n\n\n\n<li>A text editor (for example, Notepad++ under Windows or nano\/gedit under Linux).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.<\/strong> Creating a Bootable USB flash drive for Windows<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To copy the ISO image onto the USB stick under Windows, we will use <strong>Rufus<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Download and install Rufus<\/strong><br>Go to <a href=\"https:\/\/rufus.ie\/\">the official Rufus website<\/a> and download the latest version.<\/li>\n\n\n\n<li><strong>Plug in the USB flash drive<\/strong><br>Insert the USB flash drive into your computer. Make sure it does not contain any important data, as it will be erased.<\/li>\n\n\n\n<li><strong>Launch Rufus<\/strong><br>Open Rufus and select your USB flash drive from the list of devices.<\/li>\n\n\n\n<li><strong>Select the ISO image<\/strong><br>Click <strong>Select<\/strong> and choose the ISO image you downloaded.<\/li>\n\n\n\n<li><strong>Configuration options<\/strong>\n<ol class=\"wp-block-list\">\n<li>Select the partition scheme to <strong>MBR<\/strong> (BIOS or UEFI compatible).<\/li>\n\n\n\n<li>Click <strong>Start<\/strong> to create the bootable USB flash drive.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Wait for the process to finish<\/strong><br>Once complete, the USB flash drive is ready to be used to boot into a computer.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.1.<\/strong> Creating a bootable USB flash drive under Linux<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To copy the ISO image to the USB stick under Linux, use the <code>dd<\/code> command:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Plug in the USB flash drive<\/strong><br>Insert the USB flash drive into your computer and identify its device name (for example <code>\/dev\/sdb<\/code>). You can use the <code>lsblk<\/code> command to check.<\/li>\n\n\n\n<li><strong>Copy the ISO image<\/strong>\n<ul class=\"wp-block-list\">\n<li>Use the following command to copy the ISO image onto the USB stick:<code>sudo dd if=\/path\/to\/your_image.iso of=\/dev\/sdX bs=4M status=progress &amp;&amp; sync<\/code><\/li>\n\n\n\n<li>Replace <code>\/path\/to\/your_image.iso<\/code> with the path to your ISO file and <code>\/dev\/sdX<\/code> with the correct name of your USB key (for example <code>\/dev\/sdb<\/code>). <strong>Warning:<\/strong> This command deletes all the data on the USB key.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Wait for the process to finish<\/strong><br>Once complete, the USB flash drive is ready to use.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.<\/strong> Modify the WireGuard Configuration File (<code>wg0.conf<\/code>)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now that the USB key is bootable with Linux, you need to configure WireGuard by modifying the <code>wg0.conf<\/code> file to add your own VPN account.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Boot on the USB flash drive<\/strong>\n<ul class=\"wp-block-list\">\n<li>Insert the USB flash drive into the target computer, reboot it, and access the boot menu (often via <code>F12<\/code>, <code>Esc<\/code>, or another key depending on the manufacturer).<\/li>\n\n\n\n<li>Select the USB key as the boot device.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Mount the USB Flash Drive Partition<\/strong> (if necessary):\n<ul class=\"wp-block-list\">\n<li>Log in with the user <em>piguard<\/em> (ask ofr the apsword to Nothing2Hide)<\/li>\n\n\n\n<li>The <code>wg0.conf<\/code> file is located in the <code>\/etc\/wireguard\/<\/code> directory on the USB flash drive.<\/li>\n\n\n\n<li>If the partition is not already mounted, you can mount it with the following command:<code>sudo mount \/dev\/sdX1 \/mnt<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p class=\"is-style-info wp-block-paragraph\">This step can be performed under Windows or Linux by plugging in the USB flash drive without rebooting and editing the file directly. On Windows, you will need to install third-party software to write to ext4.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the <code>wg0.conf<\/code> file with a text editor. For example, with <code>nano<\/code>:<code>sudo nano \/etc\/wireguard\/wg0.conf<\/code><\/li>\n\n\n\n<li><strong>Example<\/strong> <code>wg0.conf<\/code><strong>file<\/strong>:<br><code>[Interface] <\/code><br><code>Address = 10.0.0.1\/24 <\/code><br><code>PrivateKey = YOUR_PRIVATE_KEY <\/code><br><code>ListenPort = 51820 <\/code><br><br><code>[Peer] <\/code><br><code>PublicKey = PUBLICKEY_SERVER <\/code><br><code>AllowedIPs = 0.0.0.0\/0 <\/code><br><code>Endpoint = SERVER_VPN:51820 PersistentKeepalive = 25<\/code><\/li>\n\n\n\n<li>Replace <code>YOUR_PRIVATE_KEY<\/code> by your private key and <code>VPN_SERVER<\/code> by the address of your VPN server.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Save and Exit<\/strong><br>To save changes in <code>nano<\/code>, use <code>Ctrl+O<\/code>, then <code>Enter<\/code>, and exit with <code>Ctrl+X<\/code>.<\/li>\n\n\n\n<li><strong>Start WireGuard or reboot the computer<\/strong><br>Use the following command to start WireGuard:<code>sudo wg-quick up wg0<\/code><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Useful configuration files path<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>\/etc\/wireguard\/wg0.conf<\/em>: to edit the private key of the device<\/li>\n\n\n\n<li><em>\/etc\/hostapd\/hostapd.conf<\/em>:  to edit the wifi name and wifi password<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You now have a bootable USB stick with a minimalist Linux configured to work as a Wi-Fi access point, while encapsulating traffic in a WireGuard VPN. Make sure you follow these steps every time you want to update your WireGuard configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SSID: SecureTunnel<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pass: StrongPass!33<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide explains how to copy a Linux image onto a USB key from a Windows or Linux system. Prerequisites 1. Creating a Bootable USB flash drive for Windows To copy the ISO image onto the USB stick under Windows, we will use Rufus: 1.1. Creating a bootable USB flash drive under Linux To copy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2757,"parent":25,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"class_list":["post-2768","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/pages\/2768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/comments?post=2768"}],"version-history":[{"count":8,"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/pages\/2768\/revisions"}],"predecessor-version":[{"id":5243,"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/pages\/2768\/revisions\/5243"}],"up":[{"embeddable":true,"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/pages\/25"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/media\/2757"}],"wp:attachment":[{"href":"https:\/\/nothing2hide.org\/en\/wp-json\/wp\/v2\/media?parent=2768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}