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:
EFI HDD Device (WDC WD10JPVX-00JC3T0)
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
and:
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.
@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:
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”.
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! 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:
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.
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.