update-grub fails to set default menu item when submenu is disabled

Bug #2049681 reported by Pavel Malyshev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Since latest 22.04 HWE kernel crashes, I'm trying to set a previous stable kernel as a default in GRUB.
I've added the following to /etc/default/grub:
```
GRUB_DEFAULT="Ubuntu, with Linux 6.2.0-39-generic"
GRUB_DISABLE_SUBMENU=true
```

I have to disable submenu, since my GRUB is password protected. So when I just set GRUB_DEFAULT, GRUB blocks asking for user and password.

When I both set default kernel and disable submenu, update-grub complains:
```
Warning: Please don't use old title `Ubuntu, with Linux 6.2.0-39-generic' for GRUB_DEFAULT, use `Advanced options for Ubuntu>Ubuntu, with Linux 6.2.0-39-generic'
```
update-grub also adds an override to the default menu item in grub.cfg to look like "Advanced options for Ubuntu>Ubuntu, with Linux 6.2.0-39-generic", so GRUB boots first available kernel instead of the default one.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: grub-common 2.06-2ubuntu7.2
ProcVersionSignature: Ubuntu 6.2.0-39.40~22.04.1-generic 6.2.16
Uname: Linux 6.2.0-39-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Wed Jan 17 14:19:05 2024
InstallationDate: Installed on 2023-07-02 (198 days ago)
InstallationMedia: Ubuntu-Server 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230217.1)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.grub.d.10_linux: [modified]
modified.conffile..etc.grub.d.40_custom: [modified]
mtime.conffile..etc.grub.d.10_linux: 2024-01-17T14:13:44.311467
mtime.conffile..etc.grub.d.40_custom: 2023-07-03T15:45:29.826960

Revision history for this message
Pavel Malyshev (afunix) wrote :
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.