The Issue
We want to convert our Ubuntu 20.04.1 LTS installation from BIOS to UEFI
Note
Before starting, we have to make sure that we have enough free disk space on the system disk (at least 1G, minimum 550MB probably will do as well)
There are many ways to
The Fix
1 Make sure the current hardware support both BIOS & UEFI, and the current Ubuntu installation is BIOS
Warning!!!: Before continuing, we must make sure that we have a full disk backup, although usually this type of conversion should not cause data loss, but there are still chances that data can get corrupted, so full disk backup is necessary.
2 Follow How to Convert Ubuntu 20.04.1 LTS OS disk from MBR to GPT/GPT to MBR without losing data to convert the disk first
(MBR with extent should not be an issue and should be able to be converted to GPT successfully)
Note 1: For this guide, we assume the disk we are converting is the only disk on the system, which means it is used for storing the operating system and user data
Note 2: For this guide, boot-repair-disk is preferred over Ubuntu Desktop Live (Although, we can use Ubuntu Desktop Live then install boot-repair on the live system too)
3 Boot from boot-repair-disk again
4 Launch GParted
5 Assume we only have one partition on the disk which is used for operating system itself and user data, we resize the partition then move the block with data to the end of the slide, so that we can have 550MB unallocated space at the beginning of the disk
6 Make sure the disk (partitions are unmounted first)
Click on Resize/Move button, Click on OK button on the warning screen, Click on the green Check button to commit the changes
7 Right Click on the unallocated space at the beginning, Click on New
8 For File system, Select Fat32, For Partition name, we enter EFI System Partition, Click on + Add button
9 Click on the green Check button to commit the changes
10 Right click on the fat32 partition that we have just created, Click on Manage Flags, Click on boot (boot and esp should be checked), Click on X Close button
11 Restart the system (Boot into BIOS/UEFI)
12 Change the settings to UEFI from BIOS
13 Boot from Boot Repair USB again
14 Click on No button if asked for updating the software
15 Click on the first button “Recommended repair (repairs most frequent problems)“
16 Carefully following the steps required by the Boot Repair software
17 When the boot repair is done without error, we need to restart the system (Remember to remove the bootable USB)
18 Now we should be able to boot into Ubuntu via UEFI