Results 1 to 8 of 8

Thread: How to rename UEFI bootloader entries

  1. Smile How to rename UEFI bootloader entries

    Hi,

    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:

    Code:
    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:

    Code:
    efibootmgr --help | grep rename
    and:

    Code:
    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
    Code:
    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,
    Brenton
    Brenton Horne: Linux enthusiast and writer of ​The Hornery.
    Seven favourite distros
    : Arch, Fedora, Gentoo, openSUSE Tumbleweed and Void.

  2. #2
    Join Date
    Jun 2008
    Location
    Stoney Stanton - England
    Posts
    1,102

    Default Re: How to rename UEFI bootloader entries

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

    boot/grub/grub.cfg

    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.:

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

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

  3. Default Re: How to rename UEFI bootloader entries

    @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:

    Code:
    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:

    Code:
    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".
    Brenton Horne: Linux enthusiast and writer of ​The Hornery.
    Seven favourite distros
    : Arch, Fedora, Gentoo, openSUSE Tumbleweed and Void.

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    885

    Default Re: How to rename UEFI bootloader entries

    Quote Originally Posted by fusion809 View Post
    Hi,

    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:

    Code:
    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:

    Code:
    efibootmgr --help | grep rename
    and:

    Code:
    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
    Code:
    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,
    Brenton
    There is no rename option with efibootmgr. You need to create a new entry and specify all relevant parameters, such as:


    Code:
    efibootmgr --create --disk /dev/sda --part 1 --label test --loader /EFI/opensuse/grubx64.efi
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  5. #5
    Join Date
    Jun 2008
    Location
    Stoney Stanton - England
    Posts
    1,102

    Default Re: How to rename UEFI bootloader entries

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

    https://bbs.archlinux.org/viewtopic.php?id=155830

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,345
    Blog Entries
    3

    Default Re: How to rename UEFI bootloader entries

    Quote Originally Posted by fusion809 View Post
    The problem is that one entry, namely:

    Code:
    EFI HDD Device (WDC WD10JPVX-00JC3T0)
    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.
    Last edited by nrickert; 02-Sep-2018 at 07:02.
    openSUSE Leap 15.1; KDE Plasma 5;

  7. Default Re: How to rename UEFI bootloader entries

    Quote Originally Posted by karlmistelberger View Post
    There is no rename option with efibootmgr. You need to create a new entry and specify all relevant parameters, such as:
    Code:
    efibootmgr --create --disk /dev/sda --part 1 --label test --loader /EFI/opensuse/grubx64.efi
    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:

    Code:
    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.

    Quote Originally Posted by dth2
    Sorry mis-read your question. No idea I am afraid is this thread any help: https://bbs.archlinux.org/viewtopic.php?id=155830
    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.
    Brenton Horne: Linux enthusiast and writer of ​The Hornery.
    Seven favourite distros
    : Arch, Fedora, Gentoo, openSUSE Tumbleweed and Void.

  8. #8
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,564

    Default Re: How to rename UEFI bootloader entries

    Quote Originally Posted by fusion809 View Post
    ...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:

    [code]BootCurrent: 0001
    Timeout: 0 seconds
    BootOrder: 0001,3001,0002,0003,0004,0005,0006,0007,0008,0009,000A,000C,000D,000F,2001,2002,2003...
    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.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •