package grub-efi-amd64-signed 1.187.2~20.04.2+2.06-2ubuntu14 failed to install/upgrade: installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1 (/dev/disk/by-id does not exist)

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

Bug Description

Upgraded packages on a VM which had been dormant for a while.
Apparently /dev/disk/by-id doesn't exist and grub2-signed postinst isn't expecting such scenario.

$ ls -la /dev/disk/
total 0
drwxr-xr-x 6 root root 120 Feb 5 13:19 .
drwxr-xr-x 19 root root 4300 Feb 5 13:30 ..
drwxr-xr-x 2 root root 60 Feb 5 13:19 by-partlabel
drwxr-xr-x 2 root root 80 Feb 5 13:19 by-partuuid
drwxr-xr-x 2 root root 160 Feb 5 13:19 by-path
drwxr-xr-x 2 root root 80 Feb 5 13:19 by-uuid

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: grub-efi-amd64-signed 1.187.2~20.04.2+2.06-2ubuntu14
ProcVersionSignature: Ubuntu 5.15.0-56.62~20.04.1-generic 5.15.64
Uname: Linux 5.15.0-56-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.25
Architecture: amd64
CasperMD5CheckResult: skip
Date: Sun Feb 5 13:34:24 2023
DuplicateSignature:
 package:grub-efi-amd64-signed:1.187.2~20.04.2+2.06-2ubuntu14
 Setting up grub-efi-amd64-signed (1.187.2~20.04.2+2.06-2ubuntu14) ...
 Unknown device "/dev/disk/by-id/*": No such file or directory
 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 2020-04-10 (1030 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200402)
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3.2
 apt 2.0.9
SourcePackage: grub2-signed
Title: package grub-efi-amd64-signed 1.187.2~20.04.2+2.06-2ubuntu14 failed to install/upgrade: installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tuomas Heino (iheino+ub) wrote :
summary: package grub-efi-amd64-signed 1.187.2~20.04.2+2.06-2ubuntu14 failed to
install/upgrade: installed grub-efi-amd64-signed package post-
- installation script subprocess returned error exit status 1 (/dev/disk/
- only contains by-partlabel/partuuid/path/uuid, no /dev/disk/by-id)
+ installation script subprocess returned error exit status 1
+ (/dev/disk/by-id does not exist)
tags: removed: need-duplicate-check
Revision history for this message
Tuomas Heino (iheino+ub) wrote :

$ sudo dpkg -D20002 --configure --pending
Setting up grub-efi-amd64-signed (1.187.2~20.04.2+2.06-2ubuntu14) ...
D020000: trigproc_activate_packageprocessing pkg=grub-efi-amd64-signed:amd64
D000002: fork/exec /var/lib/dpkg/info/grub-efi-amd64-signed.postinst ( configure 1.167.2+2.04-1ubuntu44.2 )
+ . /usr/share/debconf/confmodule
+ [ ! ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [ ]
+ exec /usr/share/debconf/frontend /var/lib/dpkg/info/grub-efi-amd64-signed.postinst configure 1.167.2+2.04-1ubuntu44.2
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z ]
+ exec
+ [ ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ target=x86_64-efi
+ test -e /boot/grub/x86_64-efi/core.efi
+ [ -x /usr/share/grub/grub-check-signatures ]
+ /usr/share/grub/grub-check-signatures
+ [ -x /usr/lib/grub/grub-multi-install ]
+ /usr/lib/grub/grub-multi-install --target=x86_64-efi
Unknown device "/dev/disk/by-id/*": No such file or directory
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
D020000: post_script_tasks - ensure_diversions
D020000: post_script_tasks - trig_incorporate
Errors were encountered while processing:
 grub-efi-amd64-signed

So I guess grub-common => grub2 would be more accurate SourcePackage to assign this bug to?

Revision history for this message
Tuomas Heino (iheino+ub) wrote :

Worked around by adding <serial> on kvm-host side block device definition, since that apparently no longer gets passed through and the default udev rules won't create by-id paths when serial numbers are missing.

Still I'd say the postinst script not handling disappearing boot device serial numbers is a bug.

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.