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.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay