You are not logged in.

#1 2024-02-15 19:10:26

raphaelabb
Member
From: France
Registered: 2021-02-03
Posts: 32

[SOLVED] efibootmgr entries

Hello,

I need some explanations about efibootmgr.
I've just migrated my two Arch install bootloaders from GRUB to systemd-boot.

My partition scheme is so:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 111,8G  0 disk 
├─sda1   8:1    0   476M  0 part 
└─sda2   8:2    0 111,3G  0 part 
sdb      8:16   0 447,1G  0 disk /mnt/sdb
sdc      8:32   0 111,8G  0 disk 
├─sdc1   8:33   0   499M  0 part /boot
└─sdc2   8:34   0 111,3G  0 part /

sda is my first Arch Linux with an elaborate GUI for my wife (one boot partition, one root partition).
sdb is a hard drive for data.
sdc is the second Arch Linux (same structure as sda but for myself).
Nothing more, no encryption.

I don't want dual-booting from one /boot partition, I want the two drives to be independant,  therefore I have two entries inside my motherboard UEFI.
Everything works fine, I got the boot entry called "Linux Boot Manager" after the first migration and then boot entry names changed to "UEFI OS" after the second migration. It's not really a problem since "UEFI OS" is followed by the SATA id in brackets in the motherboard menu.

I wanted to rename the UEFI boot entries : "Arch Linux 1" and "Arch Linux 2", after a bit of reading it turns out efibootmgr cannot rename boot entries (which I'm not 100% sure of). But one could delete an entry and create another one:

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

The above command (from Arch LInux Wiki) did create working entries. But the previous entries I deleted with

# efibootmgr -b X -B

came back (I suppose they were created back by systemd-boot using /boot/loader/loader.conf and configuration files inside /boot/loader/entries.
So, I ended up with two pairs of entries inside my UEFI boot menu. And they all work fine.
Here is my interrogation:
Since efibootmgr lets us create boot entries with all the parameters UEFI needs (boot partition and root partition location, initramfs...), is systemd-boot needed? Is a bootloader needed?
And is it really impossible to rename UEFI boot entries in a simple manner?

Last edited by raphaelabb (2024-02-16 08:44:28)

Offline

#2 2024-02-15 19:54:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,756

Re: [SOLVED] efibootmgr entries

is systemd-boot needed? Is a bootloader needed?

As you've found out, no. The entries you generated take over the job of the bootloader, which is called EFISTUB loading. https://wiki.archlinux.org/title/EFISTUB

As for renaming it's likely you can't directly. this might well be because there are many UEFI implementations that implement things differently and an in place replacement could lead to broken entries. The fact that your deleted entry comes up again is likely a implementation detail of your specific UEFI firmware and you might have to use it's interface to explicitly delete things.

FWIW systemd-boot also installs the fallback loader location esp/EFI/BOOTx64.EFI which will be presented automatically by all UEFI implementations, so it's likely that's the entry you see. That one will generally disappear in the absence of this file.

Offline

#3 2024-02-15 20:32:34

raphaelabb
Member
From: France
Registered: 2021-02-03
Posts: 32

Re: [SOLVED] efibootmgr entries

Ok,
I hadn't read the beginning of the wiki EFISTUB chapter, it's all in there. I will stick with systemd-boot anyway since it does not require more stuff to install.
My first intention was to get rid of GRUB, first because Arch already has a default bootloader and secondly GRUB configuration has always been a bit obscure to me.
Maybe the Wiki should emphasize the use of systemd-boot in the Installation guide section.
Thanks for the rapid and efficient intervention.

Offline

#4 2024-02-16 13:45:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,756

Re: [SOLVED] efibootmgr entries

Arch has very few default anythings and certainly not inherently prefers systemd-boot or GRUB. That's up to the user to confgure the way they want to. Case in point, I'm not using systemd-boot because it limits the partitions my kernel can reside on (and I don't trust FAT32 to reliably store my kernel, I've had quite a few occurences where the FAT partition table got corrupted for some reason, so minimizing interactions that write there is important to me), GRUB has no such limitation. The goal of the wiki and installation guide is to serve as a general guideline on which you can make decisions about the path you want to take. It's discouraged to give clear cut preferences in the installation guide, this is something the user is "expected" to evaluate and execute themselves.

Last edited by V1del (2024-02-16 13:47:18)

Offline

#5 2024-02-17 01:55:39

raphaelabb
Member
From: France
Registered: 2021-02-03
Posts: 32

Re: [SOLVED] efibootmgr entries

It's not what I meant. The Wiki is of course not the place to give preferences. What I meant is that I discovered systemd-boot rather late in the reading of Arch guide. I did not know much about bootloaders and like many, I initially went with GRUB because all the distributions I had run before used it. Even though I did not fully understand boot process, I could at least make it work. Now that I know more, I thought I'd go for a "simpler" bootloader (or at least with a configuration I understand more) since my machine configuration and my needs are minimal. I realized I just don't have the need for GRUB more complete features and didn't have to install it in the first place. But again, I am not that advanced a user and maybe I should have read more about bootloaders before installing...

Offline

Board footer

Powered by FluxBB