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.
- Step 1: Create a Live USB or DVD
- Step 2: Prepare Your Computer
- Step 3: Boot from the Live USB or DVD
- Step 4: Start Ubuntu
- Step 5: Prepare the Target USB Drive
- Step 6: Create Partitions
- Step 7: Flag the Partitions
- Step 8: Install Ubuntu
- Step 9: Configure Partitions
- Step 10: Install Ubuntu
- Step 11: Complete the Installation
- Step 12: Re-install GRUB
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
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.
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!
No, you will need a USB device with at least 16GB of storage for the Ubuntu 20.04 installation.
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.
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.
Yes, you can use a different partition editor if you prefer. However, GParted is a commonly used and reliable tool for partition management.
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.
Yes, creating an optional /home partition is not mandatory. If you prefer, you can allocate all the remaining space to the root partition ("/").
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.
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.
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.
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.