You are not logged in.

#1 2013-06-23 20:24:05

kasu
Member
Registered: 2013-06-23
Posts: 8

I can't figure out how to boot Arch in UEFI mode

For some reason, my laptop is unable to load Arch from a flash drive in UEFI mode.  It gives me a kernel panic every time right at the start.  So in legacy/compatability mode, I followed the beginner's guide to the point where I'm supposed to install/configure a bootloader, but I can't setup the EFISTUB unless I'm in UEFI mode.  According to the guide, this shouldn't be a problem, because I can "enter the UEFI shell and manually add an entry to the UEFI boot menu with the bcfg command, as described here."

For whatever reason, the section it refers to about the bcfg command doesn't provide an example of actually adding the Arch boot entry, instead providing an example for adding rEFInd.

I've been searching for information about this for way too long, and I still haven't been able to find what I need to get this working.  Will someone help me through this?  My ESP is sda1 and root partition is sda2.

I downloaded and copied rEFInd to my flash drive, per these instructions, then copied both shellx64_v2.efi and rEFInd to my hard drive's ESP.  Running rEFInd from the UEFI shell, Arch's entry is this:
ro root=UUID=94291885-47e7-4e8e-a4b4-7e73e56f38ea initrd=boot\initramfs-linux.img

For some reason, starting from this point, Arch gets hung up after mounting /home with "A start job is running for dev-disk-by\...device" and eventually ends with "Dependency failed for /boot/efi" and "Dependency failed for Local File Systems," leaving me in emergency mode.  That could just be some mistake I made during installation though.

Last edited by kasu (2013-06-24 00:00:58)

Offline

#2 2013-06-24 00:08:01

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

Re: I can't figure out how to boot Arch in UEFI mode

Welcome to Arch!

First, did you follow the Beginners' Guide? If not, you should.

Second, I am a bit confused by what you are describing. Have I got this right? As I understand it, you installed Arch except for the boot loader/manager to your hard disk. You were unable to do this while booted in UEFI mode because you couldn't boot Arch in UEFI mode from the live media. You can, however, boot from the USB drive in UEFI mode but you cannot work out how to add the boot menu entry. When you try to use the UEFI USB to boot Arch, you get dropped to emergency mode.

I think that the problem of being dropped to emergency is due to some error you made during installation and configuration. To get dropped to emergency mode, you must be successfully booting the kernel. The easiest way to fix those errors will be to boot the Arch install media and arch-chroot into your new installation as you did during installation. In some cases, you may be able to fix things without chrooting and just mounting your partitions.

The issue of getting the boot loader/manager installed is distinct. You can do everything except adding the boot menu entry while booted in bios mode. For example, you can install rEFInd and put all of the configuration files in the right places etc. Double check fstab. Can it not find your ESP to mount?

One thing that may work is to copy the refind binary to EFI/boot/bootx64.efi on your ESP. You would need to copy the other files from rEFInd's config directory there as well (refind.conf, any drivers you are using, the icons directory etc.). That isn't guaranteed, but on many systems you can then boot without the entry being added to the boot menu. Once booted, you can then add a regular entry for the regularly installed copy of rEFInd. I actually keep a suitable .efi in that location for just this reason since my laptop has a tendency to wipe the efi boot menu and this way I can still boot and fix things.


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

#3 2013-06-24 02:12:14

kasu
Member
Registered: 2013-06-23
Posts: 8

Re: I can't figure out how to boot Arch in UEFI mode

cfr wrote:

Welcome to Arch!

First, did you follow the Beginners' Guide? If not, you should.

Yes, I followed the beginner's guide to the point where I'm supposed to install/configure a bootloader.

Second, I am a bit confused by what you are describing. Have I got this right? As I understand it, you installed Arch except for the boot loader/manager to your hard disk. You were unable to do this while booted in UEFI mode because you couldn't boot Arch in UEFI mode from the live media. You can, however, boot from the USB drive in UEFI mode but you cannot work out how to add the boot menu entry. When you try to use the UEFI USB to boot Arch, you get dropped to emergency mode.

Basically, except I downloaded and copied rEFInd to my flash drive, per these instructions, then copied both shellx64_v2.efi and rEFInd to my hard drive's ESP.  So I am no longer booting off a flash drive.

I think that the problem of being dropped to emergency is due to some error you made during installation and configuration. To get dropped to emergency mode, you must be successfully booting the kernel. The easiest way to fix those errors will be to boot the Arch install media and arch-chroot into your new installation as you did during installation. In some cases, you may be able to fix things without chrooting and just mounting your partitions.

I tried reinstalling Arch completely.  I got a new error message now, complaining that "device '' not found. Skipping fsck." and "Unable to find root device ''."  I have repeated the install steps at least 5 times now, checking mkinitcpio.conf and even skipping it altogether, repartitioning, naming partitions, making sure I typed everything correctly.  I can't figure out what has changed...

The issue of getting the boot loader/manager installed is distinct. You can do everything except adding the boot menu entry while booted in bios mode. For example, you can install rEFInd and put all of the configuration files in the right places etc. Double check fstab. Can it not find your ESP to mount?

My fstab correctly lists the ESP.

One thing that may work is to copy the refind binary to EFI/boot/bootx64.efi on your ESP. You would need to copy the other files from rEFInd's config directory there as well (refind.conf, any drivers you are using, the icons directory etc.). That isn't guaranteed, but on many systems you can then boot without the entry being added to the boot menu. Once booted, you can then add a regular entry for the regularly installed copy of rEFInd. I actually keep a suitable .efi in that location for just this reason since my laptop has a tendency to wipe the efi boot menu and this way I can still boot and fix things.

Yes, this was what I did in the OP.  Thanks for the reply!  I don't plan on using rEFInd though, opting to boot directly into Arch.  Unfortunately, there seems to be a new issue, so I'm stuck for now.

Offline

#4 2013-06-24 02:56:32

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

Re: I can't figure out how to boot Arch in UEFI mode

Post fstab and whatever you are using to boot. If that's a command line in the shell, post that. If it is an efi boot menu entry, post that. If it is refind, post refind.conf and refind_linux.conf. Also ls -R  <path to your ESP>.


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-06-24 03:32:50

kasu
Member
Registered: 2013-06-23
Posts: 8

Re: I can't figure out how to boot Arch in UEFI mode

Thanks!  I already made a new thread for this issue, so I responded to you in that one.

https://bbs.archlinux.org/viewtopic.php?pid=1291664

Offline

#6 2013-06-24 04:42:17

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: I can't figure out how to boot Arch in UEFI mode

kasu wrote:

Thanks!  I already made a new thread for this issue, so I responded to you in that one.

https://bbs.archlinux.org/viewtopic.php?pid=1291664

Please don't do that, it is a form of cross-posting. Thank-you for at least linking to it for future Googlers to follow.

I will close this one and discussion can continue in the other thread.

Offline

Board footer

Powered by FluxBB