Re: installing arch on efi/uefi 64bit motherboard

@srs5694 -- Thanks that makes a lot of sense, and no rEFInd / gummiboot haven't offendded me, I've never met them

I know that trying to boot the kernel with the native EFISTUB directly can be a on-going sensation of slight pain or discomfort in the lower abdomen / top of the legs region (i.e. "ball ache" -- or should that be "ball-Arch"?) but anyway I like a challenge, and as I said this method works fine when manually typed in to the built in EFI shell that came with my mainboard. However I did wonder if my NVRAM entry (yes I'm using efibootmgr) is missing the initial drive selection from the command chain? -- i.e. "fs0:" for me.

There's a load of 'text....with...lots....of...dots" after the efibootmgr output in the above which I've omitted for brevity, they looked like config option instructions anyway, the only important bit probably being -- "e.f.i.b.o.o.t.m.g.r. .v.e.r.s.i.o.n. .0...5...4..."

Re: installing arch on efi/uefi 64bit motherboard

wwgfd wrote:

There's a load of 'text....with...lots....of...dots" after the efibootmgr output in the above which I've omitted for brevity, they looked like config option instructions anyway, the only important bit probably being -- "e.f.i.b.o.o.t.m.g.r. .v.e.r.s.i.o.n. .0...5...4..."

Those are likely options passed to the last menu entry. I've not tested this, since I don't currently use such a configuration, but here's an entry that "efibootmgr -v" shows me that should boot a Linux kernel directly:

Re: installing arch on efi/uefi 64bit motherboard

srs5694 wrote:

wwgfd wrote:

There's a load of 'text....with...lots....of...dots" after the efibootmgr output in the above which I've omitted for brevity, they looked like config option instructions anyway, the only important bit probably being -- "e.f.i.b.o.o.t.m.g.r. .v.e.r.s.i.o.n. .0...5...4..."

Those are likely options passed to the last menu entry. I've not tested this, since I don't currently use such a configuration, but here's an entry that "efibootmgr -v" shows me that should boot a Linux kernel directly:

The characters interspersed with dots are options in UTF-16 format, which is the text format used by EFI. Without those options, or if they're corrupted in some way, the entry won't work correctly.

I am having the exact same experience as wwgfd. Like wwgfd, I can use the UEFI shell (I use the one from the arch usb) to manually type the command to boot the system. I've actually made a script for it on the ESP so that I can do it a little faster and compare the commands I am using to boot vs. the arguments I am passing with efibootmgr.

I have noticed that trying to use efibootmgr to edit an existing EFI entry does not work. I have to remove the entry and recreate it.

My guess is that I am using the wrong encoding to pass the arguments. I have tried inputting the text as ascii, utf-8, utf-16, and ucs2, all with and without the -u option on efibootmgr (I will double check that in a bit, I'm currently syncing the kernel git repo to try something else). What input is efibootmgr expecting? If I pass the arguments to efibootmgr as ucs2, what does the -u option do? Is the UEFI expecting UTF-8, UTF-16, or UCS-2?

Re: installing arch on efi/uefi 64bit motherboard

jumperpunk wrote:

My guess is that I am using the wrong encoding to pass the arguments. I have tried inputting the text as ascii, utf-8, utf-16, and ucs2, all with and without the -u option on efibootmgr (I will double check that in a bit, I'm currently syncing the kernel git repo to try something else). What input is efibootmgr expecting? If I pass the arguments to efibootmgr as ucs2, what does the -u option do? Is the UEFI expecting UTF-8, UTF-16, or UCS-2?

My understanding is that the pipeline should look something like this:

That's cut-and-pasted from my Web page on the topic, but IIRC I simply cut-and-pasted that from an Arch wiki somewhere, perhaps with some small changes. Note the "-" at the end of the command. That's critical, since it tells efibootmgr to accept binary arguments from stdin, which ultimately comes from the echo and iconv commands.

Re: installing arch on efi/uefi 64bit motherboard

I saw that on your page and from the archwiki. Unfortunately, no dice. I noticed the "-" at the end and I have been including it. I know that I am passing something, because I can see it when I do a 'efibootmgr -v', and it looks right, based on what I would expect, and what your output was. I will try again some tomorrow morning.

Re: installing arch on efi/uefi 64bit motherboard

FWIW, my computer was really picky about where my initramfs was. It did not like it being in /EFI/arch, so when I moved it to the root of the ESP on a whim, it suddenly worked. So I just store all my kernels and initramfs' there. It actually ends up making the command a bit shorter too. So this is what I would use:

@srs5694, the command in post #29 is right except you forgot to specify where the ESP is in the efibootmgr command. So you would need the --disk (-d) and --part (-p) for it to work. (It feels strange telling you that you have made a mistake, since it is from your web page that I found most of my understanding of UEFI)

Re: installing arch on efi/uefi 64bit motherboard

WonderWoofy wrote:

@srs5694, the command in post #29 is right except you forgot to specify where the ESP is in the efibootmgr command. So you would need the --disk (-d) and --part (-p) for it to work. (It feels strange telling you that you have made a mistake, since it is from your web page that I found most of my understanding of UEFI)

The default values for -d and -p are /dev/sda and 1, respectively, so they shouldn't be needed if you're using /dev/sda1 as your ESP. (OTOH, there could be a bug, or the man page could be out of date.) I've added mention of these options to my Web page, though; thanks for pointing out the omission.

Re: installing arch on efi/uefi 64bit motherboard

Well, I tried the 3.7-git branch to use the option that loads the kernel args from linux.conf, and it wont boot. I did something wrong in compiling my kernel. And now it won't boot to the stock pre-compiled kernel either, even after I did a chroot to remove the linux-git packages and reinstall the linux package. I will probably just start from scratch at this point as this is a fresh install.

@WonderWoofy, what symptoms did you see before moving the files? Was it similar to what wwgfd and I saw?

Re: installing arch on efi/uefi 64bit motherboard

jumperpunk wrote:

Well, I tried the 3.7-git branch to use the option that loads the kernel args from linux.conf, and it wont boot. I did something wrong in compiling my kernel. And now it won't boot to the stock pre-compiled kernel either, even after I did a chroot to remove the linux-git packages and reinstall the linux package. I will probably just start from scratch at this point as this is a fresh install.

@WonderWoofy, what symptoms did you see before moving the files? Was it similar to what wwgfd and I saw?

Are you sure the linux.conf support has been merged in the kernel??? I remember someone commenting that it hasn't been merged yet.

Re: installing arch on efi/uefi 64bit motherboard

89c51 wrote:

[...]Are you sure the linux.conf support has been merged in the kernel??? I remember someone commenting that it hasn't been merged yet.

No, I'm not sure. My understanding was that it was supposed to be included in 3.7, and the current git is an RC, so I assumed it would be there. Unfortunately, I didn't even get it to boot from the UEFI shell, so I couldn't even really test it.

Re: installing arch on efi/uefi 64bit motherboard

WonderWoofy wrote:

...my computer was really picky about where my initramfs was. It did not like it being in /EFI/arch, so when I moved it to the root of the ESP on a whim, it suddenly worked...

I'm still working to try to fix my UEFI boot setup...Any idea who manufactured you computer's motherboard please? -- just in case I or other people might have to make the same tweaks as youIt'd be great if you've got the motherboard model and 'BIOS' version too!

Of course failing any of that, just the computer make and model might give people enough to chase up the rest of the info for themselves.

Re: installing arch on efi/uefi 64bit motherboard

I have a Lenovo ThinkPad Edge E430. So it is Lenovo branded and Lenovo firmware. It is Phoenix Securecore Tiano though... not sure what else I can tell you, as I obviously don't have the same kind of info that I would if I had built a computer.

Re: installing arch on efi/uefi 64bit motherboard

jumperpunk wrote:

@WonderWoofy, what symptoms did you see before moving the files? Was it similar to what wwgfd and I saw?

It was basically truncating part of the initrd= line, so everytime it would tell me it could not read the initrd. It was loading the kernel though since that portion is fed to the efibootmgr command directly instead of being piped, coverted, then piped again.

I taked with the.ridikulus.rat who just got one of the same machines as I have, and he was having the exact same problem. I have to imagine it is a firmware bug, as this method works for others quite well.

Re: installing arch on efi/uefi 64bit motherboard

WonderWoofy wrote:

jumperpunk wrote:

@WonderWoofy, what symptoms did you see before moving the files? Was it similar to what wwgfd and I saw?

It was basically truncating part of the initrd= line, so everytime it would tell me it could not read the initrd. It was loading the kernel though since that portion is fed to the efibootmgr command directly instead of being piped, coverted, then piped again.

I taked with the.ridikulus.rat who just got one of the same machines as I have, and he was having the exact same problem. I have to imagine it is a firmware bug, as this method works for others quite well.

It sounds like there is a character limit that the firmware would take on the arguments line. Would it show the full argument line if you did an 'efibootmgr -v'? I had been using the partuuid to identify root, I may need to switch to /dev/sdaX.

UDPATE:I made my argument line as short as possible, and I still have the same problem.

Re: installing arch on efi/uefi 64bit motherboard

hmm... for kicks, I just installed Ubuntu to see how it handled the EFI stuff. It installed and booted just fine using EFI. It uses Grub, booting from an efi file located in the standard (\EFI\ubuntu\) location without passing any arguments. I am wondering if there is a bug in my firmware that prevents it from accepting arguments right.

@srs5694: does rEFInd use just an .efi file, or does it pass arguments to the efi?

Re: installing arch on efi/uefi 64bit motherboard

rEFInd passes arguments to the kernel, but it does not require that they be entered in your NVRAM. Since it seems you've got either a buggy firmware or a problem in entering the right data into the NVRAM, it's unlikely that this problem would affect rEFInd.

Re: installing arch on efi/uefi 64bit motherboard

jumperpunk wrote:

89c51 wrote:

[...]Are you sure the linux.conf support has been merged in the kernel??? I remember someone commenting that it hasn't been merged yet.

No, I'm not sure. My understanding was that it was supposed to be included in 3.7, and the current git is an RC, so I assumed it would be there. Unfortunately, I didn't even get it to boot from the UEFI shell, so I couldn't even really test it.

To answer this. There was a patch on the lkml (https://lkml.org/lkml/2012/3/18/45) but by looking at the kernel code -not that i understand much of it- it hasn't been merged. Maybe someone has to bug the maintainer or something. Anyway.

Re: installing arch on efi/uefi 64bit motherboard

Looks like I'm going to give rEFInd a try then. I'll update with the results.

[update]IT WORKS! Thank you! Now I just need to play with the settings to make rEFInd pretty (it wouldn't take my 1920x1080 res, lol) and customize it to make it, well... customized.

One suggestion, you may want to have it ignore the default \EFI\boot\bootx64.efi if Windows is installed. At least in my case, Windows 8 installed its bootloader here adn the \EFI\Microsoft as a "just in case" for hard-coded UEFIs. I am going to edit my refind file to ignore that directory, so it isnt a big deal, and it may break more people by default rather than help them.

Re: installing arch on efi/uefi 64bit motherboard

Hey, just thought I'd update my status on this thread --> I finally got my Kernel native 'EFISTUB' based boot loader working for Arch (YAY) !!!On my 120GB Kingspec SSD I get a 'cold' to login screen boot time of 3-4 seconds

How I achieved this small miracle:In all honesty credit here goes to the likes of srs5694 and WonderWoofy for some very helpful posts / contributions to this thread!

So what I did was just to use the efibootmgr tool to remove my old, broken Arch EFI boot entry, then I put my Kernel parameters in to a text file (rather than pass them on the command line) and used a modified command based on srs5694's example (and the one provided in the Arch Wiki's Beginner's Guide) to reference this file, the result being....

Given my experiences in trying to get this to work, along with the fact that I remember reading somewhere (unfortunately I can't find the link now) that the next Kernel release will support reading the boot params in from a text/config file, I recommend using this approach now as it should get you up and running and it'll make tweaking or altering your preferred Kernel parameters easier (as you can simply edit the text file and then just re-create the new (U)EFI boot entry with 'efibootmgr') -- plus it'll prepare your system for this future functionality of the Kernel!

Re: installing arch on efi/uefi 64bit motherboard

Unfortunately, I had already tried passing the arguments from a file (both by piping it through iconv and by pointing the '-@' argument to a file) as wwgfd suggested, and it made no difference for me. I tried it again just to see if I missed something, and it still does not work. I'm about 98% sure that it is an issue with the UEFI on my laptop (Dell Precision M4600).

I'll just be using rEFInd. As I'm dual-booting with Windows 8, it works well.

I can confirm this on an Asrock B75Pro ufi 64-bit mobo with an ssd that I partitionned using gdisk (GPT, 1 GB vfat partition + 200 MB boot with arch kernel & initramfs installed during install + lvm). Thank you the.ridikulus.rat, swordfish and Rod smith! Booting in USB (uefi) and checking as follows:

So after one finally succeeds booting from uefi usb media, all is needed is to chroot, and (re)install the bootloader into preinstalled Arch (or (re)install Arch from chroot) is that it?Am asking the more knowledgeable person, as this is omitted in both guide, or I missed it after a couple of short nights reading about uefi, gpt, alignment and digging into my mobos and hardware components (damn rusted screws)

EDIT: Oh m'lord but how do you tell rEFInd that it should load the kernel from sda2 /boot? Or since it finds it automatically,

As of refind-efi 0.6.5-1, refind now automatically detects kernels in /boot by default.

Having done as instructed in wiki:UEFI_Bootloaders#Using_rEFInd then got ou from chroot and unmounted /{(boot/efi),home} and rebooted, was presented with 2 new rEFInd entries (yes!), each showing the 2 EFI\arch_grub\grubx64*.efi that were installed during install (and yes it looks funky )Grub starts the logical volumes, and then can't find ROOT as the partuuid is the one from the third partition or physical volume.Which 1) confirms I cannot take care of more than one thing at a time as she says :-(and 2) so we should edit refind_linux.conf with something like this if using LVM?: