DEV Community

Scotticles
Scotticles

Posted on

Fixing EFI on linux

I use kde neon and dual boot into windows every now and then, well my laptop receives firmware updates and I decided to get those updated on windows. I haven't had good luck on the linux fwupdate... Well it hosed my efi, windows boot still worked but my linux side was no longer booting. Thanks windows updates for forcing me to do them.

I scoured the internet for a solution. I tried boot-repair, no go. I downloaded KDE Neon live iso, put it on a usb and then finally found a solution.

source

I mounted the necessary folders and then chrooted into the mnt. I noticed my /boot was readonly..thats odd., unmounted it and ran

sudo dosfsck -t -a -w /dev/sda1 <--change /dev/sdx to your /boot partition disk

Then do this:

/dev/sda8 in this example is the / partition
/dev/sda1 in this example is the efi partition

sudo mount /dev/sda8 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sda
update-grub  
Enter fullscreen mode Exit fullscreen mode

This might help someone, it's definitely a bookmark for me.

Top comments (0)