You are not logged in.

#1 2013-03-13 01:49:55

lobo2
Member
Registered: 2013-03-13
Posts: 19

[Solved] installation and setup question - gummiboot and EFI

Hi,

This is the first time i'm installing arch. i hit the below issues. hope someone can help me out. my understanding of uefi is just about an hour worth of reading or less..

(the wiki didn't mention the kernel requirement when I started installing it... now it does and i updated the beginner's guide wiki post.)

Problem
Gummiboot#Installing says that "If you are still running kernel 3.7 or have not booted in EFI mode, creating the boot entry will fail. You should however still be able to boot gummiboot as it copies the binary to the default EFI binary location on your ESP (/boot/EFI/BOOT/BOOTX64.EFI on x64 systems). "

the gummiboot part fails. gummiboot gives this error at install  saying file system is not FAT EFI, so first I got gummiboot and gummiboot-efi both using pacman. then, I provided the --path to install and now it coughs up because the latest iso isn't 3.8 yet.

Failed to access EFI variables. Is the "efivarfs" filesystem mounted?

I can see efivars but this is asking for efivarfs.

so instead I did,

# cp /usr/lib/gummiboot/gummibootx64.efi /boot/efi/EFI/gummiboot/gummiboot.efi
# efibootmgr -c -d /dev/sda -p 1 -w -L "Gummiboot" -l '\EFI\gummiboot\gummiboot.efi'

how do I set this up? I'm afraid if I overwrite /boot/efi/EFI/BOOT/BOOTX64.EFI  windows might not boot.

after the installation (of course without gummiboot stuff) now when I reboot, I don't see any gummiboot menu at all because i didn't copy it to EFI/BOOT. it goes straight to windows 8 boot. during boot if I press F12 and see the menu option on thinkpad, I see gummiboot as the first entry(must be because of efibootmgr) followed by windows boot manager. When I select the gummiboot and enter, it just circles back to the same menu. I have setup the loader.conf and arch.conf as described in the wiki.

how do I set gummiboot to work? i dont mind pressing F12 and then going to gumiboot-> arch until 3.8 is out.

If this isn't possible, can I install rEFInd without messing gummiboot? looking at the dir structure of FAT EFI I think it should be possible but not 100% sure until i try it out. Also, to get rid of gummiboot, i should delete the directories, uninstall using pacman and get rid of the efibootmgr change I made, right?

Last edited by lobo2 (2013-03-15 04:07:47)

Offline

#2 2013-03-13 10:42:02

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [Solved] installation and setup question - gummiboot and EFI

lobo2 wrote:
# cp /usr/lib/gummiboot/gummibootx64.efi /boot/efi/EFI/gummiboot/gummiboot.efi
# efibootmgr -c -d /dev/sda -p 1 -w -L "Gummiboot" -l '\EFI\gummiboot\gummiboot.efi'

I guess you got this from the UEFI wiki page? This is outdated, please refer to the Gummiboot article, I will fix the UEFI article.

lobo2 wrote:

after the installation (of course without gummiboot stuff) now when I reboot, I don't see any gummiboot menu at all because i didn't copy it to EFI/BOOT. it goes straight to windows 8 boot. during boot if I press F12 and see the menu option on thinkpad, I see gummiboot as the first entry(must be because of efibootmgr) followed by windows boot manager. When I select the gummiboot and enter, it just circles back to the same menu. I have setup the loader.conf and arch.conf as described in the wiki.

That's probably because you installed gummiboot manually on /boot/efi/ but didn't copy the kernel and initramfs there.
To clarify:

