Skip to content

Instantly share code, notes, and snippets.

@mindplay-dk
Created April 18, 2026 12:49
Show Gist options
  • Select an option

  • Save mindplay-dk/d842d0f1bf1b28da828451a9cb0422e2 to your computer and use it in GitHub Desktop.

Select an option

Save mindplay-dk/d842d0f1bf1b28da828451a9cb0422e2 to your computer and use it in GitHub Desktop.
When Windows 11 erases the Grub boot loader

Which it absolutely fucking will, without notice or warning - thank you, Microsoft. 🙄

https://www.youtube.com/watch?v=HPHZ3hSp6mE

  • Boot from a USB stick
  • sudo su -
  • fdisk -l and note:
    • The boot volume name, e.g. /dev/xxx
    • The EFI partition name, e.g. /dev/xxx1
    • The Windows partition name, e.g. /dev/xxx3
    • The Linux partition name, e.g. /dev/xxx5
  • mount /dev/xxx5 /mnt (the Linux partition)
  • mount /dev/xxx1 /mnt/boot/efi (the EFI partition)
  • for i in /dev /dev/pts /proc /sys /run; do mount -B $i /mnt$i; done
  • chroot /mnt
  • mount -t efivarfs none /sys/firmware/efi/efivars
  • grub-install /dev/xxx (the boot volume)
  • update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment