UEFI boot entry named 'ubuntu' should be called 'Ubuntu'

Bug #2026310 reported by Steve Langasek
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Undecided
Mate Kukri
shim-signed (Ubuntu)
New
Undecided
Mate Kukri

Bug Description

Currently, when grub creates the UEFI boot entry it gives it the name 'ubuntu'.

I have 28 boot entries on my laptop, and this is the only one starting with a lowercase letter.

Ubuntu is a proper name; the boot entry should be called 'Ubuntu'.

(Care should be taken when fixing this to ensure that on upgrade we don't end up with both 'ubuntu' and 'Ubuntu' boot entries.)

Steve Langasek (vorlon)
tags: added: rls-mm-incoming
Revision history for this message
Tony Middleton (ximera) wrote :

In addition it should be possible to chose an alternate name to allow dual boot of separate Ubuntu systems.

Revision history for this message
Julian Andres Klode (juliank) wrote (last edit ):

This requires some work to separate the title from the path, this is not something I think makes sense to carry downstream patches, reasonably complicated (where to get the pretty name from) or urgent for this cycle.

I mean sure we could hack it in, but ugh. And we need to hack this into all releases as SRUs otherwise boot menu clobber on systems with multiple Ubuntu installs.

tags: added: rls-nn-incoming
removed: rls-mm-incoming
tags: added: foundations-todo
removed: rls-nn-incoming
Mate Kukri (mkukri)
Changed in grub2 (Ubuntu):
assignee: nobody → Mate Kukri (mkukri)
Revision history for this message
Mate Kukri (mkukri) wrote (last edit ):

How about calling the boot entry 'Ubuntu' by default only on new installs?

Then I could make the title comparison case-insensitive so that existing 'ubuntu' entries are re-used.

I am somewhat concerned of doing a delete+write on the UEFI variable storage on existing systems for a cosmetic change. (older firmwares with questionable variable implementations really don't like deletion).

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 2026310] Re: UEFI boot entry named 'ubuntu' should be called 'Ubuntu'

On Mon, Jan 29, 2024 at 03:39:48PM -0000, Mate Kukri wrote:
> I am somewhat concerned of doing a delete+write on the UEFI variable
> storage on existing systems for a cosmetic change. (older firmwares with
> questionable variable implementations really don't like deletion).

My understanding is that all of these historical problems actually came down
to bugs in the Linux kernel's UEFI variable handling, from an incomplete
understanding of how garbage collection of deleted variables worked; and I
am not aware of any issues with this for about a decade.

Every time someone reinstalls Ubuntu, they get a new boot entry written.
And there are no reports I'm aware of that this potentially bricks a system.

You have pointed out that grub includes code to minimize unnecessary nvram
writes. This is worthwhile regardless: nvram can be implemented in a way
that it has a limited number of write cycles over its lifetime. But it
doesn't mean we should be shy about fixing a bug in the boot entry that we
own, even if it's cosmetic.

Revision history for this message
Mate Kukri (mkukri) wrote :

This still needs more testing, but the following patch seems do close to what we want.

Revision history for this message
Mate Kukri (mkukri) wrote (last edit ):

So the patch definitely seems to work for boot entries created within the OS.

A remaining thing to consider is the Shim fallback loader and bootARCH.csv that we provide for it to create boot entries when none exists.

Tagging shim-signed as well because it is the package responsible for providing BOOTARCH.CSV

Changed in shim-signed (Ubuntu):
assignee: nobody → Mate Kukri (mkukri)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.12-1ubuntu3

---------------
grub2 (2.12-1ubuntu3) noble; urgency=medium

  * Improve GRUB reinstallation in cloud images (LP: #2054103):
    - Add debconf options "grub-{efi,pc}/cloud_style_installation"
    - d/postinst.in: Make empty "grub-pc/install_devices" non-fatal in
      noninteractive mode
  * Determine GRUB_DISTRIBUTOR from os-release and fall back to build-time
    dpkg vendor (LP: #2034253)
  * d/p/grub-install-efi-title.patch: Use case-sensitive GRUB distributor as
    EFI option title (LP: #2026310)
  * Unreleased changes from Debian:
    - d/p/revert-term-ns8250-spcr.patch: Revert ACPI SPCR table support
      (#1062073)

 -- Mate Kukri <email address hidden> Tue, 27 Feb 2024 10:54:26 +0000

Changed in grub2 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.