LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   [Solved] Dual EFI boot Manjaro & Windows drops into Grub recovery mode (grub incorrectly instaled by installer) (https://www.linuxquestions.org/questions/linux-general-1/%5Bsolved%5D-dual-efi-boot-manjaro-and-windows-drops-into-grub-recovery-mode-grub-incorrectly-instaled-by-installer-4175619006/)

Person_1873 12-05-2017 08:01 AM

[Solved] Dual EFI boot Manjaro & Windows drops into Grub recovery mode (grub incorrectly instaled by installer)
 
Hi Guys

I was able to solve this one myself but there were a few nuance things that i couldn't find googling that i wanted to share.

Firstly, I think grub recovery mode is fairly poorly documented for the uninitiated.
Put simply the commands that a quick google bring up don't actually work off the bat.

the first thing you need to do is set your root path where linux is installed. for me this was on /dev/sda4 or (hd0,gpt4)
Code:

set root=(hd0,gpt4)
then you also need to set your grub installation path for me this is /boot/grub but may also be /boot/efi/grub or some other custom path that you've previously set
Code:

set prefix=(hd0,gpt4)/boot/grub
the next thing i found odd was when i tried using the commands "linux" and "initrd" they were unknown.
you need to load or insert the module to make these commands work by using
Code:

insmod linux
insmod initrd

the rest was fairly simple as i've had plenty of grub-legacy and syslinux experience but i'll cover it here for completion sake.

you next need to locate your kernel. it's usually in /boot/
for me it was /boot/vmlinuz-4.9_x86_64
this can found by using ls from grub
Code:

ls /boot/
your kernel should be listed as well as your initramfs file
as previously mentioned my root partition was located at /dev/sda4 or (hd0,gpt4)
Code:

linux /boot/vmlinuz-4.9-x86_64 root=/dev/sda4
initrd /boot/initramfs
boot

all of this above should get you booted with some minor changes to suit your system however we haven't solved the problem yet, we've just taken the computer by the collar and told it that it's being naughty.

For me the reason for the system not booting was that;
at install time my EFI boot partition was mounted at /boot/efi.
however the manjaro installer installed grub at /boot
when the system booted the grub.efi elf loaded but had no idea where it was so it dropped into a recovery shell.
how do we fix this? simple we reinstall grub and tell it where our EFI directory is.
Code:

sudo grub-install --efi-directory=/boot/efi
sudo grub-mkconfig -o /boot/grub/grub.cfg

by running these two commands we re-install grub with the baked in reference to our root partition and have it scan for all OS's on the drive.

as a note to the developers of Manjaro:
While i realize that your target user is Arch users that just cant be bothered going through the riggors of installing ArchLinux. This is something that is realy just annoying and time consuming that could be fairly simply fixed at install time and i consider it a bug


All times are GMT -5. The time now is 06:56 PM.