I have Debian installed on /dev/sda4
and it’s using EFI. I installed Arch Linux to another partition, /dev/sda5
the other day and it created a new GRUB2 menu during boot. Unfortunately, I somehow messed up the installation and when I chose to boot Arch from GRUB2, I get an error:
error: no such device: d4103fa-d940-47ca-... Loading Linux core repo kernel... error: no such partition. Loading initial ramdisk... unaligned pointer 0x22 Aborted. Press any key to exit.
Once I pressed any key, the Debian GRUB2 menu was displayed (giving me the idea that 2 GRUB2 menus have been installed to the EFI boot partition) and I was able to boot into Debian.
Since Arch didn’t want to start, I reformatted /dev/sda5 to remove it and went to remove it from the EFI boot parition. I searched the web on how to do this and came across this post which basically says that GRUB2 isn’t needed to boot Linux in EFI; EFI stub can be used. Thinking it would work, I reformatted /dev/sda1, where my EFI boot partition is, and followed the instructions.
Reboot…computer is stuck with a black screen with a blinking cursor on the top-left corner. Not a good sign. Waited a full 5 minutes to see if it would boot up. Nothing. Rebooted 10 times more. Nothing.
I knew I messed up my EFI boot.
After doing a lot of reading, I felt that it would take too much time (4chan was waiting…LOLs) to get my boot loader back up without GRUB2. So I decided to reinstall GRUB2 via a chroot environment using Mint 16 live USB (booted in UEFI).
Inside Mint, opened a Terminal and
(mint)$ sudo mount /dev/sda4 /mnt (mint)$ sudo mount /dev/sda1 /mnt/boot/efi (mint)$ for i in /dev /dev/pts /proc /sys; do sudo mount $i /mnt$i; done (mint)$ sudo chroot /mnt (chroot)# apt-get --reinstall install grub-efi-amd64 (chroot)# exit (mint)$ for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done (mint)$ sudo umount /mnt/boot/efi (mint)$ sudo umount /mnt (mint)$ sudo reboot
After POST, the Debian’s GRUB2 menu showed and I’m once again able to boot into the computer.
No comments:
Post a Comment