package shim-signed 1.34.9.1+13-0ubuntu2 failed to install/upgrade: installed shim-signed package post-installation script subprocess returned error exit status 1

Bug #1779560 reported by Tassos
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
shim-signed (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

ubuntu 18.04, during sudo apt-get dist-upgrade, the following error is shown:

grub-install: error: cannot find EFI directory.
dpkg: error processing package shim-signed (--configure):
 installed shim-signed package post-installation script subprocess returned error exit status 1

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: shim-signed 1.34.9.1+13-0ubuntu2
ProcVersionSignature: Ubuntu 4.15.0-23.25-generic 4.15.18
Uname: Linux 4.15.0-23-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
.proc.sys.kernel.moksbstate_disabled: Error: [Errno 2] No such file or directory: '/proc/sys/kernel/moksbstate_disabled'
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
BootEFIContents:
 fw
 fwupx64.efi
Date: Sun Jul 1 23:09:35 2018
EFIBootMgr: Error: command ['efibootmgr', '-v'] failed with exit code 2: EFI variables are not supported on this system.
EFITables: Jul 01 23:05:34 tassos-laptop fwupd[3001]: disabling plugin because: failed to startup uefi: UEFI firmware updating not supported
ErrorMessage: installed shim-signed package post-installation script subprocess returned error exit status 1
Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3
PythonDetails: /usr/bin/python2.7, Python 2.7.15rc1, python-minimal, 2.7.15~rc1-1
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu2
 apt 1.6.1
SourcePackage: shim-signed
Title: package shim-signed 1.34.9.1+13-0ubuntu2 failed to install/upgrade: installed shim-signed package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tassos (tassos-chen) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Steve Langasek (vorlon) wrote :

This shows that you have the shim-signed package installed on your system, which is used for UEFI SecureBoot. However:
 - you have no EFI System Partition mounted
 - efibootmgr shows that at the time the bug report is filed, you are not booted in UEFI mode.
Have you deliberately reconfigured this system to boot in BIOS mode, after initially installing in UEFI mode?

Changed in shim-signed (Ubuntu):
status: New → Incomplete
Revision history for this message
Tassos (tassos-chen) wrote :

Maybe yes. The following is the whole story.
After fresh installing ubuntu 18.04 to a partition,an error showed up:

"The 'grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot". After pressing 'ok' the following opened. "Installer crashed" "We,re sorry the installer crashed. After you close this window, we'll allow you to file a bug report using the integrated bug reporting tool. This will gather information about your system and your installation process. The details will be sent to our bug tracker and a developer will attend to the problem as soon as possible"

So I googled it and found a solution:

cd /tmp/
sudo apt-get download grub-pc-bin
dpkg-deb -R grub-pc-bin_2.02-2ubuntu8_amd64.deb grub/
sudo mv grub/usr/lib/grub/i386-pc/ /usr/lib/grub/

sudo grub-install --target=i386-pc --boot-directory=/boot/ --recheck /dev/sdb
sudo mount /dev/sdb1 /boot/efi
sudo grub-install /boot/efi/
sudo update-grub
sudo grub-install --efi-directory=/boot/efi

sdb1 is my root partition. After executing the above commands, my laptop rebooted normally.
then one day I executed "sudo apt-get dist-upgrade", the bug showed up as described above.

Revision history for this message
Steve Langasek (vorlon) wrote :

Ok, then I believe your issue is at its root a duplicate of LP: #1766945.

Because the install has completed and you don't have an EFI System Partition, the grub-efi-amd64-signed and shim-signed packages cannot work on your install. Short of repartitioning your system, you should probably resolve this by doing:

 sudo apt autoremove --purge shim-signed grub-efi-amd64-signed grub-pc+

That will properly install the BIOS GRUB package and remove the EFI packages.

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.