How to create bootable USB drive in Ubuntu

Brief: This tutorial shows the steps for actually installing Ubuntu Linux on an external US drive with the bootloader installed on the USB. It is NOT live USB set up. This USB will work as portable operating system and can be used on any computer system.

Let me recall a few things.

A live USB is used for testing the distribution. It is also used for installing Linux on computer hard disk. Normally, any changes you made to your live distribution is lost and this limits the usage of the live USB.

Several of It’s FOSS readers requested a tutorial on installing Linux on a USB. Not the regular live USB with persistence but the actual Ubuntu installed on a USB disk.

This means having a portable Ubuntu Linux on a USB that you can plug it in to any computer, use it, save your work on the USB like it was an actual hard disk.

The procedure does not seem very different from installing Ubuntu on actual hard disk. And this is where people make mistakes.

Problem with bootloader on UEFI systems

The one major problem with this setup is bootloader installation on UEFI systems. A system can only have one active ESP partition at a time and it causes issues.

While installing Linux, even if you choose the USB as the destination for bootloader, the existing ESP partition is still used for placing the EFI file for the new distribution.

ubuntu installation partition

Even if you choose to install bootloader on the external USB, it doesn’t work if hard disk already has an ESP partition

This means that the Linux installed on the external USB will be the last one to update and control the bootloader. This may create several problems like:

  • The system you used for installing Linux on USB may not boot and end up with grub error if you don’t have the Linux USB plugged in.
  • The Linux USB you created won’t boot on other systems because its EFI files are on the ESP partitions of the system which was used to install Linux on USB.

This fails the entire idea of having a portable Linux USB, right?

Worry not. I’ll share a neat trick for installing Ubuntu or other Linux distributions on a USB without messing up with the bootloader of the host system and the system on the USB.

Before you start following the tutorial, read it entirely and then go about doing it on your system.

Things to know before installing Linux on a USB

install-ubuntu-on-external-usb


The solution or workaround to the bootloader problem is that you do not let the installer know that there is already an ESP partition.

If you have a desktop PC, you may remove the hard disk and that could solve the problem but things will be difficult when it is a laptop. Removing the disk is out of question here.

An easier way out is to remove the ESP flag from the ESP partition before installing Linux on the USB and put it back after installation. This way, you fool the Ubuntu installer into thinking that there is no existing ESP partition and it will create and use a new ESP partition on the USB. The original ESP partition on the hard disk is untouched.

Clever trick, I know. Let me clear a few more doubts and add some suggestions:

  • You’ll need two USB keys. One for live USB and another one where Linux will be installed.
  • Use a USB of 4 GB for the live system and at least a 32 GB USB for the Linux USB.
  • highly recommend using USB 3.0 for both live USB and the actual Linux USB. USB 2.0 will be painfully slow for both installing and using Linux.
  • Even if you use USB 3, installing Linux will be multiple fold slower than normal Ubuntu installation. Have patience and time.
  • Using a Linux system from USB will always be slower than actual hard disk and SSD.
  • When you want to use the Linux USB on a system, you’ll have to go to the boot settings to boot from the USB (unless the system is set to boot from USB by default).
  • The Linux USB may not work with systems with secure boot enabled.

About the slower experience with Linux on USB, if your system has a thunderbolt port, I advise getting a thunderbolt SSD. I have a SanDisk SSD and when I used installed Linux on it, the experience was very smooth, almost like the SSD on the system.

Ubuntu USB drive: booting and installing Ubuntu from a USB drive

The free operating system Ubuntu has long been established as an attractive alternative to paid operating systems by Microsoft and Apple. The latest Ubuntu versions are available online as ISO files todownload free of charge. An ISO file is a digital image of everything saved on a CD/DVD. To install Ubuntu, the first thing you need to do is burn the ISO file onto a DVD or copy it to a USB stick. This guide explains how to create an Ubuntu USB drive and use it to boot or install the popular operating system.

Requirements for installing Ubuntu from a USB drive

