Skip to content

fix efistub bootloader to use backslashes#4231

Open
h8d13 wants to merge 4 commits intoarchlinux:masterfrom
h8d13:upstream
Open

fix efistub bootloader to use backslashes#4231
h8d13 wants to merge 4 commits intoarchlinux:masterfrom
h8d13:upstream

Conversation

@h8d13
Copy link
Contributor

@h8d13 h8d13 commented Feb 15, 2026

As seen in wiki example:
https://wiki.archlinux.org/title/EFI_boot_stub#efibootmgr

efibootmgr --create --disk /dev/sdX --part Y --label "Arch Linux" --loader /vmlinuz-linux \
--unicode 'root=block_device_identifier rw initrd=\initramfs-linux.img'

Was just wondering why EFIstub never worked to boot and found this :)

#1431 #2684

@h8d13 h8d13 requested a review from Torxed as a code owner February 15, 2026 14:36
@codefiles
Copy link
Contributor

codefiles commented Feb 15, 2026

This does not fix anything, see the note at the bottom of Unified Extensible Firmware Interface#efibootmgr.

Edit: The note is not applicable to kernel parameters.

@h8d13
Copy link
Contributor Author

h8d13 commented Feb 15, 2026

This does not fix anything, see the note at the bottom of Unified Extensible Firmware Interface#efibootmgr.

Right so try without the patch and then with it? I do not think you had the time to do so ? Are you actively testing changes ? Also did you look at linked issues ?

Like we have never seen firmware quirks, and shouldn't respect the actual specification of provided example (because explicit is better than implicit :) ?

The conversion works for --loader not --unicode that goes straight to the firmware as is (hence the 'content here'. Have a good rest of your sunday, Hade

@codefiles
Copy link
Contributor

codefiles commented Feb 15, 2026

You are correct, the note I mentioned does not apply to the kernel parameters like initrd.

Relevant sections of the ArchWiki that support this change:

I have caught this before in the past but never submitted changes because I misunderstood the note. I also tested this same thing in the past but could not get it to work in my test environment.

@h8d13
Copy link
Contributor Author

h8d13 commented Feb 15, 2026

You can also also see it directly here: https://github.com/rhboot/efibootmgr/blob/main/src/efi.c#L330-L361
Which converts UTF-8UCS-2 directly https://uefi.org/specs/UEFI/2.10/13_Protocols_Media_Access.html#file-names

Copy link
Contributor

@codefiles codefiles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments that are extremely minor. Good to be merged as is.

h8d13 and others added 2 commits February 15, 2026 17:36
Co-authored-by: codefiles <11915375+codefiles@users.noreply.github.com>
Co-authored-by: codefiles <11915375+codefiles@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants