Skip to content

Instantly share code, notes, and snippets.

@vanities
Last active April 23, 2018 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanities/66ed4b8237299f404dc6e190d8784d76 to your computer and use it in GitHub Desktop.
Save vanities/66ed4b8237299f404dc6e190d8784d76 to your computer and use it in GitHub Desktop.
chroot and fix grub
# https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader
# https://wiki.archlinux.org/index.php/GRUB#UEFI_systems
sudo su
lsblk -f
# mount rootfs to mnt, ext4
mount /dev/sda1 /mnt
cd /mnt/
# mount boot to mnt/boot, vfat
mount /dev/sda3 /mnt/boot
# mount userfs to mnt/home, ext4
mount /dev/sda4 /mnt/home
mount --rbind /sys sys/
mount --rbind /dev dev/
mount --rbind /run run/
chroot /mnt
cd /boot
grub-install --target=x86_64-efi --efi-directory=/boot/efi --recheck
sudo update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment