Software & AppsOperating SystemLinux

How To Create a Full Install of Ubuntu 20.04 on USB: Step-by-Step Guide for BIOS and UEFI

Ubuntu 4

Creating a full install of Ubuntu 20.04 on a USB device that works in both BIOS and UEFI systems can be a complex process. This guide will walk you through the steps required to successfully complete the installation.

Prerequisites

Before we begin, you will need a USB device with at least 16GB of storage and a computer with internet access. You will also need to download the Ubuntu 20.04 ISO file from the official Ubuntu website.

Step 1: Create a Live USB or DVD

The first step is to create a Live USB or DVD. This can be done using tools like SDC, UNetbootin, mkusb, or dd. These tools allow you to burn the Ubuntu ISO file to a USB device or DVD, creating a bootable media.

Step 2: Prepare Your Computer

Turn off your computer and unplug it. If possible, unplug the power cable from the hard drive or remove the hard drive from your laptop. This step is to ensure that the installation process does not interfere with your existing operating system.

Step 3: Boot from the Live USB or DVD

Plug your computer back in and insert the Live USB or DVD. Boot your computer from the Live USB or DVD in BIOS mode. You can usually access the boot menu by pressing a key such as F12, F2, or Del during startup.

Step 4: Start Ubuntu

Once the Ubuntu boot screen appears, select your language and choose “Try Ubuntu”. This will start the Ubuntu live environment.

Step 5: Prepare the Target USB Drive

Insert the target USB drive into your computer. Open GParted, a pre-installed partition editor, and unmount any mounted partitions on the target USB drive.

Next, go to the Device tab and create a new GPT partition table on the target drive. This is necessary for the drive to be bootable in both BIOS and UEFI systems.

Step 6: Create Partitions

Now, you will create several partitions on the target USB drive:

  • A 3GB NTFS or FAT32 partition on the right side for optional Linux/Windows data storage.
  • A 1MB unformatted partition on the left side.
  • A 300MB FAT32 partition next to the 1MB partition.
  • A 7GB ext4 partition next to the 300MB partition.
  • An ext4 partition in the remaining space for an optional /home partition.

After creating these partitions, apply all operations.

Step 7: Flag the Partitions

Flag the 1MB partition as “bios_grub”. This partition will be used by the GRUB bootloader in BIOS mode.

Flag the 300MB partition as “boot,esp”. This partition will be used by the GRUB bootloader in UEFI mode.

Step 8: Install Ubuntu

Start the Ubuntu installation process by clicking on the “Install Ubuntu” icon on the desktop. Follow the prompts, selecting your language, keyboard layout, and wireless network (if applicable).

When you reach the “Installation type” screen, select “Something else” and click “Continue”. Under “Device for boot loader installation”, select the target USB drive.

Step 9: Configure Partitions

Next, you will configure the partitions you created earlier:

  • Select partition sdx4, click “Change”, choose “Ext4” as the file system, select “format this partition”, set the mount point as “/”, and click “OK”.
  • If you created a /home partition, select partition sdx5, click “Change”, choose “Ext4” as the file system, select “format this partition”, set the mount point as “/home”, and click “OK”.

Step 10: Install Ubuntu

Click “Install now” to start the installation process. You may be asked to confirm the partitions to be formatted. After confirming, the installation will proceed.

Step 11: Complete the Installation

After the installation is complete, do not reboot or unplug the USB device. Instead, copy the “boot” and “EFI” folders from the Ubuntu ISO file to the “boot,esp” partition (sdx3).

If there are any permission issues, open Nautilus using the command sudo -H nautilus and try copying again.

Step 12: Re-install GRUB

Finally, re-install GRUB by running the following commands in a terminal:

sudo mount /dev/sdx3 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sdx

The sudo mount /dev/sdx3 /mnt command mounts the “boot,esp” partition to the /mnt directory. The sudo grub-install --boot-directory=/mnt/boot /dev/sdx command installs GRUB to the target USB drive.

Conclusion

You have now created a full install of Ubuntu 20.04 on a USB device that works in both BIOS and UEFI systems. Remember to safely eject your USB device before removing it from your computer. Enjoy your portable Ubuntu system!

Can I use a USB device smaller than 16GB for the installation?

No, you will need a USB device with at least 16GB of storage for the Ubuntu 20.04 installation.

Can I use a DVD instead of a USB device?

Yes, you can create a bootable DVD using the Ubuntu 20.04 ISO file instead of a USB device. The process is similar to creating a bootable USB.

Do I need to remove my existing operating system before installing Ubuntu?

It is not necessary to remove your existing operating system. However, it is recommended to unplug the power cable from the hard drive or remove the hard drive from your laptop to prevent any interference during the installation process.

Can I use a different partition editor instead of GParted?

Yes, you can use a different partition editor if you prefer. However, GParted is a commonly used and reliable tool for partition management.

Do I need to flag the partitions as mentioned in Step 7?

Yes, flagging the partitions as "bios_grub" and "boot,esp" is necessary for the GRUB bootloader to work correctly in both BIOS and UEFI systems.

Can I skip creating an optional /home partition?

Yes, creating an optional /home partition is not mandatory. If you prefer, you can allocate all the remaining space to the root partition ("/").

Can I install Ubuntu on a USB device without affecting my internal hard drive?

Yes, the installation process will only affect the USB device you choose as the target drive. It will not make any changes to your internal hard drive.

Do I need to copy the “boot” and “EFI” folders after the installation?

Yes, copying the "boot" and "EFI" folders from the Ubuntu ISO file to the "boot,esp" partition is necessary for the bootloader to function correctly.

What should I do if I encounter permission issues when copying the folders?

If you encounter permission issues, open Nautilus (the file manager) with administrative privileges using the command sudo -H nautilus, and try copying the folders again.

Can I install other software and make changes to the installed Ubuntu system on the USB device?

Yes, you can install additional software and make changes to the installed Ubuntu system just like you would on a regular installation. However, keep in mind that the USB device may have limited storage and performance compared to a regular hard drive installation.

Leave a Comment

Your email address will not be published. Required fields are marked *