Created
October 23, 2019 10:34
-
-
Save fo40225/099b99a0aa9484de9ec072aa0108eb15 to your computer and use it in GitHub Desktop.
rescue grub uefi boot from live cd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mount /dev/sda2 /mnt | |
sudo mkdir /mnt/boot/efi | |
sudo mount /dev/sda1 /mnt/boot/efi | |
sudo mount --bind /dev /mnt/dev | |
sudo mount --bind /proc /mnt/proc | |
sudo mount --bind /sys /mnt/sys | |
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf | |
#### after reboot, ubuntu 18.04, sudo ln -s ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf | |
sudo chroot /mnt | |
apt install -y grub-efi-amd64-bin | |
grub-install /dev/sda | |
#### update /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment