upgrading to 23.10 failed package grub-efi-amd64-signed 1.197+2.12~rc1-10ubuntu4 failed to install/upgrade: installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1

Bug #2052643 reported by Nelson Minar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2-signed (Ubuntu)
New
Undecided
Unassigned

Bug Description

VM running under Proxmox

ProblemType: Package
DistroRelease: Ubuntu 23.10
Package: grub-efi-amd64-signed 1.197+2.12~rc1-10ubuntu4
ProcVersionSignature: Ubuntu 6.2.0-39.40-generic 6.2.16
Uname: Linux 6.2.0-39-generic x86_64
ApportVersion: 2.27.0-0ubuntu5
Architecture: amd64
CasperMD5CheckResult: pass
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Wed Feb 7 15:16:48 2024
DuplicateSignature:
 package:grub-efi-amd64-signed:1.197+2.12~rc1-10ubuntu4
 Setting up grub-efi-amd64-signed (1.197+2.12~rc1-10ubuntu4) ...
 Unknown device "/dev/disk/by-id/*": No such device
 dpkg: error processing package grub-efi-amd64-signed (--configure):
  installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
ErrorMessage: installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2022-08-09 (547 days ago)
InstallationMedia: Ubuntu-Server 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220421)
Python3Details: /usr/bin/python3.11, Python 3.11.6, python3-minimal, 3.11.4-5
PythonDetails: /usr/bin/python3.11, Python 3.11.6, python-is-python3, 3.11.4-1
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions:
 dpkg 1.22.0ubuntu1
 apt 2.7.3
SourcePackage: grub2-signed
Title: package grub-efi-amd64-signed 1.197+2.12~rc1-10ubuntu4 failed to install/upgrade: installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to mantic on 2024-02-07 (0 days ago)

Revision history for this message
Nelson Minar (g-nelson) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Nelson Minar (g-nelson) wrote :

I think the underlying problem is my system hardware changed (from physical to virtual). 23.04 is booting fine on the new virtual hardware but /dev/disk/by-id/ no longer exists. When I go to upgrade to 23.10 it reinstalls grub packages and dpkg picks up a config in /var/run/debconf that references the now-missing /dev/disk/by-id/.

If I'm right, a fix would be for the grub dpkg to more gracefully handle missing configuration directories. At least to print a more clear error, or even better to force a reconfigure to recover.

Lots of detail on the problem here: https://nelsonslog.wordpress.com/2024/02/07/ubuntu-23-10-upgraded-signed-grub-failed/

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

@g-nelson Can you try running `dpkg-reconfigure grub-efi-amd64`, then selecting your new install device for GRUB? It should upgrade after that.

GRUB upgrade failing due to hardware change is an issue we are aware of. Hoping to improve the error message situation, and possibly switch to ESP search via UUID in the future to fully resolve this.

Revision history for this message
Nelson Minar (g-nelson) wrote :

Thank you for taking the time to understand my bug report. I tried dpkg-reconfigure grub-efi-amd64 but it doesn't give me an option to select a new install device. I get interactive menus for three settings: Linux command line, Linux default command line, and Update NVRAM variables. There's nothing about selecting the install device. (Nor do I see one if I use the editor frontend). See below for an error log after answering those 3 menu questions, starting with Unknown device "/dev/disk/by-id/*": No such device

Is there another way to force dpkg to let me select a new install device?

I also tried dpkg-reconfigure on grub-efi-amd64-signed and on shim-signed and both just immediately print Unknown device "/dev/disk/by-id/*": No such device. I'm left wondering if these scripts just don't have error handling for this case.

BTW I understand now why there's no /dev/disk/by-id/. I'm using VirtIO disks in the newly virtualized server and that does not produce serial numbers for the disk devices. Not Debian/Ubuntu's doing really, but I do need a way to convince the GRUB debconf to reconfigure.

Here's the full error log from dpkg-reconfigure grub-efi-amd64.

Unknown device "/dev/disk/by-id/*": No such device
Failed: grub-install --target=x86_64-efi
WARNING: Bootloader is not properly installed, system may not be bootable
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.2.0-39-generic
Found initrd image: /boot/initrd.img-6.2.0-39-generic
Found linux image: /boot/vmlinuz-6.2.0-36-generic
Found initrd image: /boot/initrd.img-6.2.0-36-generic
Found linux image: /boot/vmlinuz-5.19.0-051900-generic
Found initrd image: /boot/initrd.img-5.19.0-051900-generic
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Processing triggers for shim-signed (1.54+15.7-0ubuntu1) ...

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

This is a known issue. Note that you can assign an id to a virtio block device at least on the qemu command line which will solve the issue.

Revision history for this message
Nelson Minar (g-nelson) wrote :

Just tested this again, problem is still there. Is there any hope for a fix for grub-efi-amd64 to reconfigure the device in the 23.10 upgrade context? If not my system is going to be trapped running 23.04 with no way to upgrade safely, which means I need to find a workaround.

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.