How to rename UEFI bootloader entries


Presently, when I boot and press F9 I get a list of bootloaders I can choose from, with openSUSE Tumbleweed’s being the default. The problem is that one entry, namely:


has a name that does not tell one which OS it belongs to. I know it belongs to FreeBSD 11.2, but I’d like its name to reflect that. How is this an openSUSE problem, hence relevant to these forums? I’d like to do the renaming from openSUSE Tumbleweed. The most obvious tool to manipulate UEFI bootloader entries is efibootmgr, so using my own brain I’ve tried running:

efibootmgr --help | grep rename


man efibootmgr | grep rename

in the hope they would tell me how to do this, which they did not as both return absolutely nothing. I’ve also run these commands with

grep relabel

instead and neither returned any matches. So I’m here to ask whether you good, intelligent folk have any fixes for me.

Thanks for your time and patience,

You need to - as root - change the name shown in:


As an example I show below, I have marked it in bold for illustration purposes, the bit of this file that shows the name for my Windows 10 system.:

[INDENT=2]### BEGIN /etc/grub.d/30_os-prober ###[/INDENT]
[INDENT=2]menuentry ‘Windows 10’ --class windows --class os $menuentry_id_option ‘osprober-efi-CEDD-8593’ {[/INDENT]
[INDENT=2] insmod part_gpt[/INDENT]
[INDENT=2] insmod fat[/INDENT]
[INDENT=2] set root=‘hd0,gpt1’[/INDENT]
[INDENT=2] if x$feature_platform_search_hint = xy ]; then[/INDENT]
[INDENT=2] search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 CEDD-8593[/INDENT]
[INDENT=2] else[/INDENT]
[INDENT=2] search --no-floppy --fs-uuid --set=root CEDD-8593[/INDENT]
[INDENT=2] chainloader /EFI/Microsoft/Boot/bootmgfw.efi[/INDENT]

Before you make any changes I would suggest that you make a back-up copy of the file.

@dth2 mate, I think you misunderstood me. I know how to edit grub.cfg, I know how to edit /etc/grub.d/ files, I wouldn’t have mentioned efibootmgr if I was asking how to edit such entries. But what I’m asking is how to rename bootloaders themselves as they appear in the UEFI firmware. When I press F9 I see a heap of bootloaders, each belonging to a different OS. I’ll show the list as efibootmgr shows them, to try and clarify what I mean:

BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,3001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000C,000D,000F,2001,2002,2003
Boot0000* Notebook Hard Drive
Boot0001* opensuse
Boot0002* mageia
Boot0003* gentoo
Boot0004* debian
Boot0005* EFI HDD Device (WDC WD10JPVX-00JC3T0)
Boot0006* fedora
Boot0007* void
Boot0008* arch
Boot0009* opensuse-secureboot
Boot000A* centos
Boot000C* Slackware
Boot000D* Linux Boot Manager
Boot000F* CentOS
Boot0010* USB Hard Drive (UEFI) - UFD     USB Flash Drive
Boot2001* USB Drive (UEFI)
Boot2002* Internal CD/DVD ROM Drive (UEFI)
Boot3001* Internal Hard Disk or Solid State Disk
Boot3002* Internal Hard Disk or Solid State Disk

most of these bootloaders are GRUB installed by individual distros. That is, they’re made by running:

grub(2)-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sda

on their respective distro (the (2) is shown like that as not all distros call GRUB2’s grub-install command grub2-install like openSUSE does), while the FreeBSD bootloader (EFI HDD Device) was installed by FreeBSD’s installer. These aren’t entries mentioned in some distro’s grub.cfg file, they’re bootloaders installed to /dev/sda1 (my ESP partition). What I’m asking is how to rename FreeBSD’s bootloader, “EFI HDD Device (WDC WD10JPVX-00JC3T0)” as something more helpful like “FreeBSD 11.2”.

There is no rename option with efibootmgr. You need to create a new entry and specify all relevant parameters, such as:

efibootmgr --create --disk /dev/sda --part 1 --label test --loader /EFI/opensuse/grubx64.efi

Sorry mis-read your question. No idea I am afraid is this thread any help:-

That’s a device entry.

Named entries are for named systems. A device entry is for a device not otherwise known to the firmware.

The FreeBSD installer probably did not set it up correctly. (The Solus installer also did that when I last tested Solus).

The file “\EFI\Boot\bootx64.efi” in the EFI partition of that disk is the boot file. If you want to, you could copy that, and any other files in that directory, to a new directory, say “\EFI\freebsd” in that same EFI partition. Maybe rename it to “freebsd.efi” instead of “bootx64.efi”. And then use “efibootmgr -c” to create a new boot entry.

The man pages for “efibootmgr” are okay – sort of. But a little googling around will give you better guides for creating a new boot entry.

(add with edit): In the case with Solus, there was already a separate directory with the boot files. All I needed to do was add a named entry using “efibootmgr”. Maybe that’s also the case on your system.

Your answer was incredibly helpful, so thank you! :slight_smile: Thanks to it now I also have a way of creating a bootloader for FreeBSD even when I accidentally deleted it (e.g. with efibootmgr or silly stuff up, like one I just had with Fedora Rawhide which wiped all UEFI entries). After that Rawhide snaffoo I also had a hard time re-generating GRUB bootloaders for my Linux distros, as merely running:

grub(2)-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sda

from a chroot (with a live USB being the host system) into my installed distros didn’t cut it (changed the contents of /boot/efi, but no new entry in UEFI), even with efivars kernel module loaded. So you’ve saved me a lot of heartache, thanks, I’m going to be bookmarking this thread.

It’s OK we all make mistakes and I do appreciate that you’re trying to help. As for your link, its contents were largely the same as karlmistelberger’s answer, so thank you. :slight_smile:

Thanks also for your comments,nrickert, although after these good folks provided me some first-class answers I was no longer in need for help. I actually had written a reply you posted your comment, but since this fix I’ve been switching between distros, saving my reply in a text file. I copy-pasted this reply into the answer box and pressed “Submit Reply”, but unfortunately I needed to resign in with SUSE (which having to do every reboot is getting irritating) and it didn’t save my reply, hence why ye beat me in replying. :slight_smile:

Given the number of installations you have you might be interested in how I avoid the need to “press F9” described in this forum last month.