Skip to content

Instantly share code, notes, and snippets.

@dayjaby
Created June 29, 2021 20:46
Show Gist options
  • Save dayjaby/581544254106c30b52c96f9d9d7e4cb6 to your computer and use it in GitHub Desktop.
Save dayjaby/581544254106c30b52c96f9d9d7e4cb6 to your computer and use it in GitHub Desktop.
Rescue my system after stupid windows update
sudo fdisk -l /dev/sda
# /dev/sdaX -> EFI partition
# /dev/sdaY -> Ubuntu partition
sudo mount /dev/sdaY /mnt
sudo mount /dev/sdaX /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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment