You are not logged in.

#1 2013-09-05 01:39:30

WoodenKettle
Member
Registered: 2013-09-05
Posts: 9

Having trouble UEFI booting with rEFInd

I don't mind normal installations. Once I have an install, I don't find Arch difficult to use or maintain.

What I suck at is UEFI installations. I've read all the documentation I can get my grubby little paws on and I still fail.

First of all I can never get a USB-install to boot properly in UEFI. So I bought an optical drive and (as my PC Is mini-ITX with no room for optical) I have it dangling out of my PC like a tentacle.

Using a CD installation, booting into UEFI is no problem. Doing the install is no problem. But I seem to always screw up the bootloader. After doing my thing, I reboot and it always fails.

What I did last time was have 512mb fat32 partition, and then a giant / partition on it's own SSD drive. Then I did my install and set the fat32 as /boot. Then I installed efibootmgr and put all the files the wiki tells me to into /boot/efi/EFI/arch/ (from memory that's the directory)

Is there any clearer guide on how to set up the boot for UEFI? The official one is a bit chaotic when it comes to the UEFI section. There seems to be so many ways to do it, without telling you how to know which you should choose for what situation. And you have to jump all over the place to different parts of the wiki. I've tried it a dozen times, following the guide word for word it never works out. The wiki guide in general is super comprehensive, but I find when it comes to UEFI boot, i read through it all and still don't really get it.

Last edited by jasonwryan (2013-09-05 02:46:55)

Offline

#2 2013-09-05 01:54:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Having trouble UEFI booting with rEFInd

Please edit your post and choose a more appropriate title:
https://wiki.archlinux.org/index.php/Fo … ow_to_Post


What boot manager/loader are you trying to use? Gummiboot is extremely simple and the wiki page is uncluttered.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-09-05 02:06:17

WoodenKettle
Member
Registered: 2013-09-05
Posts: 9

Re: Having trouble UEFI booting with rEFInd

I'm trying to boot the Linux kernel directly using EFISTUB.

Offline

#4 2013-09-05 02:23:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,548
Website

Re: Having trouble UEFI booting with rEFInd

I gather the new title is an attempt at humor - and if put as an aside in the thread it might serve as a lighthearted diversion if the real title were changed to something useful and informative.  But as-is, it is worse than the original - a thread title helps attract the attention of those users who could be most helpful, while also allowing for those who know they are not qualified to not have to skim through the thread.

May I suggest "Step-by-step UEFI boot guides needed" if that is what you are looking for suggestions on.

Last edited by Trilby (2013-09-05 02:24:21)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2013-09-05 02:25:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Having trouble UEFI booting with rEFInd

Yes, I got that bit. How are you proposing to boot?
https://wiki.archlinux.org/index.php/UE … ng_EFISTUB


Also, your choice of a title, while undoubtedly intended to be amusing, doesn't describe your issue. Please change it.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2013-09-05 02:34:54

WoodenKettle
Member
Registered: 2013-09-05
Posts: 9

Re: Having trouble UEFI booting with rEFInd

I've used rEFInd, but how is one to work out which one they should use? Or does it not matter?

I thought my original title was accurate, concise and to the point. I thought your qualm was that it was unsophisticated, that's why I spruced it up.

Offline

#7 2013-09-05 02:45:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Having trouble UEFI booting with rEFInd

It doesn't matter which one you use (unless you are dual booting). rEFInd is a fine choice. Post the details of your setup (partitions etc) and your refind conf. Make sure you are using PartUUIDs.

Re. the thread title: in the link I posted it explains that titles are expected to be descriptive: this is for your benefit as well as is respectful of the people whom you are asking for help.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2013-09-05 03:58:00

WoodenKettle
Member
Registered: 2013-09-05
Posts: 9

Re: Having trouble UEFI booting with rEFInd

My set up is just an SSD (I unplug all other drives), with a FAT32 512mb partition and a single root partition with the rest of the space. GPT partitioning. No swap partition.

I just use the default refind conf. From the rEFind website I gathered that that was okay? What changes to it am I supposed to make?

I managed a successful UEFI install quite a while back but I can't remember how I did it. But I don't remember having to edit the refind conf.

Offline

#9 2013-09-05 04:03:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Having trouble UEFI booting with rEFInd

WoodenKettle wrote:

I just use the default refind conf. From the rEFind website I gathered that that was okay? What changes to it am I supposed to make?

You have to point it at your root partition, for a start. Read the link I posted above; it includes a step-by-step guide for setting it up. Also, if you are going to use rEFInd, click through to Rod Smith's site and read his documentation: it is commendably clear and structured.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2013-09-05 04:10:42

WoodenKettle
Member
Registered: 2013-09-05
Posts: 9

Re: Having trouble UEFI booting with rEFInd

Alright I'll check it out. Thanks for the advice.

I'll be back if I get stuck smile

Offline

#11 2013-09-05 06:35:17

WoodenKettle
Member
Registered: 2013-09-05
Posts: 9

Re: Having trouble UEFI booting with rEFInd

Is gummiboot easier? It looks way easier. Is there any reason to use rEFind over gummiboy?

Offline

#12 2013-09-05 06:38:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Having trouble UEFI booting with rEFInd

jasonwryan wrote:

Gummiboot is extremely simple and the wiki page is uncluttered.

rEFInd is, as I understand it, more versatile. I have only ever used gummiboot and syslinux.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#13 2013-09-05 06:45:29

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

Re: Having trouble UEFI booting with rEFInd

Gummiboot is easier in my opinion.  But I also like the idea of manual configuration.  Gummiboot uses a directory structure for configuration, and separate files for each menu entry.  rEFInd I guess could be made to do this, but would have to be sourced from the main refind.conf (if you are using manual stanzas). 

I haven't used the rEFInd autoscan feature very much, but I have found in my minimal testing that it works pretty well.  You just need the default refind.conf in the same directory as the refindx64.efi binary that you launch.  Then you will also need the refind_linux.conf in the directory where you keep your kernels.  The refind_linux.conf will need to be modified slightly in order to make it port to the correct root=.  rEFInd will autoscan for kernels, and find matching initramfs'.  It will then apply the settings in refind_linux.conf as the kernel command line for these matches.

The install.sh that is mentioned in Rod Smith's docs is actually installed as /usr/bin/refind-install.  All the scripts that ship with rEFInd are a /usr/bin/refind-* name, presumably because install.sh is so damn generic.

Overall, I like gummiboot better as well.  I do keep rEFInd set up, and I do actually like it quite a bit.  But I just like gummiboot better because of its overall greater simplicity.  But I am kind of a bootloader/boot manager whore, and so I have gummiboot, rEFInd, grub2, elilo, syslinux-efi, and syslinux (bios) all installed on my machine.  Oh and direct firmware entries as well… and the UEFI Shell with whatever the autostart script is called.  Like I said, bootloader whore.

Offline

#14 2013-09-05 11:57:45

WoodenKettle
Member
Registered: 2013-09-05
Posts: 9

Re: Having trouble UEFI booting with rEFInd

Why do you have so many bootloaders? Don't they conflict?

I'm about to give gummiboot a twirl.

The Arch linux is comprehensive and I'm not knocking it in anyway, but I find statements like this confusing "Install gummiboot and run the following to install gummiboot:"

Is that just a stuff up or what?

Offline

#15 2013-09-05 12:56:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,548
Website

Re: Having trouble UEFI booting with rEFInd

As one who has only briefly tinkered (unsuccessfully) with UEFI, I agree that this is an area of documentation that isn't yet as clear as most arch wikis.

This may be due in part to the many options for UEFI booting and the variation in implementations by manufacturers.  It may also be that some of the standards are still getting the kinks worked out (AFAIK).  But from a user perspective, the wiki pages for UEFI sometimes read like a choose-your-own-(mis)adventure novel where you opt for lighting a candle or using a flashlight, only to be taken down different paths that end up bringing you back to the same starting point.

In the specific case you mention, I think that is partially a failing of the English language to have the nuances needed to express different aspects of computer software usage.  In one step you install the package to get the files and binaries onto your computer from a repo/mirror.  But then you need to run one of the binaries to move some code to the functional-equivalent of the MBR on the disk so that the bootloader you have installed (aka downloaded) from the repos is installed (aka activated) on the disk.

I thought about editing that wiki just now, but instead I'll make the suggestion for someone who knows the relevant terminology better.  Here's what I'm thinking:
"Install the gummiboot package, then run the following to install the bootloader code to the <insert proper term here>"
Would "EFI system partition" be the right term to insert there?

Last edited by Trilby (2013-09-05 13:03:26)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#16 2013-09-05 16:35:56

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

Re: Having trouble UEFI booting with rEFInd

In its most basic form, you would do:

1) Install bootloader or boot manager package
2) Copy the efi application to the ESP (gummiboot is /usr/lib/gummiboot/gummibootx64.efi)
3) Ensure you have configured your chose bootloader or boot manager (ie. make the <ESP>/loader/loader.conf and <ESP>/loader/entries/*.conf files for gummiboot)
4) Make a firmware entry for your bootloader with efibootmgr.
5) Boot that shit, ensuring that your new firmware entry is now the default/highest priority.

Unfortunately, because of craziness with firmware bugs and different vendor's implemenetations of UEFI, this is not always as striaght forward as it might seem.  Typically the problems arise when you get to step 4 and want to ensure that the firmware is capable of recognizing your boot manager.  So if efibootmgr fails, you can use the UEFI shell's bcfg.

But if the firmware just plain won't allow you to write firmware entries for whatever reason, you can still get around things by using the "default" spot of the ESP.  Because a removable media is not likely to have a firmware entry, the spec states that UEFI should default to \EFI\BOOT\BOOTX64.EFI.  So whatever is there is what will be booted in the event that UEFI is enabled and you select the disk to boot from (just like you would have done with legacy bios).

To make things even more stoopid, some vendors don't follow that "default" part of the spec, and instead default to the M$ bootloader.  I have never had to use this, so I cannot tell you exactly what it is called, but I'm sure the wiki page has some info on it.


As far as my gazillion bootloaders, the beauty of UEFI is that you are not limited to one bootloader.  With legacy bios, you had one boot sector per disk. Period.  You couldn't write more than one bootloader to that section, and in fact, today's bootlaoders didn't even fit in that section.  So with UEFI, that limitation is done away with because the "boot sector" now becomes the EFI System Partition, which you can make as big or small as you like, and you can have as many as you please (unless you use windows I think, which freaks out if there is more than one).  So you can stick as many things as you like in that ESP, and you can create as many firmware entries as your NVRAM can safely fit.

Over the past few kernel versions, efistub has been a bit wonky for some users.  For me, it has worked great most of the time, but it did break on me once.  So that is why I started trying other things, and particularly why I set up elilo and syslinux-efi, as these do not rely on the efistub loader, and instead are capable of loading the kernel and intramfs on their own.

Hopefully this post makes thigns a bit more clear for you.

Offline

#17 2013-09-05 22:11:50

WoodenKettle
Member
Registered: 2013-09-05
Posts: 9

Re: Having trouble UEFI booting with rEFInd

Trilby wrote:

EFI sometimes read like a choose-your-own-(mis)adventure novel where you opt for lighting a candle or using a flashlight, only to be taken down different paths that end up bringing you back to the same starting point.

big_smile

The rest of the Arch Wiki is easy to follow. The UEFI sections do start to get a little crazy. It's obviously just the nature of the current UEFI install but I find it difficult. It's probably a breeze to use for someone who knows what they're doing, but the wiki is for people who don't!

WonderWoofy wrote:

Hopefully this post makes thigns a bit more clear for you.

Thanks, that's actually a really helpful post. And I didn't know about the efistub issues. Hopefully they're rare :3

Offline

#18 2013-09-05 23:40:41

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

Re: Having trouble UEFI booting with rEFInd

There is a massive thread about unbootable efistub from sometime about 3.7 and the thread goes for quite some time.  But the noise there eventually died down.  Recently though there have been reports that 3.10.10 has not been efistub friendly.  Though on my machine it works just fine.

So after you figure out how to get rEFInd or gummiboot up and running, I would recommend setting up either elilo or syslinux-efi.  Grub-efi is actually mroe comples to set up, and I think that if you are having trouble getting UEFI in general set up, you should stay away from that for now.  The only real reason I have it set up is because it can be used to boot ISOs directly via loopback.  Originally I had wanted to do this with syslinux's memdisk, only to find out that the memdisk functionality is a bios specific thing (for now?).

Offline

#19 2013-09-06 00:12:34

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

Re: Having trouble UEFI booting with rEFInd

In my case, the noise quieted down because keep posting "still doesn't work" with every kernel update gets old after a while. However, I do seem especially unlucky. Except that the bug is nicely consistent - but efforts to troubleshoot it have so far not produced much by way of fruit sad.


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

#20 2013-09-06 00:33:36

WoodenKettle
Member
Registered: 2013-09-05
Posts: 9

Re: Having trouble UEFI booting with rEFInd

If I have 1 ssd drive for Arch and a separate ssd drive for Windows, and I just swap them out (physically) when I wish to use the other OS, then i don't need to do anything special with my boot set up right? As when I switch the drives they're both unaware of the others existence?

Offline

#21 2013-09-06 00:50:30

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

Re: Having trouble UEFI booting with rEFInd

Well the nvram entries will not be swapped out with the drive so you would need two entries (one per drive) and you would only be able to have one as default. Still, I think the machine should then automatically fall back to the second when the first is unavailable.

EDIT: By the way, I noticed earlier that you were mounting the ESP at /boot but installing the EFI applications to /boot/efi/EFI/... but that's wrong. If you mount the ESP at /boot, you need /boot/EFI/... If you use /boot/efi/EFI/... then you would probably be mounting at /boot/efi. (That is, you can probably use the non-defaults but that would mean altering the config appropriately and it would also depend on your choice of boot loader/manager etc.)

Last edited by cfr (2013-09-06 00:53:33)


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

#22 2013-09-06 01:10:23

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

Re: Having trouble UEFI booting with rEFInd

If you want to use gummiboot for example, you should either a) make a gummiboot entry, and then install gummiboot onto both ESPs, or b) boot the "default" spot by choosing the device itself, and have gummiboot at \EFI\boot\bootx64.efi on your Linux disk and the windows efi application in the same spot on your windows disk. 

Of course, if you use the gummiboot way, you will have to have gummiboot set up to boot windows or Linux as appropriate.


Edit: And BTW, I will second the fact that cfr has been especially unlucky with a buggy firmware and the efistub breakage. 

Edit2: If you use gummiboot, and you actualy mount your ESP at /boot, then it *should* install gummiboot for you at /boot/EFI/gummiboot/gummibootx64.efi as well as /boot/EFI/boot/bootx64.efi.  It should also attempt to create a firmware entry for you.  If you already have the gummiboot package on your machine, and you didn't end up with this, you can use gummiboot install to see if you can get it to work.  Just amke sure your ESP is mounted at /boot when you issue that command.  If you mount it at /boot/efi, then you can do gummiboot --path=/boot/efi install and it should do the same thing.

Last edited by WonderWoofy (2013-09-06 01:13:38)

Offline

#23 2013-09-06 01:34:42

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

Re: Having trouble UEFI booting with rEFInd

WonderWoofy wrote:

If you want to use gummiboot for example, you should either a) make a gummiboot entry, and then install gummiboot onto both ESPs...

How would this work? Won't the gummiboot entry be specific to one disk or other? That is, the entries in nvram use the partuuid of the ESP. Won't that differ between the two ESPs?


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

#24 2013-09-06 02:36:42

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

Re: Having trouble UEFI booting with rEFInd

That is a good point… I guess you could specify the GUID of both to ensure that they are the same.  But if you don't do that, no it won't actually work.

Offline

Board footer

Powered by FluxBB