Skip to content

Instantly share code, notes, and snippets.

@anjakammer
Last active August 17, 2021 17:12
Show Gist options
  • Save anjakammer/1e392748475f50f4ea28bb987de8e793 to your computer and use it in GitHub Desktop.
Save anjakammer/1e392748475f50f4ea28bb987de8e793 to your computer and use it in GitHub Desktop.
how to repair grub failure after windows update aka grub rescue issue
# boot from live cd with compatibility mode
# open terminal
sudo fdisk -l
# get the linux partition => /dev/nvme0n1p4
# count the partitions, better make a screenshot of it
mkdir mnt
sudo mount /dev/nvme0n1p4 mnt
ls mnt/boot
# does grub exists? Good, we need that information
# ----------------
# restart pc and enter grub rescue mode
ls
# are there as many partitions as you saw running the fdisk -l ? Good -> it is the 4th partition
set prefix=(hd0,gpt4)/boot/grub
set root=(hd0,gpt4)
insmod linux
insmod normal
normal
# grub bootloader should appear - boot linux
# ----------------
# update grub
sudo update-grub
# restart, does the grub rescue mode appear? repeat the last section and re-install grub
# ----------------
sudo grub-install /dev/nvme0n1p4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment