You are not logged in.

#1 2019-04-21 13:36:08

universal
Member
From: Germany
Registered: 2016-02-13
Posts: 13
Website

[solved] Can only boot GRUB from EFI Shell

Hey there,

I've had Arch installed for a few weeks now and didn't have any issues until recently, which are unrelated to
GRUB. My computer would sometimes turn off under heavy load so I switched out the CPU, the GPU and finally
the PSU. It's been running fine with a different PSU, but after I was done with the troubleshooting it didn't boot
correctly anymore so I guess the hardware changes messed some settings up.

When I turned it on instead of booting GRUB it booted an ancient Windows bootloader that's been sitting on one of
my hard drives, even though I don't even have a Windows installation it could boot. When I went into the boot
options menu I saw that the GRUB UEFI entry wasn't there anymore, so I just tried to boot from the SSD, which holds
the EFI partition, but no dice.

After some fiddling I found that I can load GRUB just fine from the builtin EFI Shell:

fs0:\EFI\grub\grubx64.efi

Where 'fs0' is the EFI partition, and then the path to GRUB. I even made an alias, so I could just live with the fact
that I have to boot that way, but it's a bit annoying.

I then unplugged all drives except the SSD and I got the message

Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key

So I assumed that the GRUB is busted. I booted into the arch iso, chrooted into the arch installation and reinstalled GRUB with (Like someone tried in this post):

# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch-grub

After doing that the entry showed up again in the boot menu, but selecting it still wouldn't boot GRUB. I did some
searching and found that some MSI mainboards (I have a MSI 970A-G43) expect GRUB in a different folder, but it
worked fine before so I don't think that's it. I'd also accept the answer that my mainboard is busted, since it's been
acting up quite a bit in the past, but I'd still like to ask first and see if someone might know a fix for this.

Also here's the current ouput for # efibootmgr:

BootCurrent: 0008
Timeout: 5 seconds
BootOrder: 0000,0001,0008
Boot0000* SATA: INTEL SSDSC2BW180A3H
Boot0001* arch-grub
Boot0008* UEFI: Built-in EFI Shell 

I have changed BootOrder and BootCurrent to arch-grub and the SSD, but that didn't help.

tl;dr:
Grub only boots from efi shell, selecting it directly in the boot menu won't work. It did work before,
but stopped after some hardware changes. Tried reinstalling grub, but it didn't help.

So yeah, any help is appreciated

Last edited by universal (2019-04-21 15:01:00)

Offline

#2 2019-04-21 14:16:56

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [solved] Can only boot GRUB from EFI Shell

Try running the grub-install command again (after mounting & chrooting) but add the --removable flag this time.

Make sure that the EFI system partition is actually mounted under /boot/efi beforehand though.

Offline

#3 2019-04-21 15:00:02

universal
Member
From: Germany
Registered: 2016-02-13
Posts: 13
Website

Re: [solved] Can only boot GRUB from EFI Shell

Head_on_a_Stick wrote:

Try running the grub-install command again (after mounting & chrooting) but add the --removable flag this time.

Make sure that the EFI system partition is actually mounted under /boot/efi beforehand though.

Okay so I fixed it, but it took a bit more fiddling.
I had the EFI partition mounted to /boot, instead of /boot/efi. I followed the installation guide on the German Arch wiki, which used /boot.

So I changed the mount point in fstab to /boot/efi and reinstalled grub with

# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch-grub

After that it booted directly again, the --removable flag wasn't necessary.
I previously also had the initial ramdisk files on the efi partiton (since they're installed to /boot) and I don't know if that's how it's supposed to
be, but now they're on the main partition and it still works, so I'm not sure which way is correct, but having them
on the boot partition gave me some space issues when I wanted to install the lts kernel alongside the normal kernel.

Anyways, thanks for the help!

Offline

#4 2019-04-21 16:33:14

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [solved] Can only boot GRUB from EFI Shell

universal wrote:

I had the EFI partition mounted to /boot, instead of /boot/efi

You could have kept the ESP there and just called the correct path in the grub-install command, that would have been simpler.

universal wrote:

I'm not sure which way is correct

You can mount the ESP wherever you like with GRUB, it doesn't really matter.

For systemd-boot you would need to have the kernel image on the ESP, which is why the installation guide suggests /boot as a mount point.

Offline

Board footer

Powered by FluxBB