Skip to content

Fixing the Boot Partition

How to fix an EFI boot partition when it gets corrupted.

The Setup

Device /dev/sdb is the corrupted disk and has 2 partitions sdb1 and sdb5 respectively boot and root. Partition sdb1 is normally the mounted as /boot/efi.

To run grub-install both need to be mounted.

1) Mounting the Root Partition

Create directory /mnt/root/ to mount the root filesystem of partition sdb5.

mkdir -p /mnt/root
mount /dev/sdb5 /mnt/root

2) Mount the EFI Partition

Mount the boot partition on the previous mounted filesystem.

mount /dev/sdb5 /mnt/root/boot/efi

3) Install Grub

(Re)install grub with grub-install.

grub-install --root-directory=/mnt/root /dev/sdb