You are not logged in.

#1 2013-07-23 17:45:09

slackcub
Member
Registered: 2009-03-14
Posts: 144

[SOLVED] Grub failing to install on UEFI

I am trying to do a fresh install on my desktop and am running into issues when installing grub. 

My setup is: 3x500GB drives (sda1 is a 1GB partition for /boot/efi, sd[bc]1 raid 1 for swap, sd[abc]2 raid 5 with LVM for /, /home, and /tmp). ASUS m5a97 LE R2.0 motherboard.

I am currently chroot into /mnt, where my / LVM is mounted, I have dm_mod loaded, and I was following the instructions here.

I get an error from grub toward the end saying "Path  `/boot/grub' is not readable by GRUB on boot. Installation is impossile. Aborting."  (there's a LOT of output before that because of --debug. 

I tried looking around, and I saw some people say that they had success with a fresh install when upgrading, but that doesn't really apply to me as this is already a fresh install.

Does anyone have any ideas what could be causing this? Thanks in advance!

David

Last edited by slackcub (2013-07-28 08:17:30)

Offline

#2 2013-07-23 18:29:36

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [SOLVED] Grub failing to install on UEFI

You don't mention a separate /boot partition. If that wasn't an omission, this means that /boot/grub will be inside your LVM configuration. Although GRUB does include LVM drivers, it's pretty rare for an installation to put /boot inside an LVM. I'm not sure offhand if this type of configuration would require changes, but it might.

I recommend either creating a separate partition for /boot or mounting your ESP at /boot rather than at /boot/efi. The latter option will make it easier to use certain other boot loaders or boot managers, such as gummiboot, so it might be preferable if you're not 100% certain you want to use GRUB. (Hint: If you're not an EFI expert, a 100% certainty that you want to use GRUB is mistaken; EFI has its own quirks and you may find GRUB to be a less-than-optimal choice, depending on your specific needs.)

Offline

#3 2013-07-23 18:43:56

slackcub
Member
Registered: 2009-03-14
Posts: 144

Re: [SOLVED] Grub failing to install on UEFI

I could make sdb1 for /boot, and would this solve the problem?  I had picked grub simply because it's what I had been using before.  I'm just going to be having a single boot into Arch with no other OSs on here.  What are some of the downfalls of grub vs say gummiboot?

David

Offline

#4 2013-07-23 19:23:13

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] Grub failing to install on UEFI

If you want to use gummiboot, you *must* mount your ESP at /boot and *cannot* have a separate boot partition.

This is covered in the wiki but gummiboot and rEFInd are boot managers. grub (and some others) are boot loaders as well. The former give you a menu etc. but you boot with the kernel's EFI stub loader. When this works, it works great. When it doesn't, it doesn't. Boot loaders don't use the stub loader: they load the kernel themselves as with traditional bios. (Well not quite like that but the same idea.)

Different options have different kinds of flexibility and different options work better or worse on different hardware and with different kernels.

Personally, I would recommend installing a boot manager (gummiboot or rEFInd) and a backup boot loader (grub or something else). That way if you get bitten by the recent EFI stub loader bug, you have a fallback in place and will still be able to boot. I have rEFInd and grub installed, for example. I have an entry in rEFInd's config to launch grub. That means I can boot rEFInd -> grub -> kernel even though I cannot boot rEFInd -> kernel because I am bitten by the bug.

Note that not only may your mileage vary, your mileage WILL vary. If not now, sometime. Lots of UEFI implementations are buggy and the bugs hit in mysterious ways and at mysterious times. Just be prepared.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2013-07-23 19:35:58

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Grub failing to install on UEFI

cfr wrote:

If you want to use gummiboot, you *must* mount your ESP at /boot and *cannot* have a separate boot partition.

I don't think this is true.  The only reason why you would possibly want to mount your ESP at /boot when using gummiboot is because this is what the gummiboot command expects.  But if it is not the case, I believe it will just fail (or succeed by doing nothing, I'm not sure).  It will also not be able to set up the boot.automount generated unit discussed in jasonwryan's mlocate thread either.  But this should not actually be a hard requirement for just the basic ability to boot the machine.

Offline

#6 2013-07-23 19:36:28

slackcub
Member
Registered: 2009-03-14
Posts: 144

Re: [SOLVED] Grub failing to install on UEFI

I guess I was under the impression that GRUB needed to have the ESP at /boot/efi.  I'll give it a shot to install either gummiboot or rEFInd and grub with the ESP at /boot.  Will need to do some more research into those and see which one would work for me.

Offline

#7 2013-07-23 20:28:14

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] Grub failing to install on UEFI

WonderWoofy wrote:
cfr wrote:

If you want to use gummiboot, you *must* mount your ESP at /boot and *cannot* have a separate boot partition.

I don't think this is true.  The only reason why you would possibly want to mount your ESP at /boot when using gummiboot is because this is what the gummiboot command expects.  But if it is not the case, I believe it will just fail (or succeed by doing nothing, I'm not sure).  It will also not be able to set up the boot.automount generated unit discussed in jasonwryan's mlocate thread either.  But this should not actually be a hard requirement for just the basic ability to boot the machine.

Oops, sorry, you are right.

I think the Beginners' Guide used to say it was necessary and I assumed it was correct. Now it just erroneously claims that if you follow the guide from the beginning your ESP will be mounted at /boot. (I'm not sure what is meant to justify this claim - does anybody know?)

grub will be fine with the ESP at /boot but you may need to tell it it is there. (I think it'll find it anyway but you can certainly pass it the option if not.)

Last edited by cfr (2013-07-23 20:29:14)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2013-07-28 08:17:15

slackcub
Member
Registered: 2009-03-14
Posts: 144

Re: [SOLVED] Grub failing to install on UEFI

Alright I figured I may as well update this.  I fell a little silly, but I do know at first the DVD was booting in UEFI mode, but apparently at some point that stopped, and that was what was causing all my issues.  I am now up and running and all good. Thanks for the help everyone!

Offline

#9 2013-07-28 15:31:05

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Grub failing to install on UEFI

slackcub wrote:

Alright I figured I may as well update this.  I fell a little silly, but I do know at first the DVD was booting in UEFI mode, but apparently at some point that stopped, and that was what was causing all my issues.  I am now up and running and all good. Thanks for the help everyone!

I find it a very good idea to keep something as /boot/EFI/boot/bootx64.efi (or \EFI\BOOT\BOOTX64.efi relative to the root of the ESP).  That is the "default" efi application.  It is what is run if you have your machine set to boot in UEFI mode and you choose the disk to boot from (rather than a firmware entry like those created by efibootmgr).  It was put into the spec so that one could boot a removable medium, like a USB flash drive or cdrom, with UEFI. Obviously, a removable whatever is not going to have a firmware entry for it, so there needed to be some kind of standardization on how to make those work.  From there, apparently that idea carried over to the internal devices as well, and now a vast majority of UEFI firmwares use this for all disks, not just removable ones.

Nowadays, I keep gummiboot there.  But when I first started using UEFI, I kept the UEFI Shell v2 there since it that is probably the most versatile thing that could be used as a fallback.  But as long as you have somethign there, in the event that you lose all your firmware entries, this might save your ass.  In my Phoenix bios, the exit and save changes, you would use F10, while a total reset of the bios to defaults is F9... yeah, I reset my bios by accident once.  Having the UEFI Shell in that spot made my life quite a bit easier.

Offline

Board footer

Powered by FluxBB