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 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 How to Install Linux OS on USB Drive and Run it On Any PC ).
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.
This guide is is an shorter update of the article Installing full LinuxMint 17.1 to a removable USB drive with Virtual Box in Windows 7 and it works with any Linux OS. I will use again Mint (19.3 “Tricia” – Xfce (64-bit)).
Environment and prerequisities
So, what we will need? My environment consist of :
- the host computer, i.e. PC where i will perform the process,. I’ll use my NB win Win 10 OS
- Installed Oracle WM VirtualBox with installed virtualbox extension pack (it is required for the USB version 2 support)
- 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
- Internet access
- and finally, of course, some USB flash disk. 10GB could be OK, but more is better. I will use SanDisk 32GB USB3.0
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|.
- Using the VirtualBox
createa new VM with following settings
Typehas to be 64-bit Linux
- Set RAM memory, more is better
- Do not create a Hard drive. The machine
boollike a live distroand after we will complete the installation of OS on USB we delete the VM. Therefore itdoes not need any VDI disk.
openVM Settings and set for your VM following parameters: goto System onthe Motherboard tab checkor change the bootingorder, where the Optical drive CDhas to be before Hard Disk
onthe Processor tab you may assign more vCPUas one insideof Display and set more Video Memory as 16MB, for example max 128MB goto Storage and map your preferred Linux ISO image to the Optical drive setupNetwork and set the network as bridged or Nat- edover your PC real net adapter, as the installation process will download some files finally, go to USB settings and map the USB flash disk to your VM.
- Close settings.
- 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
can notproceed). Open terminal and type clicommand: sudo su-b blkid whereyou should see device named sda1, the USB flash disk ifthe USB disk was not recognized, try to install the guest additions
- If the
usbdrive was recognized, we may start the main installation process, on Mint clicking on the “Install Linux Mint” desktop icon
- Go through all the installation steps as you usually do during the Linux installation (set language, keyboard, drive, time zone, name and passwords),
however, donot forget to set the /dev/sda1 (the USB) as the primary disk 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 course, alldata fromthe flash disk will be lost)
- 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.
Note: I prefer USBv3 port, and of course, do not forget in the computer’s BIOS enable booting from USB, or modify the booting sequence using the