Repair grub-efi Bootloader using Ubuntu 14.04 Live CD

EFI System Partition (ESP) often got corrupted for whatever reason.
Standard grub-install from Live CD gives “error: failed to get canonical path of /cow”

Here is a quick and easy way to repair it.

1. Install efibootmgr and grub-efi

sudo apt-get install efibootmgr grub-efi

2. Mount / and EFI partition (Find sdX via parted or GParted)

sudo mkdir /mnt/hdd
sudo mkdir /mnt/efi

sudo mount /dev/sdX1 /mnt/hdd
sudo mount /dev/sdX2 /mnt/efi

3. Reinstall grub-efi

sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi --bootloader-id="Ubuntu" --root-directory=/mnt/hdd /dev/sdX --recheck --debug

4. Done!

2 Replies to “Repair grub-efi Bootloader using Ubuntu 14.04 Live CD”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.