Let’s start with the system requirements. For the latest Ubuntu version, make sure your PC has:

  • A 2 GHz processor
  • At least 4 GB of RAM (system memory)
  • At least 25 GB of hard drive space

To install Ubuntu from a USB drive, you also need a removable storage device with sufficient storage space (at least 4 GB). You’re now ready to convert your USB stick into an Ubuntu USB stick and use it to install the operating system. Here are the steps you need to follow.

Preparation: downloading Ubuntu and installing Linux Live USB Creator

Start by downloading the latest version of Ubuntu. Regular security and maintenance updates will be issued for version 18.04.3 LTS until 2023, making it a sensible choice. The ISO file is available to download for free from the official Ubuntu downloads page. The file is about 2 GB, so depending on your connection speed, the download might take a few minutes..

You now need to download Linux Live USB Creator and install it on your computer. The software provides a simple way of creating a bootable Ubuntu USB drive. The installation files are available from the official homepage of the open-source software provider. Once you have downloaded the file, execute it and follow the installation prompts:

  1. Choose the installer language.
  1. As recommended by the Setup Wizard, close any programs and applications that are running in the background. Click “Next”.
  1. Choose the installation path for the software.
  1. When you click “Install”, the program will be installed in the location you selected. This may take a few minutes.
  1. Click “Finish” to complete installation and open the program.

Creating your bootable Ubuntu USB drive

Before you begin, close any programs still running in the background, and then insert your empty USB drive into one of the USB ports on your computer. Now open Linux Live USB Creator and follow these steps:

  1. Choose your key in the first drop-down menu:
  1. In the second box, select the source of the boot file. To do this, click on “ISO/IMG/ZIP” and browse to locate the Ubuntu ISO file you downloaded:
  1. In Step 3, you have to select the persistence of the Ubuntu drive. The persistence setting defines how much space will be kept free on the USB drive to store your individual Ubuntu settings and system data. It means that the next time you boot Ubuntu directly from the USB drive, your previous settings will be retrieved. Setting the persistence at around 300 MB will ensure you have sufficient space for any system settings.
  1. In Step 4, you can continue with the pre-selected options. If your USB stick is not formatted as FAT32, you will need to tick the appropriate box. However, most USB sticks ship with the FAT32 file system.
  2. You can now launch the creation process by clicking the lightning bolt icon in Step 5.

Installing Ubuntu from your USB stick

You are now ready to actually install the Ubuntu operating system on your computer. Shut down your computer and insert the Ubuntu USB drive that you have just created. To install Ubuntu from the USB stick, you need to boot your computer from the drive. To do so, access the BIOS setup of your computer. Different computers and manufacturers use different ways of launching the BIOS. Usually, you have to press one of the following keys while the computer is booting: F2, Del, F10 or Enter.

Once inside the BIOS, you can tell the computer which drive to use when booting. If you select your hard drive, Windows will start up as normal. However, if you select the Ubuntu USB stick, you can choose whether you want to “Install Ubuntu” or “Boot Ubuntu from USB drive”. Use the arrow keys to select “Install Ubuntu” and press Enter to confirm. The Ubuntu installation wizard will now open.

  1. Firstly, choose your preferred system language.
  1. Click “Continue” to confirm, and in the next window select a keyboard layout:
  2. In the next step, you will be asked to choose the type of installation. “Normal installation” is the easiest and simplest option for most users.
  1. You can now choose one of two options: “Install Ubuntu alongside Windows” or “Erase disk and install Ubuntu”. The second option removes Windows and installs Ubuntu as the only operating system:
  1. If you choose to delete Windows and install Ubuntu as the only operating system, in the next step, you will be asked to enter a security key. After installation, you will be able to use the password to access Ubuntu.
  2. Whichever option you choose (“Install Ubuntu alongside Windows” or “Erase disk”), the installation wizard will guide you through the final step. The window displays which hard drive Ubuntu will be installed on, how much free space is available on this drive, and roughly how much space the installed Ubuntu system will take up. Finally, click “Install now” to install Ubuntu from your USB stick.
Next Post Previous Post
No Comment
Add Comment
comment url