1. Your ESP must be FAT
2. Your ESP should be mounted on /boot (it doesn't have, but it makes everything a heck of a lot easier if you use gummiboot, see the note in the Gummiboot wiki)
3. If you are not running kernel 3.8, you can just as well use efibootmgr manually as you did before, but you have to specify the correct path (note that gummiboot installs itself to \EFI\gummiboot\gummibootx64.efi if you use "gummiboot install").
4. I don't know if Windows installs itself to \EFI\BOOT\BOOTX64.EFI as well. Even if it does, it should still work without it because Windows has its own entry in the EFI boot loader; you could also easily just restore the file.

Last edited by 65kid (2013-03-13 10:43:09)

Offline

#3 2013-03-13 13:06:59

lobo2
Member
Registered: 2013-03-13
Posts: 19

Re: [Solved] installation and setup question - gummiboot and EFI

Thank you for replying and thank you for your time on this one.

65kid wrote:

I guess you got this from the UEFI wiki page? This is outdated, please refer to the Gummiboot article, I will fix the UEFI article.

Yes, from there and from reading some other posts in this forum.

65kid wrote:

That's probably because you installed gummiboot manually on /boot/efi/ but didn't copy the kernel and initramfs there.

the exact error I got -

gummiboot --path=/boot/efi/ install"
Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/efi/EFI/gummiboot/gummibootx64.efi.
Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/efi/EFI/BOOT/BOOTX64.EFI.
Failed to access EFI variables. Is the "efivarfs" filesystem mounted?

Since i had it mounted on /boot/EFI, it should have copied the file, right? Unless the installer rolled back the change due to missing efivarfs. I can verify when I get to the machine later this evening.

So I tried the other way, but as you mentioned it look to be wrong,

# cp /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi
# cp /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img

# cp /usr/lib/gummiboot/gummibootx64.efi /boot/efi/EFI/gummiboot/gummiboot.efi
# efibootmgr -c -d /dev/sda -p 1 -w -L "Gummiboot" -l '\EFI\gummiboot\gummiboot.efi'
65kid wrote:

To clarify:

1. Your ESP must be FAT
2. Your ESP should be mounted on /boot (it doesn't have, but it makes everything a heck of a lot easier if you use gummiboot, see the note in the Gummiboot wiki)
3. If you are not running kernel 3.8, you can just as well use efibootmgr manually as you did before, but you have to specify the correct path (note that gummiboot installs itself to \EFI\gummiboot\gummibootx64.efi if you use "gummiboot install").
4. I don't know if Windows installs itself to \EFI\BOOT\BOOTX64.EFI as well. Even if it does, it should still work without it because Windows has its own entry in the EFI boot loader; you could also easily just restore the file.

1. ESP is FAT
2. right now, I have it as /boot/efi.
3. I ommited the x64 part of it. oops.
4. I think when the system starts, the control moves to BOOTX64.EFI and then it is loading the windows by the windows entry in the efi.

Offline

#4 2013-03-13 13:20:43

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [Solved] installation and setup question - gummiboot and EFI

lobo2 wrote:

the exact error I got -

gummiboot --path=/boot/efi/ install"
Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/efi/EFI/gummiboot/gummibootx64.efi.
Copied /usr/lib/gummiboot/gummibootx64.efi to /boot/efi/EFI/BOOT/BOOTX64.EFI.
Failed to access EFI variables. Is the "efivarfs" filesystem mounted?

Since i had it mounted on /boot/EFI, it should have copied the file, right? Unless the installer rolled back the change due to missing efivarfs. I can verify when I get to the machine later this evening.

So I tried the other way, but as you mentioned it look to be wrong,

# cp /boot/vmlinuz-linux /boot/efi/EFI/arch/vmlinuz-arch.efi
# cp /boot/initramfs-linux.img /boot/efi/EFI/arch/initramfs-arch.img

# cp /usr/lib/gummiboot/gummibootx64.efi /boot/efi/EFI/gummiboot/gummiboot.efi
# efibootmgr -c -d /dev/sda -p 1 -w -L "Gummiboot" -l '\EFI\gummiboot\gummiboot.efi'

As I said, mount the ESP on /boot. The kernel and initramfs are installed into /boot by default so you won't have to copy them to the ESP by hand evertime the kernel is updated. This is all explained in the note on the Gummiboot wiki page. Booting the ESP on /boot/efi just makes things unnecessarily complicated (at least with gummiboot).

lobo2 wrote:

4. I think when the system starts, the control moves to BOOTX64.EFI and then it is loading the windows by the windows entry in the efi.

no, that's not how it works. BOOTX64.EFI is only loaded when you choose the hard drive itself in the EFI boot menu. If you use the Windows entry in the EFI boot menu it will boot whatever EFI image is specified in that boot entry. Same thing for gummiboot. The efibootmgr command you executed earlier basically says "create a boot entry called "Gummiboot" and when this is chosen load \EFI\gummiboot\gummiboot.efi". If you were running kernel 3.8, "gummiboot install" would automatically create an entry for you called "Linux Boot Manager".

It's about time 3.8 hits [core], this is kind of messy at the moment.

Offline

#5 2013-03-13 14:13:33

lobo2
Member
Registered: 2013-03-13
Posts: 19

Re: [Solved] installation and setup question - gummiboot and EFI

typo in my response - I have the ESP mounted on /boot/efi not /boot/EFI.

I'm also trying to automate the copying of kernel to ESP arch directory whenever it gets updated using the method mentioned on the Beginners'_Guide and that is failing due to systemctl command as mentioned in another post here.

I will mount it on /boot and give it a shot later. Also, thanks for the detail on the booting EFI images.

Offline

#6 2013-03-13 16:42:04

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

Re: [Solved] installation and setup question - gummiboot and EFI

Lobo2, your symptoms are consistent with a correctly-installed gummiboot but a computer that has Secure Boot active. You may want to check your firmware settings to be sure that Secure Boot is disabled. Unfortunately, details vary from one firmware to another, but you can see here for a description of how it's done on one model of firmware.

Offline

#7 2013-03-13 23:26:14

lobo2
Member
Registered: 2013-03-13
Posts: 19

Re: [Solved] installation and setup question - gummiboot and EFI

srs5694 wrote:

Lobo2, your symptoms are consistent with a correctly-installed gummiboot but a computer that has Secure Boot active. You may want to check your firmware settings to be sure that Secure Boot is disabled. Unfortunately, details vary from one firmware to another, but you can see here for a description of how it's done on one model of firmware.

I had turned the secure boot off to install Arch. I verified, it is still off and the system is in UEFI Only mode.

Offline

#8 2013-03-13 23:32:08

lobo2
Member
Registered: 2013-03-13
Posts: 19

Re: [Solved] installation and setup question - gummiboot and EFI

65kid wrote:

As I said, mount the ESP on /boot. The kernel and initramfs are installed into /boot by default so you won't have to copy them to the ESP by hand evertime the kernel is updated. This is all explained in the note on the Gummiboot wiki page. Booting the ESP on /boot/efi just makes things unnecessarily complicated (at least with gummiboot).

I have a question - if I mount ESP to /boot, I don't even need a separate partition for /boot right? Every time there is a kernel upgrade, it gets copied to /boot which is nothing but the ESP! That's a good idea, but won't that cause issues as every OS (not all OSes are well behaved) on the machine deals with the ESP? Are there any security issues involved?

Offline

#9 2013-03-14 01:42:19

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [Solved] installation and setup question - gummiboot and EFI

lobo2 wrote:
65kid wrote:

As I said, mount the ESP on /boot. The kernel and initramfs are installed into /boot by default so you won't have to copy them to the ESP by hand evertime the kernel is updated. This is all explained in the note on the Gummiboot wiki page. Booting the ESP on /boot/efi just makes things unnecessarily complicated (at least with gummiboot).

I have a question - if I mount ESP to /boot, I don't even need a separate partition for /boot right? Every time there is a kernel upgrade, it gets copied to /boot which is nothing but the ESP! That's a good idea, but won't that cause issues as every OS (not all OSes are well behaved) on the machine deals with the ESP? Are there any security issues involved?

I don't believe gummiboot includes any filesystem drivers, so yes, you'll still need a separate /boot partition, formatted as FAT32 in order to load any EFI programs. The EFI firmware can't read ext4 or other fileststems. If you are trying to get away from the copying the kernel and initrd over every update, then FAT32 is required without extra drivers, if you are expecting the EFI firmware to read from that location. But, you might recheck gummiboot's requirements about where the kernel and initramfs need to be in relation to itself.

Last edited by sidneyk (2013-03-14 01:45:37)

Offline

#10 2013-03-14 02:04:59

lobo2
Member
Registered: 2013-03-13
Posts: 19

Re: [Solved] installation and setup question - gummiboot and EFI

sidneyk wrote:

I don't believe gummiboot includes any filesystem drivers, so yes, you'll still need a separate /boot partition, formatted as FAT32 in order to load any EFI programs. The EFI firmware can't read ext4 or other fileststems. If you are trying to get away from the copying the kernel and initrd over every update, then FAT32 is required without extra drivers, if you are expecting the EFI firmware to read from that location. But, you might recheck gummiboot's requirements about where the kernel and initramfs need to be in relation to itself.

I'm confused now. Didn't someone mention that I can mount the ESP partition, which is FAT, as /boot? I can mkdir boot in root partition and mount ESP there. In that case why would I need a separate partition (/dev/sda2  ext4 fs in  my case which I had plans to use as /boot) which wouldn't ever be used.

I understand that EFI firmware can only read FAT and that's the reason for the ESP to be FAT. gummiboot needs the kernel and initramfs in ESP, it can't read ext4 which is my root partition file system type.

Offline

#11 2013-03-14 02:18:36

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [Solved] installation and setup question - gummiboot and EFI

>Didn't someone mention that I can mount the ESP partition, which is FAT, as /boot?
Yes.
@sidneyk
I do not think filesystem drivers are relevant here.

Offline

#12 2013-03-14 02:42:59

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [Solved] installation and setup question - gummiboot and EFI

teateawhy wrote:

>Didn't someone mention that I can mount the ESP partition, which is FAT, as /boot?
Yes.
@sidneyk
I do not think filesystem drivers are relevant here.

Maybe not, I use rEFInd and mount ESP on /boot/efi and copy over updated kernels and initramfs. Maybe if you are mounting ESP at /boot the kernel and initramfs get written to both places at once, I don't know. I also don't know if /boot is where gummiboot expects them to be. But all the info I've found suggests that EFI firmware can only read FAT fileststems. I was just saying if what the OP was after was having EFI or gummiboot load kernels from a /boot directory, which is usually ext4, would require an extra filesystem driver unless gummiboot has been updated to include one, but I think I also read that gummiboot required the kernel and initramfs to be in the same directory with it.

Offline

#13 2013-03-14 02:52:05

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [Solved] installation and setup question - gummiboot and EFI

lobo2 wrote:
sidneyk wrote:

I don't believe gummiboot includes any filesystem drivers, so yes, you'll still need a separate /boot partition, formatted as FAT32 in order to load any EFI programs. The EFI firmware can't read ext4 or other fileststems. If you are trying to get away from the copying the kernel and initrd over every update, then FAT32 is required without extra drivers, if you are expecting the EFI firmware to read from that location. But, you might recheck gummiboot's requirements about where the kernel and initramfs need to be in relation to itself.

I'm confused now. Didn't someone mention that I can mount the ESP partition, which is FAT, as /boot? I can mkdir boot in root partition and mount ESP there. In that case why would I need a separate partition (/dev/sda2  ext4 fs in  my case which I had plans to use as /boot) which wouldn't ever be used.

I understand that EFI firmware can only read FAT and that's the reason for the ESP to be FAT. gummiboot needs the kernel and initramfs in ESP, it can't read ext4 which is my root partition file system type.

The question is whether when your kernel and initramfs get updated and rewritten at /boot and your ESP is mounted at /boot, then do they get written to both places - /boot on the filesystem as ext4 and the ESP mounted on /boot as FAT32 or does there still need to be a separate copy operation to the ESP? Maybe both places get written at the same time in their respective format, I don't know for sure, I haven't tried. If that is the case, then a separate /boot partition wouldn't be required.

Last edited by sidneyk (2013-03-14 02:52:33)

Offline

#14 2013-03-14 03:10:06

lobo2
Member
Registered: 2013-03-13
Posts: 19

Re: [Solved] installation and setup question - gummiboot and EFI

sidneyk wrote:

The question is whether when your kernel and initramfs get updated and rewritten at /boot and your ESP is mounted at /boot, then do they get written to both places - /boot on the filesystem as ext4 and the ESP mounted on /boot as FAT32 or does there still need to be a separate copy operation to the ESP? Maybe both places get written at the same time in their respective format, I don't know for sure, I haven't tried. If that is the case, then a separate /boot partition wouldn't be required.

If you mount ESP to boot directory under root ( /boot)  and if you write anything to /boot directory, it gets to the ESP. There are no two places, it is just one and it is the ESP. If you umount ESP, you will notice that /boot will be empty unless you add anything to /boot directory.

Although it is all good information, I think, we are kind of deviating from the issue. smile  i'm going over the install again, will post if I find anything unusual to my noob eyes.

Offline

#15 2013-03-14 04:16:44

lobo2
Member
Registered: 2013-03-13
Posts: 19

Re: [Solved] installation and setup question - gummiboot and EFI

Ok, i was able to complete the installation with a lot of trial and errors. I have kept the /boot partition and have ESP mounted on /boot/efi as that was how the system was setup initially.

I can see the gummiboot on boot now, but when I select Arch option, I get the following error -

Error loading \vmlinuz-linux: Not Found

arch.conf :

title          Arch Linux
linux          /vmlinuz-linux
initrd         /initramfs-linux.img

I left options line out as I wasn't very sure about it, I will update that and try again. Are linux and initrd values correct? The copy on ESP is /boot/efi/EFI/arch/vmlinuz-arch.efi

Offline

#16 2013-03-14 04:46:33

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [Solved] installation and setup question - gummiboot and EFI

lobo2 wrote:

Ok, i was able to complete the installation with a lot of trial and errors. I have kept the /boot partition and have ESP mounted on /boot/efi as that was how the system was setup initially.

I can see the gummiboot on boot now, but when I select Arch option, I get the following error -

Error loading \vmlinuz-linux: Not Found

arch.conf :

title          Arch Linux
linux          /vmlinuz-linux
initrd         /initramfs-linux.img

I left options line out as I wasn't very sure about it, I will update that and try again. Are linux and initrd values correct? The copy on ESP is /boot/efi/EFI/arch/vmlinuz-arch.efi

From the gummiboot wiki:

efi – EFI program to start, relative to your ESP (/boot); e.g. /vmlinuz-linux. Either this or linux (see below) is required.
options – Command-line options to pass to the EFI program. Optional, but you will need at least initrd=efipath and root=dev if booting Linux.
For Linux, you can specify linux path-to-vmlinuz and initrd path-to-initramfs; this will be automatically translated to efi path and options initrd=path – this syntax is only supported for convenience and has no differences in function.

It sounds to me like if you still have the kernel and initramfs at /boot/efi/EFI/arch/ then in the options you will have to specify the path to each, i.e. /efi/EFI/arch/*.

Last edited by sidneyk (2013-03-14 04:48:22)

Offline

#17 2013-03-14 05:14:43

lobo2
Member
Registered: 2013-03-13
Posts: 19

Re: [Solved] installation and setup question - gummiboot and EFI

changed the arch.conf to

title          Arch Linux
linux          /EFI/arch/vmlinuz-arch.efi
initrd         /EFI/arch/initramfs-arch.img
options root=UUID=uuid ro

now when I select arch, it goes to a blank screen and nothing happens.

Edit: I have put the right uuid of the root partition. i didn't want to copy it here so I wrote it in small case - uuid.

Last edited by lobo2 (2013-03-14 14:30:36)

Offline

#18 2013-03-14 06:47:27

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [Solved] installation and setup question - gummiboot and EFI

lobo2 wrote:

changed the arch.conf to

title          Arch Linux
linux          /EFI/arch/vmlinuz-arch.efi
initrd         /EFI/arch/initramfs-arch.img
options root=UUID=uuid ro

now when I select arch, it goes to a blank screen and nothing happens.

try "linux   /efi/EFI/arch/vmlinuz-arch.efi" and "initrd   /efi/EFI/arch/initramfs-arch.img", also the the "root=UUID=(the actual uuid from /etc/fstab here) ro". According to the wiki the paths have to be relative to /boot.

Last edited by sidneyk (2013-03-14 06:49:09)

Offline

#19 2013-03-14 07:05:08

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Re: [Solved] installation and setup question - gummiboot and EFI

@lobo2: try copy initramfs-linux-fallback.img  initramfs-linux.img  vmlinuz-linux in the /boot/ (or reinstall linux package after ESP mount as /boot) and in arch.conf :

title          Arch Linux
linux          /vmlinuz-linux
initrd         /initramfs-linux.img
options        root=PARTUUID=PARTUUID ro

PARTUUID from blkid.

Last edited by unikum (2013-03-14 11:46:35)

Offline

#20 2013-03-14 11:20:40

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [Solved] installation and setup question - gummiboot and EFI

lobo2 wrote:

Ok, i was able to complete the installation with a lot of trial and errors. I have kept the /boot partition and have ESP mounted on /boot/efi as that was how the system was setup initially.

ok, I'm gonna ignore the fact that I've already mentioned it three times and it is explained on the wiki page in a big fat note:
- do NOT mount the ESP on /boot/efi, this is a completely unnecessary PITA if you use gummiboot. mount it on /boot.
- you DON'T need yet another separate boot partition besides the ESP. The firmware will start gummiboot from the ESP and gummiboot will start the kernel from the ESP, no need for another partition.
- you DON'T have to do any copying  (be it manually or with systemd path units), the linux package will automatically install the kernel/initramfs on /boot (which is your ESP!), you can then simply specify \vmlinuz-linux and \initramfs-linux.img in the loader configuration (exactly like it is on the example on the wiki page!).

Offline

#21 2013-03-14 14:38:27

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

Re: [Solved] installation and setup question - gummiboot and EFI

lobo2 wrote:

changed the arch.conf to

title          Arch Linux
linux          /EFI/arch/vmlinuz-arch.efi
initrd         /EFI/arch/initramfs-arch.img
options root=UUID=uuid ro

now when I select arch, it goes to a blank screen and nothing happens.

What kernel are you using? There's a thread about a problem with these symptoms with certain kernels in the 3.7 series on certain motherboards:

https://bbs.archlinux.org/viewtopic.php?id=156670

Changing the kernel to one that's known to work for the people in that thread may be worth trying.

65kid wrote:

ok, I'm gonna ignore the fact that I've already mentioned it three times and it is explained on the wiki page in a big fat note:
- do NOT mount the ESP on /boot/efi, this is a completely unnecessary PITA if you use gummiboot. mount it on /boot.

I agree with this assessment when using gummiboot and when you have the ability to size all your partitions (including the ESP) ahead of time. Setting up partitions and mount points so that the kernel package drops the kernel file where the boot loader expects it is easier and less prone to errors that setting it up so that the kernel has to be copied after installation, even by an automated script.

sidneyk wrote:

Maybe not, I use rEFInd and mount ESP on /boot/efi and copy over updated kernels and initramfs. Maybe if you are mounting ESP at /boot the kernel and initramfs get written to both places at once, I don't know. I also don't know if /boot is where gummiboot expects them to be.

I realize this has been at least partially addressed by others, but I want to make two points very explicit:

  • In Linux, partitions (or more precisely, the filesystems that most of them contain) are accessed by mounting them at a mount point (a directory). Thus, when you mount the ESP at /boot, the contents of /boot are the ESP. Put another way, mounting the ESP at /boot means that to read or write the ESP, you read or write files and directories under /boot. You can test this yourself by mounting and unmounting a partition that's not basic to the minute-to-minute functioning of the computer. The ESP will actually work fine for this. Unmount it from /boot or /boot/efi and then issue a mount command to mount it elsewhere (say, "mount /dev/sda1 /mnt"). Then check the files under your temporary mount point, and even copy a file there. You can then unmount it and mount it back where you normally do and look for the file you copied -- it should be there. Play with this until you fully grok it.

  • Gummiboot runs before Linux, and it has no conception of Linux mount points. Thus, whether you mount the ESP at /boot, at /boot/efi, at /home/fred/abadmountpointforanesp is irrelevant, so long as the files on the ESP are laid out in the way that gummiboot expects. The trickiest aspect of this for those unfamiliar with the Linux mount system is that you do not include the Linux mount point in filename references for pre-boot programs like gummiboot. That is, if you mount the ESP at /boot and place the kernel at /boot/vmlinuz, then in gummiboot, the kernel would be \vmlinuz.

Offline

#22 2013-03-14 17:05:46

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [Solved] installation and setup question - gummiboot and EFI

srs5694 wrote:
sidneyk wrote:

Maybe not, I use rEFInd and mount ESP on /boot/efi and copy over updated kernels and initramfs. Maybe if you are mounting ESP at /boot the kernel and initramfs get written to both places at once, I don't know. I also don't know if /boot is where gummiboot expects them to be.

I realize this has been at least partially addressed by others, but I want to make two points very explicit:

  • In Linux, partitions (or more precisely, the filesystems that most of them contain) are accessed by mounting them at a mount point (a directory). Thus, when you mount the ESP at /boot, the contents of /boot are the ESP. Put another way, mounting the ESP at /boot means that to read or write the ESP, you read or write files and directories under /boot. You can test this yourself by mounting and unmounting a partition that's not basic to the minute-to-minute functioning of the computer. The ESP will actually work fine for this. Unmount it from /boot or /boot/efi and then issue a mount command to mount it elsewhere (say, "mount /dev/sda1 /mnt"). Then check the files under your temporary mount point, and even copy a file there. You can then unmount it and mount it back where you normally do and look for the file you copied -- it should be there. Play with this until you fully grok it.

  • Gummiboot runs before Linux, and it has no conception of Linux mount points. Thus, whether you mount the ESP at /boot, at /boot/efi, at /home/fred/abadmountpointforanesp is irrelevant, so long as the files on the ESP are laid out in the way that gummiboot expects. The trickiest aspect of this for those unfamiliar with the Linux mount system is that you do not include the Linux mount point in filename references for pre-boot programs like gummiboot. That is, if you mount the ESP at /boot and place the kernel at /boot/vmlinuz, then in gummiboot, the kernel would be \vmlinuz.

Yeah, I figured this out based on the OP's response to that and thinking it through, I just never really thought about it much before now. But I will argue that the mount point /boot and the EFI partition are indeed 2 different locations. I know that once the ESP is mounted at /boot that this distinction disappears until it is umounted and something written to /boot, but while mounted as such, /boot and ESP are virtually the same, at least to the Linux system. I realize the EFI programs are ran before any OS and therefore don't really care about any OS specifics.

I wonder if the OP has confused the info between gummiboot and rEFInd (possibly from the Beginners Guide) because to me, after reading the gummiboot wiki, it just seems that it would be much simpler to just give gummiboot what it wants, i.e. ESP mounted at /boot, whether it's a separate partion or not. I'll have to take a look again at the Beginners Guide to see again the order of things there, but if it isn't, maybe it should be having the user ensure that pacman has completely updated the new system and then go on to the boot loader specifics. I was just thinking though, that the way the install medium is now, that it was automatically pulling the latest stuff down as part of the install process. I know it's not pulling testing or multilib without user intervention, but the core, stable stuff it is. That seems to be part of the confusion here maybe, 2 different versions of gummiboot with gummiboot changing some things between the 2 and maybe the kernels, too.

[EDIT] I took another look at the Beginner's Guide and it says that most users will probably want to use the [core], [extra], and [community] repos, which are enabled by default. It goes on to recommend that [multilib] be enabled for users wanting to run 32 bit programs and then reminds you to run #pacman -Sy to update the package lists, but not #pacman -Syu which would apply any changes from the repos since starting the install. Shouldn't matter much, even if the [multilib] repo was enabled because at that point no 32 bit libs have been installed, but it would matter if a user decided to enable the testing repos.

I wouldn't ordinarily recommend it, but in this case, if the OP is comfortable with the risk, then it might be useful to, at least temporarily, enable the [testing] repo and do #pacman -Syu to pull in the 3.8 kernel. Note that this is likely to also pull in other packages from [testing], but if you haven't installed X yet or any desktop environment, then what is pulled in shouldn't be too overwhelming. He can then immediately go back and disable [testing] if desired. I'm currently using testing without any issues, but there are risks to doing so.

Last edited by sidneyk (2013-03-14 18:13:43)

Offline

#23 2013-03-15 00:38:50

lobo2
Member
Registered: 2013-03-13
Posts: 19

Re: [Solved] installation and setup question - gummiboot and EFI

@65KID - I'm aware of your responses. The big fat note wasn't available when I started setting up my machine and even if it was, I'm not very comfortable with that approach.  You will read why. Not to mention I have patitioned the system, installed Win OSes on it already and don't want to change the disk. I really appreciate your time. Thank you.

@srs5694 - Thank you for the link. I have the exact same make and model as the OP of that thread! (No, it's not me; I didn't time travel post that thread and come back here... big_smile )
Your explanation was spot on - it was exactly what I was thinking. The following sentence got me worried -

so long as the files on the ESP are laid out in the way that gummiboot expects

If I'm not wrong you mean that the gummiboot expects the files to be in the folder mentioned by the arch.conf, right? You don't mean that gummiboot is hard coded to look only in the root folder of ESP, do you?

The very fact that gummiboot didn't throw file not found error after changing the arch.conf, means that it is looking in the right directory as mentioned in the conf and it is not hard coded. The issue could be the firmware and kernel 3.7 series.

Thank you, your explanations rock.

@sidneyk - I read the wiki a couple of time and the gummiboot and other linked articles multiple times and I don't think I'm confused between rEFInd. I got the multilib already. I will either downgrade or upgrade the kernel once I get to my machine and let you know. I think, based on the information from the other thread, that should fix the issue.

The wiki article isn't very clear. I think this and gummiboot article needs editing. I will see what I can do once this issue is resolved.

===
As I pointed before -

lobo2 wrote:

I have a question - if I mount ESP to /boot, I don't even need a separate partition for /boot right? Every time there is a kernel upgrade, it gets copied to /boot which is nothing but the ESP! That's a good idea, but won't that cause issues as every OS (not all OSes are well behaved) on the machine deals with the ESP? Are there any security issues involved?

As per the bootloader spec(on freedesktop), the OS specific details should go in EFI directory on ESP. That is another reason I'm trying to put the kernel in EFi/arch/ directory. I can even remount the EFI/arch directory as /boot and get rid of my "boot" partition too. ( will try this out once the system works fine).

Question: Initially when I started reading about UEFI bootloaders, I was expecting it to start the kernel on any OS drive ( for e.g. arch kernel on boot partition with ext4) and it didn't turn out that way. Then I thought at least once the kernel on ESP starts the OS, the kernel on the boot drive will take over, this doesn't seem to be true. Can anyone tell me if the kernel on ESP is the only kernel used and if the kernel on boot partition (if setup that way)  is never executed?

EDIT: I got some more info from here - good read

Last edited by lobo2 (2013-03-15 01:01:28)

Offline

#24 2013-03-15 02:03:00

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

Re: [Solved] installation and setup question - gummiboot and EFI

lobo2 wrote:

The following sentence got me worried -

so long as the files on the ESP are laid out in the way that gummiboot expects

If I'm not wrong you mean that the gummiboot expects the files to be in the folder mentioned by the arch.conf, right? You don't mean that gummiboot is hard coded to look only in the root folder of ESP, do you?

No, I was referring to gummiboot's configuration files in the "loader" directory and to whatever is specified in the files in the "loader/entries" directory.

lobo2 wrote:

I have a question - if I mount ESP to /boot, I don't even need a separate partition for /boot right? Every time there is a kernel upgrade, it gets copied to /boot which is nothing but the ESP! That's a good idea, but won't that cause issues as every OS (not all OSes are well behaved) on the machine deals with the ESP? Are there any security issues involved?

In theory, another OS could replace your kernel or even wipe the ESP. If you're concerned about a malicious kernel replacement, then you might want to look into using Secure Boot; however, only very recent computers (mostly those that ship with Windows 8) support this. Random destruction (say, by a buggy OS installer) is more of an issue. This isn't an insurmountable problem, particularly if you're prepared -- keep a backup of the ESP somewhere else and you should be able to recover from such problems.

As per the bootloader spec(on freedesktop), the OS specific details should go in EFI directory on ESP. That is another reason I'm trying to put the kernel in EFi/arch/ directory.

That spec is, to date, merely a proposal, and it could change significantly or never be widely adopted. Thus, I don't recommend treating it as more than one suggestion among many at this point. That said, the EFI specification says that boot loaders should reside in "EFI/{OSname}" directories on the ESP. Putting the Linux kernel (with its EFI stub loader) elsewhere on the ESP is pushing the bounds of that rule, but I have yet to hear of problems because of this. Overall, I wouldn't worry too much about that detail, especially if you're using a boot loader or boot manager in the location that the EFI spec suggests.

Question: Initially when I started reading about UEFI bootloaders, I was expecting it to start the kernel on any OS drive ( for e.g. arch kernel on boot partition with ext4) and it didn't turn out that way. Then I thought at least once the kernel on ESP starts the OS, the kernel on the boot drive will take over, this doesn't seem to be true. Can anyone tell me if the kernel on ESP is the only kernel used and if the kernel on boot partition (if setup that way)  is never executed?

You don't normally see one kernel transferring control to another one. (Running a virtual machine might be an exception, since then you've got the host OS with its kernel and the guest OS with its kernel; and there are also some exotic methods for one kernel to transfer control to another newer one, intended for servers that can't afford downtime, but few kernel binaries include the support for this.) Beyond that, the use of the kernel on an ESP vs. on a partition with a Linux filesystem depends on the boot loader. Gummiboot is very limited in this respect; it can load a kernel from the partition on which gummiboot resides and no other. Normally this means the ESP, but gummiboot can be installed elsewhere if you're willing to jump through some more hoops. GRUB 2 is extremely flexible in this respect; it can load a kernel from almost any filesystem that Linux recognizes, from within an LVM, and more. ELILO, GRUB Legacy, and rEFInd all fall between these two extremes (with rEFInd's capabilities depending in part of which EFI filesystem drivers you install).

The bottom line: If you want to load a kernel from a Linux filesystem, ditch gummiboot. rEFInd and GRUB 2 are probably your best choices on this score. (Fedora's patched GRUB Legacy is also quite flexible, but AFAIK Arch's GRUB Legacy package doesn't include Fedora's patches for EFI support, and Fedora has moved on to GRUB 2, so GRUB Legacy's EFI support seems to be at a dead end.) Given that you're probably running into the EFI stub support problem with 3.7.x kernels, you might want to consider using GRUB, since that's a true boot loader that doesn't rely on the EFI stub support.

Offline

#25 2013-03-15 02:13:33

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [Solved] installation and setup question - gummiboot and EFI

As far as I know, only one kernel can run at a time. Whichever kernel gets read first is the one loaded into memory and controlling the system. If you were mounting the ESP at /boot (directory or partition) with gummiboot then you should be booting the kernel from the ESP/UEFI partition. Arch also writes kernels and initramfs to the same place, i.e. /boot. As you said earlier, if you umount /boot in this scenario then /boot on the filesytem will be empty, but the root of the ESP will still have your kernel and initramfs. No extra copying needed per the wiki. But if you mount ESP at /boot/efi then because Arch writes kernels and initramfs to /boot and they're probably on an ext4 filesystem, that's why the further copying is needed to place things in \EFI\arch\, a FAT32 filesystem, so that the boot manager can read it. Which is why I mentioned file system drivers earlier, some boot managers, such as rEFInd can utilize extra filesystem drivers to read kernels and initramfs from say an ext4 filesystem, but some, such as gummiboot can not and I think even require the kernel and initramfs to be in the same directory with it. I use rEFInd and mount ESP at /boot/efi, as per the beginners guide, and so I have to ensure that updated kernel / initramfs get copied over each time to \EFI\arch\, i.e. /boot/efi/EFI/arch.

Last edited by sidneyk (2013-03-15 03:21:33)

Offline

Board footer

Powered by FluxBB