{"id":5251,"date":"2019-12-31T14:19:09","date_gmt":"2019-12-31T13:19:09","guid":{"rendered":"https:\/\/nil.uniza.sk\/?p=5251"},"modified":"2020-01-08T08:46:13","modified_gmt":"2020-01-08T07:46:13","slug":"installing-linux-os-on-usb-drive-with-persistent-storage","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/installing-linux-os-on-usb-drive-with-persistent-storage\/","title":{"rendered":"Installing full Linux from Windows on USB with persistent storage"},"content":{"rendered":"<p>This guide will describe how to install a full Linux OS on an USB flash disk with permanent storage feature, i.e. the system does not lost your files after a reboot as usual live distribution does. The system is fully operable OS and transferable to any PC with all your installed and saved stuff. <\/p>\n\n\n\n<p>There are several ways how to do it, for example using two usb keys, or making a bootable live USB key and then performing the installation (as is for example decribed here <a href=\"https:\/\/www.tecmint.com\/install-linux-os-on-usb-drive\/\">How to Install Linux OS on USB Drive and Run it On Any PC<\/a> ). <\/p>\n\n\n\n<p>I will describe how to do it using the VirtualBox tool, that looks more safety   for me as I will not work with a real host computer disk drives.<\/p>\n\n\n\n<p> This guide is is an shorter update of the article  <a href=\"https:\/\/nil.uniza.sk\/en\/installing-full-linuxmint-171-removable-usb-drive-virtual-box-windows-7\/\">Installing full LinuxMint 17.1 to a removable USB drive with Virtual Box in Windows 7 <\/a>  and it works with any Linux OS. I will use again Mint (19.3 &#8222;Tricia&#8220; &#8211; Xfce (64-bit)).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Environment and prerequisities<\/h2>\n\n\n\n<p> So, what we will need?  My environment consist of : <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>the host computer, i.e. PC where i will perform the process,. I&#8217;ll use my NB win Win 10 OS<\/li><li>Installed <a href=\"https:\/\/www.virtualbox.org\">Oracle WM VirtualBox<\/a> with installed virtualbox extension pack (it is required for the USB version 2 support)<\/li><li>Dowloaded your preferred Linux OS iso image, we use it for the installation, as i said, i will use Mint 19.3 XFCE 64-bit<\/li><li>Internet access <\/li><li>and finally, of course, some USB flash disk. 10GB could be OK, but more is better. I will use SanDisk 32GB USB3.0<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Installation steps<\/h2>\n\n\n\n<p>Installation steps are quite simple.  We create a new Virtual Machine that will have attached live iso image inside of its CD, attached USB key as a permanent storage where we will install the OS (after live boot|.  <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Using the VirtualBox <gwmw class=\"ginger-module-highlighter-mistake-type-3\" id=\"gwmw-15784693463373398571701\">create<\/gwmw> a new VM with following settings<ul><li> <gwmw class=\"ginger-module-highlighter-mistake-type-3\" id=\"gwmw-15784693468238116143339\">Type<\/gwmw> has to be 64-bit Linux<\/li><li>Set RAM memory, more is better<\/li><li>Do not create a Hard drive. The machine <gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693479731921033477\">bool<\/gwmw> like a live <gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693479737549913891\">distro<\/gwmw> and after  we will complete the installation of OS on USB we delete the VM. <gwmw class=\"ginger-module-highlighter-mistake-type-3\" id=\"gwmw-15784693482687376551349\">Therefore it<\/gwmw> does not need any VDI disk.<\/li><\/ul><\/li><li><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693486350978746314\">open<\/gwmw> VM Settings and set for your VM following parameters:  <ul><li><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693488902346006981\">go<\/gwmw> to <gwmw class=\"ginger-module-highlighter-mistake-type-3\" id=\"gwmw-15784693488903964698490\">System<\/gwmw> <ul><li><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693497362458587315\">on<\/gwmw> the Motherboard <gwmw class=\"ginger-module-highlighter-mistake-type-3\" id=\"gwmw-15784693497364214037018\">tab check<\/gwmw> or change the <gwmw class=\"ginger-module-highlighter-mistake-type-2\" id=\"gwmw-15784693497366908869621\">booting<\/gwmw> order, where the Optical <gwmw class=\"ginger-module-highlighter-mistake-type-3\" id=\"gwmw-15784693497363829089073\">drive CD<\/gwmw> has to be before Hard Disk<\/li><li> <gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693502164763135844\">on<\/gwmw> the Processor tab you may assign more <gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693502162139028743\">vCPU<\/gwmw> as one <\/li><\/ul><\/li><li><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693509140376022214\">inside<\/gwmw> of Display and set more Video Memory as 16MB, for example max 128MB<\/li><\/ul><ul><li><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693515483888260601\">go<\/gwmw> to  Storage and map your preferred Linux ISO image to the Optical drive<\/li><li><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693527056706330173\">setup<\/gwmw> Network and set the network as bridged or Nat-<gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693527052675665592\">ed<\/gwmw> over your PC real net adapter, as the installation process will download some files<\/li><li><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693533460063639800\">finally<\/gwmw>, go to USB settings  and map the USB flash disk to your VM.<\/li><li>Close settings. <gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693536685944214178\">s<\/gwmw><\/li><\/ul><\/li><li> Start your VM machine that will boot as the Live Linux. Wait till the system boot. Check if the USB flash disk have been mounted and is correctly recognized within the VM machine (it is required and without it we <gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693551616467233723\">can not<\/gwmw> proceed). Open terminal and type <gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693554492299770286\">cli<\/gwmw> command:<ul><li><code><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693556569157987760\">sudo<\/gwmw> <gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693556560746178016\">su<\/gwmw> -b<br><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693558156390013595\">blkid<\/gwmw><\/code><\/li><\/ul><ul><li><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693561918123256367\">where<\/gwmw> you should see device named sda1, the USB flash disk<\/li><li><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693566624353847568\">if<\/gwmw> the USB disk was not recognized, try to install the guest additions<\/li><\/ul><\/li><li>If the <gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693573386858872182\">usb<\/gwmw> drive was recognized, we may start the main installation process, on Mint clicking on the &#8222;Install Linux Mint&#8220; desktop icon<\/li><li>Go through all the installation steps as you usually do during the Linux installation (set language, keyboard, drive, time zone, name and passwords), <br><strong><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784693586454555605299\">however<\/gwmw><\/strong>,<br><span style=\"background-color:#ffff00\" class=\"background-color\"><gwmw class=\"ginger-module-highlighter-mistake-type-1\" id=\"gwmw-15784694084994681555867\">do<\/gwmw> not forget to set <\/span><strong>the \/dev\/sda1<\/strong> (<span style=\"background-color:#ffff00\" class=\"background-color\">the USB) as the primary disk <\/span>drive where  during the installation files will be copied . If something (other systems or files) was saved on your USB, select the Erase disk option (of <gwmw class=\"ginger-module-highlighter-mistake-type-3\" id=\"gwmw-15784693605638493123795\">course, all<\/gwmw> data <gwmw class=\"ginger-module-highlighter-mistake-type-3\" id=\"gwmw-15784693605632440677617\">from<\/gwmw> the flash disk will be lost) <\/li><li>Once the installation has finished, we are done. Shutdown and delete your live VB VM machine. And use your USB key with your new OS.<\/li><\/ol>\n\n\n\n<p>Note: I prefer USBv3 port, and of course, do not forget  in the computer&#8217;s BIOS enable booting from USB, or modify the booting sequence using the <code><strong>F12 key<\/strong><\/code>.<\/p>","protected":false},"excerpt":{"rendered":"<p>This guide will describe how to install a full Linux OS on an USB flash disk with permanent storage feature, i.e. the system does not lost your files after a reboot as usual live distribution does. The system is fully operable OS and transferable to any PC with all your installed and saved stuff. There&#8230;<\/p>","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[685],"tags":[1408,965,1407,1406],"class_list":["post-5251","post","type-post","status-publish","format-standard","hentry","category-linux_-_howto-en","tag-howto","tag-linux","tag-permanent","tag-usb"],"taxonomy_info":{"category":[{"value":685,"label":"Linux - HOWTO"}],"post_tag":[{"value":1408,"label":"howto"},{"value":965,"label":"linux"},{"value":1407,"label":"permanent"},{"value":1406,"label":"usb"}]},"featured_image_src_large":false,"author_info":{"display_name":"palo73","author_link":"https:\/\/nil.uniza.sk\/en\/author\/palo73\/"},"comment_info":10,"category_info":[{"term_id":685,"name":"Linux - HOWTO","slug":"linux_-_howto-en","term_group":0,"term_taxonomy_id":683,"taxonomy":"category","description":"","parent":0,"count":71,"filter":"raw","cat_ID":685,"category_count":71,"category_description":"","cat_name":"Linux - HOWTO","category_nicename":"linux_-_howto-en","category_parent":0}],"tag_info":[{"term_id":1408,"name":"howto","slug":"howto","term_group":0,"term_taxonomy_id":1406,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":965,"name":"linux","slug":"linux","term_group":0,"term_taxonomy_id":963,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw"},{"term_id":1407,"name":"permanent","slug":"permanent","term_group":0,"term_taxonomy_id":1405,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":1406,"name":"usb","slug":"usb","term_group":0,"term_taxonomy_id":1404,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/5251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=5251"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/5251\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=5251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=5251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=5251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}