Last active
August 31, 2018 14:35
-
-
Save coder4web/2027592d705ee667d87c5bab18c9cbf0 to your computer and use it in GitHub Desktop.
Ubuntu dual-boot HOW-TO
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
# boot - How can I reinstall GRUB to the EFI partition? - Ask Ubuntu | |
# https://askubuntu.com/a/831241/19938 | |
# Note : sdX = disk | sdXX = efi partition | sdXXX = system partition | |
sudo mount /dev/sdXXX /mnt | |
sudo mount /dev/sdXX /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/sdX | |
update-grub | |
# linux - How to reinstall GRUB2 EFI? - Super User | |
# https://superuser.com/questions/376470/how-to-reinstall-grub2-efi#376471 | |
apt-get install --reinstall grub-efi | |
update-grub | |
# GRUB restore legacy BIOS mode | |
sudo mount /dev/sda1 /mnt | |
sudo mount --bind /dev /mnt/dev | |
sudo mount --bind /dev/pts /mnt/dev/pts | |
sudo mount --bind /proc /mnt/proc | |
sudo mount --bind /sys /mnt/sys | |
sudo chroot /mnt | |
grub-install /dev/sda | |
grub-install --recheck /dev/sda | |
update-grub | |
exit | |
sudo umount /mnt/dev | |
sudo umount /mnt/dev/pts | |
sudo umount /mnt/proc | |
sudo umount /mnt/sys | |
sudo umount /mnt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment