Skip to content

Instantly share code, notes, and snippets.

@rrmhearts
Created March 31, 2025 19:29
Show Gist options
  • Save rrmhearts/96b245d155a3ef38e079a378915fa305 to your computer and use it in GitHub Desktop.
Save rrmhearts/96b245d155a3ef38e079a378915fa305 to your computer and use it in GitHub Desktop.
How to repair or update grub from a live cd using chroot.
# --rbind mounts subdirectories that are required.
sudo mount /dev/sda3 /mnt/
sudo mount --rbind /proc/ /mnt/proc/
sudo mount --bind /sys/ /mnt/sys/
sudo mount --rbind /dev/ /mnt/dev/
sudo chroot /mnt/

# Repair grub in /etc/default/grub

sudo update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment