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.
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 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.)
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 Systemin the
Typecolumn. In this example, it's
/dev/sda1. (The ESP is usually
/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
/mntand mount the ESP there. This might be necessary if you want to mount multiple partitions.
You can then use
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.