No, we are not going to make a live pendrive, but install a Linux distro on a pendrive as if installing it on the internal disk of the computer, this will give us mobility like a live usb and versatility like a complete installation.
We can do this in many ways but to make it easy and safe even for the most newbies users we will use VirtualBox.
Virtual machine setup
- Start assistant to create a new virtual machine (New button).
- Type: Linux.
- Version: Ubuntu 64 bits.
- Memory size: enought but not to much (select intro the green stripe).
An example: my computer has 8Gb RAM, then select 3Gb.
- Hard drive: WE DO NOT ADD ANYONE (we see why later).
- Clic on Create.
After the virtual machine is created we ajust some parameters. We clic with right button over virtual machine and select Configuration:
- Storage: select CD and then CD with arrow icon to select the distro iso file like virtual CD.
- System: select Start order and move optical device as first one.
- USB: Enable USB controller (use 2.0).
Add usb stick where we are goint to install the distro (it must be plug to the computer).
- Accept changes and double click on virtual machine to start instalation.
- Follow the assistant instructions (very easy in any Ubuntu or derivatives).
- Select delete all the drive and use all of it. So it will create all the partitions in the right way for most types of computers.
- When installing ends it ask us to remove the CD and then play any key. We do it and switch the virtual machine off when we see BIOS screen.
At this point following operations must make in a real computer due to VirtualBox can boot usb devices.
- Close virtualbox and switch our computer off.
- First configure computer BIOS to boot from USB devices (In most computers you can access to the BIOS pressing ESC or F2).
- The computer will start like it was installed in internal disc, you can update the system, add software or files, configure whan you need... all will be there when you start this again in any computer.
Advantages and disadvantages
- This is a normal instalation and you can do all you can if you install it in the internal disc.
- If you need a driver like wifi one, you can start from another computer, install it and then start in your computer and wifi works.
- Your computer in your pocket, you can use it if there is a computer than you can boot from USB.
- You can clone it to another USB or internal disc with dd or tools like etcher.
- USB stick are usually smaller than internal disc, this limit you if you want to install a lot of software or add big files.
- Remember than USB stick is a solid state device. Don't complete fill to avoid writing in the same sectors all the time.
- USB ports are less faster than internal SATA ones, I recoment use USB 3.0 devices and ports.
- Don't remove the USB until the system finish to switch off. USB stick are more delicate than internal disc in this case.
- You can install the system in an internal disc with an easy assistant, you can use tools like systemback or clone it with clonezilla, for example.