You are not logged in.

#1 2023-02-28 18:51:45

Hybrid Son Of Oxayotl
Member
Registered: 2010-07-09
Posts: 56

Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

I am running a triple boot system with Ubuntu and ArchLinux, and using Ubuntu's grub.
Since upgrading my linux package on Archlinux to kernel 6.2.arch1, I got the following error message

erreur : le noyau ne prends pas en charge le transfert d'EFI
erreur : le noyau doit d'abord être chargé.

(not sure why French translation is used so early in the boot process?)
which translate roughly to

error : kernel doesn't support EFI transfer
error : kernel must but loaded first.

Downgrading to kernel 6.1.12.arch1 makes the problem disappear and allow me to boot just fine.
The grub entry is :

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'ja-custom-made' {
	insmod part_gpt
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root faa74ed5-e5ee-49a3-af96-91004fe75a60
	else
	  search --no-floppy --fs-uuid --set=root faa74ed5-e5ee-49a3-af96-91004fe75a60
	fi
	linux /boot/vmlinuz-linux root=/dev/nvme0n1p5 rw
	initrd /boot/intel-ucode.img /boot/initramfs-linux.img
}

How can I boot on a 6.2 kernel? Should I open a bug for the kernel package?
Thanks.

Offline

#2 2023-02-28 18:57:16

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

https://bugs.archlinux.org/task/77632
Is there a newer version of grub from Ubuntu that supports LoadFile2?

Offline

#3 2023-02-28 19:18:18

Hybrid Son Of Oxayotl
Member
Registered: 2010-07-09
Posts: 56

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

I'm not sure how I can check that.
The grub version on Ubuntu:

user@machine:~$ apt list -a --installed grub*
En train de lister... Fait
grub-common/kinetic-updates,now 2.06-2ubuntu12.1 amd64  [installé]
grub-common/kinetic 2.06-2ubuntu12 amd64

grub-efi-amd64-bin/kinetic-updates,now 2.06-2ubuntu14.1 amd64  [installé, automatique]
grub-efi-amd64-bin/kinetic 2.06-2ubuntu12 amd64

grub-efi-amd64-signed/kinetic-updates,now 1.187.3+2.06-2ubuntu14.1 amd64  [installé]
grub-efi-amd64-signed/kinetic 1.185+2.06-2ubuntu12 amd64

grub-gfxpayload-lists/kinetic,now 0.7 amd64  [installé]

grub-pc-bin/kinetic-updates,now 2.06-2ubuntu12.1 amd64  [installé]
grub-pc-bin/kinetic 2.06-2ubuntu12 amd64

grub-pc/kinetic-updates,now 2.06-2ubuntu12.1 amd64  [installé]
grub-pc/kinetic 2.06-2ubuntu12 amd64

grub2-common/kinetic-updates,now 2.06-2ubuntu12.1 amd64  [installé]
grub2-common/kinetic 2.06-2ubuntu12 amd64

grub2/kinetic-updates,now 2.06-2ubuntu12.1 amd64  [installé]

If I understand this correctly:
https://bugs.launchpad.net/ubuntu/+sour … ug/1876620
I expect versions > 2.06-2ubuntu5 should support LoadFile2, but I'm not sure.

Offline

#4 2023-02-28 19:29:27

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

If you try linux-6.2-8 from the report I linked that re enabled  EFI_HANDOVER_PROTOCOL that will test if that is the cause of the issue.

Offline

#5 2023-02-28 19:43:56

Hybrid Son Of Oxayotl
Member
Registered: 2010-07-09
Posts: 56

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

Thanks, I installed linux-6.2-8 and booting worked!

Offline

#6 2023-02-28 21:44:49

Hybrid Son Of Oxayotl
Member
Registered: 2010-07-09
Posts: 56

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

Do you think I should open a bug on Ubuntu's bugtracker? And should I mark the topic as solved?

Offline

#7 2023-02-28 22:30:41

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

I do not know how to check the version of grub you are using is up to date with respect to the Ubuntu package you have installed.  If it is it would appear to be a Ubuntu bug.

Offline

#8 2023-03-01 19:48:27

kousu
Member
Registered: 2022-01-25
Posts: 9

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

I am also seeing this. Like drrossum in https://bugs.archlinux.org/task/77632, I'm using syslinux in EFI mode and after I ran

pacman -Syu

last night, my system no longer booted. Unlike with GRUB, I didn't get any error messages, just a black screen and a boot loop.

I was able to downgrade to 6.1.9 by logging in with a rescue disk and doing

[root@system ~]# cd /var/cache/pacman/pkg
[root@bomp /var/cache/pacman/pkg]# pacman -U linux-6.1.9.arch1-1-x86_64.pkg.tar.zst

and booting worked again. The broken kernel is indeed 6.2.1-arch1-1.

It seems to be exactly the bug diagnosed in https://bugs.archlinux.org/task/77632; and there's already even a helpful warning in the wiki (thanks to @nl6720 for being proactive about that):

Warning: Syslinux uses the deprecated EFI handover protocol, but officially supported kernels starting with version 6.2 are built without CONFIG_EFI_HANDOVER_PROTOCOL. Booting such kernels with UEFI Syslinux will fail.

Does that mean Arch is has no kernel with

CONFIG_EFI_HANDOVER_PROTOCOL

available? I knew syslinux's EFI support was fragile but this means it's basically dead right? The syslinux package should just remove its EFI support entirely since it's not compatible with the rest of Arch anymore.

What is my migration path? Like drrossum I also ran screaming from GRUB years ago. Looking over the options, I guess I could try out EFISTUB; but is GRUB the only fully functional bootloader left in Arch?

Last edited by kousu (2023-03-01 19:51:01)

Offline

#9 2023-03-01 21:21:55

kousu
Member
Registered: 2022-01-25
Posts: 9

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

For anyone in the same niche of using EFI syslinux who now cannot keep using it, I solved this by replacing it with Unified Kernel Image. It worked on the first try, which was pleasantly surprising.

Here's how I migrated from syslinux -> UKI:

1. Get my current kernel command line:

[root@bomp ~]# grep APPEND /boot/efi/boot/syslinux.cfg
    APPEND root=UUID=d17793cc-58e6-4061-a5fe-a45255e8f1e8 rw vga=773 consoleblank=600 iwlwifi.disable_11ac=true iwlwifi.disable_11ax=true
    APPEND root=UUID=d17793cc-58e6-4061-a5fe-a45255e8f1e8 rw
#        APPEND hd0 1

(ignore the second, it's for the fallback kernel; I hope UKI is smart about that? or maybe it just uses the same kernel command line for both?)

Paste it into

[root@system ~]# cat /etc/kernel/cmdline 
# iwlwifi bug workaround: https://bbs.archlinux.org/viewtopic.php?pid=2072845#p2072845
root=UUID=d17793cc-58e6-4061-a5fe-a45255e8f1e8 rw vga=773 consoleblank=600 iwlwifi.disable_11ac=true iwlwifi.disable_11ax=true

2. Copy-paste the sample config off the wiki into

[root@system ~]# cat /etc/mkinitcpio.d/linux.preset 
# mkinitcpio preset file for the 'linux' package

ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
ALL_microcode=(/boot/*-ucode.img)

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_options=""

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
fallback_options="-S autodetect"

default_uki="/boot/efi/boot/bootx64.efi"
default_options="--splash=/usr/share/systemd/bootctl/splash-arch.bmp"
fallback_uki="/boot/efi/boot/archlinux-linux-fallback.efi"

3. Re-install the kernel:

[root@system ~]# pacman -S linux

This triggered a `mkinitcpio -p linux`, which overwrote /boot/efi/boot/bootx64.efi (which had syslinux in it) with the UKI image. This also re-upgraded the kernel to the (broken-when-combined-with-syslinux) version.

4. Reboot.

It booted successfully and I am on the latest kernel again:

[root@system ~]# uname -a
Linux system 6.2.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 26 Feb 2023 03:39:23 +0000 x86_64 GNU/Linux

It worked on my first try (thanks ArchWiki!), and the boot was faster than normal since there was no bootloader to boot or bootloader menu to wait to timeout.

I think the migration path towards GRUB would be similar but might be a bit more convoluted.

Offline

#10 2023-03-03 21:28:26

Substring
Member
Registered: 2022-02-20
Posts: 13

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

I've rebuilt the kernel with patched config for CONFIG_EFI_HANDOVER_PROTOCOL=y, syslinux booted fine on EFI

Offline

#11 2023-03-03 22:00:14

kousu
Member
Registered: 2022-01-25
Posts: 9

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

That's interesting, substring. How did you do that? I guess you grabbed this folder, patched this line to read CONFIG_EFI_HANDOVER_PROTOCOL=y, and then ran `makepkg`, and installed that on your target system?

How do you plan to keep maintaining that? Are you going to rebuild the kernel yourself every time you need to upgrade? Did you put `IgnorePkg = linux` in your /etc/pacman.conf?

Offline

#12 2023-03-05 13:13:19

Substring
Member
Registered: 2022-02-20
Posts: 13

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

I'm personally using a patched kernel for various reasons, but it should somehow look like this (install asp git and base-devel first), more or less (partially tested, sorry)

asp checkout linux
cd linux/repos/core-x86_64/
sed -i "s/# CONFIG_EFI_HANDOVER_PROTOCOL is not set/CONFIG_EFI_HANDOVER_PROTOCOL=y/" config
makepkg -g >> PKGBUILD
makepkg --syncdeps --skippgpcheck 

Until Arch decides to enable it ...

Offline

#13 2023-03-05 14:13:52

Hybrid Son Of Oxayotl
Member
Registered: 2010-07-09
Posts: 56

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

loqs wrote:

I do not know how to check the version of grub you are using is up to date with respect to the Ubuntu package you have installed.  If it is it would appear to be a Ubuntu bug.

Thanks, I opened a bug report on Ubuntu's bugtracker!

https://bugs.launchpad.net/ubuntu/+sour … ug/2009292

Hopefully they will patch their version of Grub soon!

Offline

#14 2023-03-05 19:33:15

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

https://bugs.launchpad.net/ubuntu/+sour … comments/2

Julian Andres Klode wrote:

That is expected yes and there isn't anything we can do about this for the foreseeable future.

So Ubuntu can not implement the same behavior as implemented in systemd https://github.com/systemd/systemd/blob … nux.c#L108 of trying LoadFile2 before falling back to the legacy protocol e.g. add some code before https://github.com/rhboot/grub2/blob/61 … nux.c#L405

Offline

#15 2023-03-06 06:58:35

sges
Member
Registered: 2021-12-25
Posts: 4

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

I switched to the Arch linux-lts kernel package that still supports CONFIG_EFI_HANDOVER_PROTOCOL

Offline

#16 2023-03-09 00:35:40

Pgomes
Member
Registered: 2023-03-09
Posts: 1

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

First: Create a bootable USB stick with the "SystemRescue CD".
Second: Boot the system and select the "Boot a Linux Operating System installed on the disk (findroot)" option
Third: Downgrade the Kernel, see: https://www.youtube.com/watch?v=JEMVAuCKOn0
[SOLVED]

Last edited by Pgomes (2023-03-09 00:37:14)

Offline

#17 2023-03-11 22:43:24

rgomez
Member
Registered: 2023-03-11
Posts: 1

Re: Can't boot on kernel 6.2.arch1 &kernel 6.2.1.arch1, EFI transfer error

Hi I spent the whole day figuring out this issue just wanted to add that I'm using a Unified Kernel Image, using systemd-stub as the UEFI stub loader and generating signed bundles thought sbctl, and until I manually enabled EFI_HANDOVER_PROTOCOL in the config file all I got while booting was an endless BIOS loop. Seems like adding this change to the kernel they expected that it would only affect GRUB [1] but doesn't seem to be the case.

PS. The underlying reason was because I was using /boot/efi as ESP, once I switched to the recommended /efi location boot works even without EFI_HANDOVER_PROTOCOL.

[1] https://git.kernel.org/pub/scm/linux/ke … cf106afb6a

Last edited by rgomez (2023-03-12 09:17:38)

Offline

Board footer

Powered by FluxBB