Skip to content

Instantly share code, notes, and snippets.

@dmuiX
Last active February 1, 2026 20:38
Show Gist options
  • Select an option

  • Save dmuiX/f884e9e58714d218bde9be81821fbd90 to your computer and use it in GitHub Desktop.

Select an option

Save dmuiX/f884e9e58714d218bde9be81821fbd90 to your computer and use it in GitHub Desktop.
grub-install
# GRUB Chroot Repair
sudo mount /dev/mapper/debian--vg-root /mnt
sudo mount /dev/sdb2 /mnt/boot
sudo mount /dev/sdb1 /mnt/boot/efi
for i in /dev /proc /sys /run; do sudo mount --rbind $i /mnt$i; done
sudo mount --make-rslave /mnt/dev
sudo chroot /mnt /bin/bash
# not necessary
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian12 --recheck
update-grub
# umounts
exit
sudo umount -R /mnt
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment