You are not logged in.

#1 2013-07-31 17:12:08

fionn
Member
From: Campbell, CA
Registered: 2013-06-03
Posts: 30

Is there an error in the "Beginner's Guide"? UEFI + GRUB

I'm having a devil of a time installing GRUB on a UEFI system.  Brand-spanking-new; the hardware is slowly losing its v-card.

Booted from a good UEFI USB stick, mounted LVM-based partitions on /mnt, and other /mnt subdirectories; pacstrapped, arch-chrooted into the new system, tweaked .configs as needed, made sure mkinitcpio was good.... and here's where the issue comes in:

I have a UEFI partition all set and ready to take the bootloader:  /dev/sda1.  The question is where to mount it when installing GRUB (because of the native LVM and RAID support.

To install the GRUB bootloader, the Beginner's guide specifically says to put it in the /boot directory:
     # grub-install --efi-directory=/boot --bootloader-id=arch_grub --recheck

... and this is done when /dev/sda1 is mounted as /boot in the chrooted environment.  vmlinuz/initramfs's are present in /boot

The result is no love, and we get "/boot/grub is not readable by GRUB on boot.  Installation is imossible.  Aborting."

Looking at the GRUB wiki, for UEFI boards, it reccomends mounting the /dev/sda1 under /boot -- specifically in /boot/efi.  It reads:

     "The UEFI system partition will need to be mounted at /boot/efi/ for the GRUB install script to detect it:

     # mkdir -p /boot/efi
     # mount -t vfat /dev/sdXY /boot/efi "

And again, with vmlinuz/initramfs's in /boot, /boot/efi is created, /dev/sda1 is mounted at /boot/efi, and from the GRUB wiki:
     "Install GRUB UEFI application to /boot/efi/EFI/arch_grub and its modules to /boot/grub/x86_64-efi (recommended) using:

     # modprobe dm-mod
     # grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug"

... which also gives "/boot/grub is not readable by GRUB on boot.  Installation is imossible.  Aborting."  I'm also modprobing raid  along with dm-mod.

Neither the Beginners' guide nor the GRUB wiki seems to work, and looking over the board, I notice I'm not the only one having this issue.  Usually it's 'be sure to boot using UEFI' to solve, but that's not the issue here.

Thanks in advance for suggestions.

Offline

#2 2013-07-31 17:27:15

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

Re: Is there an error in the "Beginner's Guide"? UEFI + GRUB

There is no mistake.  It is up to the user to decide where to mount the EFI System Partition (ESP).  I personally like to put it at /boot, but that is a personal preference.  There are some bootloaders and boot managers that have filesystem drivers that allow it to read the kernels and initramfs' off of native Linux filesystems.  So if that is the case, then you can mount at /boot/efi so that when the kernel is written during an update it remains on the Linux filesystem rather than on the ESP.  The two that I know for certain can read filesystems are grub2 and rEFInd. 

When it says that /boot/grub is not readable, typically that means that either the permissions are wonky (which shouldn't affect anything since you are running grub-install as root) or the directory doesn't exist.  Does /boot/grub exist (or /boot/efi/grub if you mount at /boot/efi)?  The error message is trying to give you a hint as to why it is not working... error messages can sometimes be really useful.

FWIW, I would recommend using either gummiboot or rEFInd.  They are both boot managers rather than bootloaders.  This means that they really just provide a menu selection screen and then are capable of then running other efi applications.  Since kernel 3.2 (I think it was 3.2), there has been the presence of CONFIG_EFISTUB.  This is a little addition that enables the kernel to act as its own efi bootloader.  So the two I suggest simply act as middle-men to make it easier to pass arguments to the linux kernel as an efi application.

Personally, I find gummiboot to be incredibly straight forward in its configuration, and so I prefer it.  But rEFInd can be a bit more friendly to new users since it features the ability to scan for kernels (and other efi applications).  So all you have to do is minimally configure a refind.conf into the same directory as you put the refind_x64.efi and drop a refind_linux.conf into the directory with the kernels, which will specify the kernel command line to be applied to those when they are launched.  The wiki has more info on this.

One last thing. You need to learn how to use code tags and quote tags.  This will make your post much more readable.  Though admittedly, your spacing has made it pretty readable anyway... still, using code and quote tags is proper procedure around here.  Hit the quote button of this post to see how I made the boxes below.

<--This is a code block (hit the quote button) -->

<--This is a quote block (hit the quote button) -->

Offline

#3 2013-07-31 18:42:55

fionn
Member
From: Campbell, CA
Registered: 2013-06-03
Posts: 30

Re: Is there an error in the "Beginner's Guide"? UEFI + GRUB

A quick re-type of all this, because somehow I got logged-out while entering a new message....


Thanks , WonderWoofy!

I re-mounted /dev/sda1 as /boot in the chroot environment, replaced vmlinuz/initramfs....

The Beginner's Guide (BG) reads:
     # grub-install --efi-directory=/boot --bootloader-id=arch_grub --recheck

... which fails.  changing --efi-directory to --efi-directory=/boot/efi  (note the .../efi at the end!) works like a charm.  I wonder if this counts as an error in the BG?

While the grub-install completes, it creates a nearly empty /boot/efi heirarchy:  Only one file:  /boot/efi/EFI/arch_grub/grubx64.efi .  And from what I understand,this file is supposed to fall somewhere under the /boot/grub heirarchy.  And I believe it, because after auto-configuring grub.cfg as per the BG, we're missing boot media on a reboot.

Does this count as 'Solved' but with a new problem for a new thread?  Or does this mean I have another facet of the same issue?

Oh, and regarding my quoting style -- I continue to use the Usenet standard of indentation and all that.  I'm too old to use what the kids these days are using what with their <tags> and pokemon, and loud music.

Offline

#4 2013-07-31 21:56:21

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

Re: Is there an error in the "Beginner's Guide"? UEFI + GRUB

fionn wrote:

<snip>
I wonder if this counts as an error in the BG?

There is no error in the beginners guide as far as this section is concerned.  But the information there is rather sparse (and intentionally so).  The idea is that if more information is required you will follow that link to the Arch Wiki page that covers grub.  It rather sounds like you are looking for an error in the beginners guide...

While the grub-install completes, it creates a nearly empty /boot/efi heirarchy:  Only one file:  /boot/efi/EFI/arch_grub/grubx64.efi .  And from what I understand,this file is supposed to fall somewhere under the /boot/grub heirarchy.  And I believe it, because after auto-configuring grub.cfg as per the BG, we're missing boot media on a reboot.

Again, I think that it is looking for where the grub directory is.  The location of this directory is going to be dependent on where you had the ESP mounted when you installed the grub package.  So you are going to have to look at your directory hierarchy under /boot.

Does this count as 'Solved' but with a new problem for a new thread?  Or does this mean I have another facet of the same issue?

I would call this the same issue, and you might as well keep this thread going.  No sense littering the forums with multiple threads that all cover your same general problem.  I think the problem has become that you are having issues with grub.

Oh, and regarding my quoting style -- I continue to use the Usenet standard of indentation and all that.  I'm too old to use what the kids these days are using what with their <tags> and pokemon, and loud music.

The use of code and quote blocks is not about whether you can keep up with what the kids are doing.  It is a common courtesy that is expected in these forums.  It is a way of keeping everything similarly formatted, readable (mostly), and consistent.  You indentation is nice, but please start using code and quote blocks as is expected of users of these forums.

Offline

#5 2013-07-31 22:03:22

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 20,129
Website

Re: Is there an error in the "Beginner's Guide"? UEFI + GRUB

WonderWoofy wrote:

Your indentation is nice, but please start using code and quote blocks as is expected of users of these forums.

Indeed: https://wiki.archlinux.org/index.php/Fo … s_and_Code


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#6 2013-07-31 22:37:48

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: Is there an error in the "Beginner's Guide"? UEFI + GRUB

fionn wrote:

I re-mounted /dev/sda1 as /boot in the chroot environment, replaced vmlinuz/initramfs....

Sorry but I'm a bit lost. What did you replace them with?

The Beginner's Guide (BG) reads:

     # grub-install --efi-directory=/boot --bootloader-id=arch_grub --recheck

... which fails.  changing --efi-directory to --efi-directory=/boot/efi  (note the .../efi at the end!) works like a charm.  I wonder if this counts as an error in the BG?

Are you certain you mounted sda1 as /boot and that sda1 is your EFI partition? Because this would be expected if you had mounted the EFI partition at /boot/efi.

While the grub-install completes, it creates a nearly empty /boot/efi heirarchy:  Only one file:  /boot/efi/EFI/arch_grub/grubx64.efi .

This is expected.

And from what I understand,this file is supposed to fall somewhere under the /boot/grub heirarchy.

No but there should be a lot of *other* files under /boot/grub. What does that directory contain?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

Board footer

Powered by FluxBB