How to mount the EFI system partition using Ubuntu 16.04 Live CD
My Hard drive has the GRUB boot loader on there from a leftover Ubuntu installation and I want to delete it but I need to mount the EFI system partition first. So how can I mount it from the Live CD? Help appreciated, Bondy.
1 Answer 1
To begin, note that deleting the Ubuntu boot loader is not usually necessary. If you plan to re-install Ubuntu, the new installation will take over the old one’s location, so deleting the old boot loader won’t achieve anything. If you plan to boot some other OS that’s already installed, changing the boot order (with efibootmgr in Ubuntu or another Linux, EasyUEFI in Windows, or other similar tools) should be sufficient. The main reason to delete the old boot loader is if you’ve installed (or plan to install) some other OS or boot manager, and you want to keep Ubuntu’s GRUB out of its menu. Beyond that, deleting Ubuntu’s GRUB could qualify as «good housekeeping,» but it’s likely unnecessary.
That said, the most reliable way to mount the EFI System Partition (ESP) from the Ubuntu installer/emergency disk is as follows:
- Open a Terminal window. (To do this, click the Ubuntu icon in the top-left corner of the screen, type «terminal», and either hit Enter or select the Terminal option.)
- Type sudo fdisk -l . This should produce output that identifies the ESP (among other things), like this:
Device Start End Sectors Size Type /dev/sda1 2048 1128447 1126400 550M EFI System /dev/sda2 1128448 79626398 78497951 37.4G Linux filesystem /dev/sda3 79628288 85917854 6289567 3G Linux swap
- Identify your ESP; it should specify EFI System in the Type column. In this example, it’s /dev/sda1 . (The ESP is usually /dev/sda1 or /dev/sda2 , but that’s just what’s most common.)
- With the ESP identified, mount it to /mnt , as in sudo mount /dev/sda1 /mnt . If you prefer, you can create a mount point other than /mnt and mount the ESP there. This might be necessary if you want to mount multiple partitions.
You can then use ls , cp , mv , rm , and other text-mode commands in the Terminal window. Note that, unless you add various mount options, you’ll need to use sudo to operate on files on the ESP.
How to Mount macOS EFI Partition from Ubuntu Linux
In this article, I am going to show you how to mount macOS EFI partition from Ubuntu Linux. I am currently running a macOS Catalina Hackintosh. I tested to update to the latest OpenCore boot loader. But unfortunately, it did not work as I expected. As a result, my Hackintosh won’t boot properly because my EFI contains error, etc. But thankfully, I still have the backup of my working EFI. So, I can easily pop in this working EFI and replacing the EFI which contains error.
Since I am not a macOS savvy, I don’t know how to open/access my EFI partition using the macOS recovery environment. But fortunately, Ubuntu comes to rescue me. I created the Ubuntu 20.10 live USB and boot the Hackintosh with the Ubuntu USB. From the Ubuntu Terminal, I can easily mount the EFI partition and replace the EFI folder easily.
Steps to Mount macOS EFI partition from Ubuntu Linux
Step 1. Download Ubuntu ISO
I would recommend to use Ubuntu 20.10. It is easy to use and user friendly. You can grab the ISO from the link below.
Step 2. Create the Ubuntu Live USB
Now grab a USB drive and then use the Rufus software (Windows) or Etcher (macOS/Windows/Linux). You can then create the Ubuntu Live USB using the software.
Step 3. Boot the Hackintosh PC
With the Ubuntu Live USB, boot your Hackintosh PC until it reach the Ubuntu Desktop.
Step 4. Mount the EFI partition
Open Terminal and then run the following command to list the disks and partitions.
Scroll down to find the correct partition. Usually, the macOS EFI partition size is exactly 200MB and the type is EFI system. See the picture above. In my case, the EFI partition device is marked as /dev/sde1. This device name can be different on each system.
To mount the EFI partition, simply use this command
The command will mount the EFI partition to /mnt.
Done. Now the EFI partition is mounted.