How to Fix Ubntu Eufi Boot
This guide walks you through fixing Ubuntu UEFI boot problems, from checking firmware settings to reinstalling GRUB. Whether your system won’t boot or shows a black screen, these proven steps will help restore access.
Key Takeaways
- Verify UEFI mode is enabled: Ensure your system is set to UEFI mode in the BIOS/UEFI firmware, not Legacy/CSM.
- Check EFI partition integrity: A missing or corrupted EFI system partition (ESP) is a common cause of boot failure.
- Reinstall GRUB for UEFI: Use a live USB to chroot into your system and reinstall GRUB with the correct UEFI parameters.
- Use Boot-Repair tool for quick fixes: This automated tool can resolve many UEFI boot issues without manual commands.
- Secure Boot compatibility: Disable Secure Boot if it’s preventing Ubuntu from loading, especially on newer hardware.
- Backup before making changes: Always back up important data before modifying boot settings or partitions.
- Test boot order and entries: Ensure the correct Ubuntu entry is prioritized in the UEFI boot menu.
How to Fix Ubuntu UEFI Boot: A Complete Step-by-Step Guide
If your Ubuntu system won’t boot after installation or suddenly fails to start, you’re likely dealing with a UEFI boot issue. UEFI (Unified Extensible Firmware Interface) has replaced the older BIOS system in most modern computers, offering faster boot times and better security. However, it also introduces complexity—especially when installing or repairing Linux distributions like Ubuntu.
This guide will walk you through diagnosing and fixing common Ubuntu UEFI boot problems. Whether you’re seeing a black screen, a “No bootable device” error, or your system boots directly into Windows instead of Ubuntu, these steps will help you regain control. We’ll cover everything from checking your firmware settings to reinstalling the GRUB bootloader and using automated repair tools.
By the end of this guide, you’ll understand how UEFI boot works, how to troubleshoot it, and how to fix it using both manual and automated methods. Let’s get started.
Understanding UEFI Boot and Why It Fails
Visual guide about How to Fix Ubntu Eufi Boot
Image source: gameserrors.com
Before diving into fixes, it helps to understand how UEFI boot works and why it sometimes fails with Ubuntu.
Unlike the legacy BIOS system, which relies on a Master Boot Record (MBR) to locate the bootloader, UEFI uses a special partition called the EFI System Partition (ESP). This partition contains bootloaders for all installed operating systems. When you power on your computer, the UEFI firmware scans the ESP for bootloaders and loads the one you’ve selected.
Ubuntu uses GRUB (GRand Unified Bootloader) as its default bootloader. During installation, GRUB is installed to the ESP with a UEFI-compatible configuration. However, several things can go wrong:
– The system is set to Legacy/CSM mode instead of UEFI.
– The EFI partition is missing, corrupted, or not mounted correctly.
– GRUB wasn’t installed properly during setup.
– Secure Boot is enabled and blocking unsigned bootloaders.
– The UEFI boot order doesn’t include Ubuntu.
– Windows updates overwrite the bootloader.
These issues can prevent Ubuntu from booting, even if the OS itself is intact. The good news? Most of these problems are fixable with the right tools and steps.
Step 1: Check Your System’s UEFI Settings
Visual guide about How to Fix Ubntu Eufi Boot
Image source: i.stack.imgur.com
The first step in fixing Ubuntu UEFI boot issues is to verify your system’s firmware settings.
Access the UEFI/BIOS Menu
Restart your computer and press the key to enter the UEFI/BIOS setup. This key varies by manufacturer:
– Dell: F2 or F12
– HP: F10 or Esc
– Lenovo: F1 or F2
– ASUS: F2 or Del
– Acer: F2 or Del
Look for a message like “Press F2 to enter setup” during startup.
Verify UEFI Mode is Enabled
Once inside the UEFI menu, navigate to the “Boot” or “System Configuration” tab. Look for settings like:
– Boot Mode: Should be set to “UEFI” (not “Legacy” or “CSM”).
– Secure Boot: May need to be disabled (we’ll cover this later).
– Fast Boot: Disable this temporarily to ensure full hardware detection.
If your system is in Legacy mode, change it to UEFI. Note: Switching modes may require reinstalling the OS, so proceed carefully.
Check Boot Order
In the “Boot” tab, look for the boot priority list. Ensure that “Ubuntu” or “grubx64.efi” appears in the list and is near the top. If you only see Windows Boot Manager, Ubuntu may not be registered in UEFI.
Use the arrow keys to move Ubuntu higher in the list. Save changes and exit (usually F10).
Step 2: Boot from a Live USB
If your system still won’t boot into Ubuntu, you’ll need to use a live USB to repair it.
Create a Bootable Ubuntu USB
If you don’t already have one:
1. Download the latest Ubuntu ISO from [ubuntu.com](https://ubuntu.com/download/desktop).
2. Use a tool like Rufus (Windows), BalenaEtcher (macOS/Windows/Linux), or Startup Disk Creator (Ubuntu) to create a bootable USB.
3. Ensure the USB is formatted for UEFI (Rufus: “GPT partition scheme for UEFI”).
Boot from the Live USB
1. Insert the USB and restart your computer.
2. Press the boot menu key (F12, Esc, etc.) to select the USB drive.
3. Choose “Try Ubuntu without installing” to enter the live environment.
Step 3: Identify and Mount Your Partitions
Once in the live session, open a terminal (Ctrl+Alt+T) and begin diagnosing your system.
List All Partitions
Run the following command to see your disk layout:
“`bash
sudo fdisk -l
“`
Look for your main Ubuntu installation. It will typically be an ext4 partition (e.g., /dev/sda2 or /dev/nvme0n1p5). Also, identify the EFI System Partition (ESP)—it’s usually a small FAT32 partition (100–500 MB) with the “EFI System” type.
Example output:
“`
/dev/nvme0n1p1 * 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 976773119 975722496 465.3G Linux filesystem
“`
In this case, /dev/nvme0n1p1 is the ESP, and /dev/nvme0n1p2 is the root partition.
Mount the Root Partition
Create a mount point and mount your Ubuntu installation:
“`bash
sudo mkdir /mnt/ubuntu
sudo mount /dev/nvme0n1p2 /mnt/ubuntu
“`
Replace /dev/nvme0n1p2 with your actual root partition.
Mount the EFI Partition
Mount the ESP to the correct location inside your chroot environment:
“`bash
sudo mount /dev/nvme0n1p1 /mnt/ubuntu/boot/efi
“`
If the /boot/efi directory doesn’t exist, create it:
“`bash
sudo mkdir -p /mnt/ubuntu/boot/efi
“`
Bind Mount System Directories
To chroot properly, bind mount essential system directories:
“`bash
sudo mount –bind /dev /mnt/ubuntu/dev
sudo mount –bind /dev/pts /mnt/ubuntu/dev/pts
sudo mount –bind /proc /mnt/ubuntu/proc
sudo mount –bind /sys /mnt/ubuntu/sys
sudo mount –bind /run /mnt/ubuntu/run
“`
Step 4: Chroot into Your Ubuntu Installation
Now that your system is mounted, you can “chroot” (change root) into it and run commands as if you were booted into Ubuntu.
Enter the Chroot Environment
Run:
“`bash
sudo chroot /mnt/ubuntu
“`
You should now see a root prompt like:
“`bash
root@ubuntu:/#
“`
Verify Network Access (Optional)
If you need internet access inside chroot (e.g., to install packages), copy DNS settings:
“`bash
cp /etc/resolv.conf /mnt/ubuntu/etc/resolv.conf
“`
Then re-enter chroot.
Step 5: Reinstall GRUB for UEFI
Now that you’re inside your Ubuntu system, reinstall GRUB with UEFI support.
Install GRUB to the EFI Partition
Run:
“`bash
grub-install –target=x86_64-efi –efi-directory=/boot/efi –bootloader-id=ubuntu –recheck
“`
Explanation of flags:
– `–target=x86_64-efi`: Specifies UEFI architecture.
– `–efi-directory=/boot/efi`: Points to the mounted ESP.
– `–bootloader-id=ubuntu`: Names the boot entry “ubuntu” in UEFI.
– `–recheck`: Forces GRUB to re-detect devices.
Update GRUB Configuration
After installing GRUB, update its configuration file:
“`bash
update-grub
“`
This scans for installed operating systems and adds them to the boot menu.
Exit Chroot and Unmount
Exit the chroot environment:
“`bash
exit
“`
Unmount all partitions in reverse order:
“`bash
sudo umount /mnt/ubuntu/run
sudo umount /mnt/ubuntu/sys
sudo umount /mnt/ubuntu/proc
sudo umount /mnt/ubuntu/dev/pts
sudo umount /mnt/ubuntu/dev
sudo umount /mnt/ubuntu/boot/efi
sudo umount /mnt/ubuntu
“`
Step 6: Reboot and Test
Remove the live USB and reboot your system:
“`bash
sudo reboot
“`
Your computer should now boot into Ubuntu. If it doesn’t, proceed to troubleshooting.
Troubleshooting Common UEFI Boot Issues
Even after reinstalling GRUB, some issues may persist. Here’s how to fix them.
Issue: System Boots Directly into Windows
This often happens when Windows updates overwrite the UEFI boot order.
Solution: Use efibootmgr to Reorder Boot Entries
Boot into Ubuntu (via live USB if needed) and install efibootmgr:
“`bash
sudo apt update
sudo apt install efibootmgr
“`
List current boot entries:
“`bash
efibootmgr
“`
Look for the Ubuntu entry (e.g., Boot0002* ubuntu). Note its number.
Set Ubuntu as the first boot option:
“`bash
sudo efibootmgr -o 0002,0000,0001
“`
Replace 0002 with your Ubuntu entry number.
Issue: Secure Boot Prevents Ubuntu from Booting
Some systems block unsigned bootloaders when Secure Boot is enabled.
Solution: Disable Secure Boot
Re-enter the UEFI menu and disable Secure Boot under the “Security” or “Boot” tab. Save and reboot.
Alternatively, use a signed version of GRUB (shim) by installing:
“`bash
sudo apt install shim-signed
“`
Then reinstall GRUB as shown earlier.
Issue: Missing or Corrupted EFI Partition
If the ESP is missing or damaged, GRUB can’t be installed.
Solution: Recreate the EFI Partition
Use GParted (from the live USB) or fdisk to create a new FAT32 partition (100–500 MB) with the “esp” flag. Then mount it and reinstall GRUB.
Issue: “No Bootable Device” Error
This means the UEFI firmware can’t find a valid bootloader.
Solution: Verify Boot Entry Exists
Use efibootmgr to check if Ubuntu is listed. If not, reinstall GRUB and ensure the `–bootloader-id` matches.
Using Boot-Repair for Quick Fixes
If manual steps seem too complex, use the Boot-Repair tool—a user-friendly utility that automates many of these fixes.
Install Boot-Repair
In the live session, open a terminal and run:
“`bash
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair
“`
Run Boot-Repair
Launch it from the application menu or terminal:
“`bash
boot-repair
“`
Click “Recommended repair.” It will:
– Reinstall GRUB
– Fix UEFI boot entries
– Reconfigure boot order
After completion, reboot and test.
Preventing Future UEFI Boot Issues
Once your system is working, take steps to avoid future problems.
Keep GRUB Updated
Run `sudo update-grub` after major system updates.
Backup EFI Partition
Backup your ESP regularly:
“`bash
sudo dd if=/dev/nvme0n1p1 of=/path/to/backup/efi_backup.img bs=4M
“`
Avoid Dual-Boot Conflicts
If using Windows, disable Fast Startup (in Windows Power Options) to prevent filesystem corruption.
Use UEFI-Compatible Tools
Always create bootable USBs with UEFI support (e.g., Rufus in GPT mode).
Conclusion
Fixing Ubuntu UEFI boot issues may seem daunting, but with the right approach, it’s entirely manageable. Start by checking your UEFI settings, then use a live USB to reinstall GRUB and repair boot entries. Tools like Boot-Repair can simplify the process, while manual chroot methods give you full control.
Remember: UEFI is powerful but requires precise configuration. Always back up your data, verify partition layouts, and test changes carefully. With this guide, you’re equipped to handle most UEFI boot problems and keep your Ubuntu system running smoothly.
