dpkg fails to install grub-efi-amd64 signed and shim-signed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dpkg (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
grub2-signed (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
See above
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: dpkg 1.19.7ubuntu3
ProcVersionSign
Uname: Linux 5.4.0-21-generic x86_64
ApportVersion: 2.20.11-0ubuntu26
Architecture: amd64
CasperMD5CheckR
Date: Thu Apr 9 18:41:33 2020
InstallationDate: Installed on 2020-04-09 (0 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200402)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: dpkg
UpgradeStatus: No upgrade log present (probably fresh install)
Seija K. (rose128) wrote : | #1 |
- Dependencies.txt Edit (319 bytes, text/plain; charset="utf-8")
- ProcCpuinfoMinimal.txt Edit (1.3 KiB, text/plain; charset="utf-8")
Launchpad Janitor (janitor) wrote : | #2 |
Changed in dpkg (Ubuntu): | |
status: | New → Confirmed |
Lee Trager (ltrager) wrote : | #3 |
Just confirming this as well
sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up grub-efi-
/var/lib/
dpkg: error processing package grub-efi-
installed grub-efi-
2
Errors were encountered while processing:
grub-efi-
E: Sub-process /usr/bin/dpkg returned an error code (1)
Lee Trager (ltrager) wrote : | #4 |
It looks like there is an extra ';;' in the script, the following patch fixes it.
--- /tmp/grub-
+++ /var/lib/
@@ -16,7 +16,7 @@
case $1 in
configure)
- target=x86_64-efi
+ target=x86_64-efi ;;
# Check /boot/grub to see if we previously installed to an ESP. We don't
# want to trigger the install code just by installing the package,
# normally the installer installs grub itself first.
I do get a warning that "The GRUB boot loader was previously installed to a disk that is no longer present, or whose unique identifier has changed for some reason." I haven't changed the disks on my system or done anything else that should trigger this.
Changed in grub (Ubuntu): | |
status: | New → Confirmed |
affects: | grub (Ubuntu) → grub2 (Ubuntu) |
affects: | grub2 (Ubuntu) → grub2-signed (Ubuntu) |
Steve Langasek (vorlon) wrote : | #5 |
Fixed in the version in -proposed, and the broken grub2-signed has been backed out of the release pocket.
Changed in dpkg (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in grub2-signed (Ubuntu): | |
status: | Confirmed → Fix Released |
Abdel Bolanos Martinez (abdel-bolanos) wrote : | #6 |
Hi, I see it says (Fix Released).
How can I apply the fix to my pc?
Thanks
Jerome (jeromebourget-7) wrote : | #7 |
Abdel, you can edit the file :
/var/lib/
And replace this line :
target=x86_64-efi ;;
For that (remove the ";;") :
target=x86_64-efi
Save and try to update again
Abdel Bolanos Martinez (abdel-bolanos) wrote : | #8 |
Thanks! It worked just fine.
Rob Frohne (frohro) wrote : | #9 |
For me there as no semicolon, but I still get the error.
rohro@frohro-
frohro@
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
clang-tidy-9 clang-tools-9 gnome-software-
libclass-
libpython3.7 libpython3.
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
debconf: DbDriver "config": /var/cache/
Setting up grub-efi-
debconf: DbDriver "config": /var/cache/
lable
dpkg: error processing package grub-efi-
installed grub-efi-
Errors were encountered while processing:
grub-efi-
E: Sub-process /usr/bin/dpkg returned an error code (1)
frohro@
Brett Bogert (bbogert24) wrote : Re: [Bug 1871963] Re: dpkg fails to install grub-efi-amd64 signed and shim-signed | #10 |
Rob,
Your problem is due to another process having the
/var/cache/
file in a locked state:
debconf: DbDriver "config": /var/cache/
The original problem reported was due to a syntax error in the
code which is now fixed.
I have never seen this particular problem before so haven't a
clue how to fix it.
Normally if you have a file locked during an apt command it is
due to another apt
process locking it. This could be due to an automated check for
update(e.g. apt update)
command running when you are trying to do a manual command or
from one of the
package managers being left open when you are trying to do a
manual command.
Hope this helps,
Brett "WolfMan" Bogert
<email address hidden>
On 4/10/20 7:42 PM, Rob Frohne wrote:
> For me there as no semicolon, but I still get the error.
>
> rohro@frohro-
> frohro@
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Calculating upgrade... Done
> The following packages were automatically installed and are no longer required:
> clang-tidy-9 clang-tools-9 gnome-software-
> libclass-
> libpython3.7 libpython3.
> Use 'sudo apt autoremove' to remove them.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 1 not fully installed or removed.
> After this operation, 0 B of additional disk space will be used.
> Do you want to continue? [Y/n]
> debconf: DbDriver "config": /var/cache/
> Setting up grub-efi-
> debconf: DbDriver "config": /var/cache/
> lable
> dpkg: error processing package grub-efi-
> installed grub-efi-
> Errors were encountered while processing:
> grub-efi-
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> frohro@
>
Ken Wagner (beaucoder) wrote : | #11 |
Brett,
Thanks for the update. I know how to unlock the lock files.
Ken Wagner
On 4/11/20 12:24 PM, Brett Bogert wrote:
> Rob,
>
> Your problem is due to another process having the
> /var/cache/
> file in a locked state:
>
> debconf: DbDriver "config": /var/cache/
> by another process: Resource temporarily unavailable
>
> The original problem reported was due to a syntax error in the
> code which is now fixed.
>
> I have never seen this particular problem before so haven't a
> clue how to fix it.
>
> Normally if you have a file locked during an apt command it is
> due to another apt
> process locking it. This could be due to an automated check for
> update(e.g. apt update)
> command running when you are trying to do a manual command or
> from one of the
> package managers being left open when you are trying to do a
> manual command.
>
> Hope this helps,
>
> Brett "WolfMan" Bogert
> <email address hidden>
>
>
> On 4/10/20 7:42 PM, Rob Frohne wrote:
>> For me there as no semicolon, but I still get the error.
>>
>> rohro@frohro-
>> frohro@
>> Reading package lists... Done
>> Building dependency tree
>> Reading state information... Done
>> Calculating upgrade... Done
>> The following packages were automatically installed and are no longer required:
>> clang-tidy-9 clang-tools-9 gnome-software-
>> libclass-
>> libpython3.7 libpython3.
>> Use 'sudo apt autoremove' to remove them.
>> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>> 1 not fully installed or removed.
>> After this operation, 0 B of additional disk space will be used.
>> Do you want to continue? [Y/n]
>> debconf: DbDriver "config": /var/cache/
>> Setting up grub-efi-
>> debconf: DbDriver "config": /var/cache/
>> lable
>> dpkg: error processing package grub-efi-
>> installed grub-efi-
>> Errors were encountered while processing:
>> grub-efi-
>> E: Sub-process /usr/bin/dpkg returned an error code (1)
>> frohro@
>>
Deepak G N R (gnrdeepak) wrote : | #12 |
Hello,
There is no semicolon in the file but I still have same problem.
=======
Do you want to continue? [Y/n] y
Setting up grub-efi-
dpkg: error processing package grub-efi-
installed grub-efi-
No apport report written because the error message indicates its a followup error from a previous failure.
shim-signed depends on grub-efi-
Package grub-efi-
Package grub-efi-
dpkg: error processing package shim-signed (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
grub-efi-
shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)
=======
Ubuntu software center was missing. "sudo apt-get install ubuntu-software" resulted in the same error. However, software center installation was successful.
How can I fix this? Please assist.
Regards,
Deepak
Philipp Classen (philipp-classen) wrote : | #13 |
Just had the same issue as Deepak. Same error after upgrading from 18.04 to 20.04, but I checked and apparently also had the fix of the semicolon in /var/lib/
Running it with "set -x", I could see that the "/usr/lib/
I was able to fix the installation problem by running the commands from https:/
# sudo apt-get purge grub\*
# sudo apt-get install grub-efi
# sudo apt-get autoremove
# sudo update-grub
After that, the apt-get errors were gone, and the installation could be completed.
(Another issue, which I will mention as there is a tiny chance that it is related, although I doubt it: After rebooting, I was not able to boot (not even reaching the question for the passphrase). To solve it, I had to disable Secure Boot, then I reached the state where I could enter my passphrase to unlock the encrypted partition.)
My notebook: Lenovo ThinkPad X1 Carbon 4th
Bastian (oimel) wrote : | #14 |
Had the same issue as philipp-classen, upgrade from 19.10 to 20.04 and install failed:
grub-efi-
dpkg: Fehler beim Bearbeiten des Paketes grub-efi-
»installiertes grub-efi-
Fehler traten auf beim Bearbeiten von:
grub-efi-
E: Sub-process /usr/bin/dpkg returned an error code (1)
Also solved it following the instructions on https:/
Mike Reed (rhjeepdriver) wrote : | #15 |
Not sure what to do now.
mike@mike-
[sudo] password for mike:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'grub-legacy' for glob 'grub*'
Note, selecting 'grub-doc' for glob 'grub*'
Note, selecting 'grub-ipxe' for glob 'grub*'
Note, selecting 'grub-efi' for glob 'grub*'
Note, selecting 'grub-emu' for glob 'grub*'
Note, selecting 'grub-coreboot' for glob 'grub*'
Note, selecting 'grub-linuxbios' for glob 'grub*'
Note, selecting 'grub-common' for glob 'grub*'
Note, selecting 'grub-invaders' for glob 'grub*'
Note, selecting 'grub-coreboot-bin' for glob 'grub*'
Note, selecting 'grub-ieee1275-bin' for glob 'grub*'
Note, selecting 'grub-coreboot-dbg' for glob 'grub*'
Note, selecting 'grub-xen-bin' for glob 'grub*'
Note, selecting 'grub-ieee1275-dbg' for glob 'grub*'
Note, selecting 'grub-xen-dbg' for glob 'grub*'
Note, selecting 'grub2-common' for glob 'grub*'
Note, selecting 'grub-legacy-doc' for glob 'grub*'
Note, selecting 'grub-legacy-ec2' for glob 'grub*'
Note, selecting 'grub-splashimages' for glob 'grub*'
Note, selecting 'grub-yeeloong' for glob 'grub*'
Note, selecting 'grub-pc' for glob 'grub*'
Note, selecting 'grub-theme-breeze' for glob 'grub*'
Note, selecting 'grub-imageboot' for glob 'grub*'
Note, selecting 'grub-xen' for glob 'grub*'
Note, selecting 'grub-pc-bin' for glob 'grub*'
Note, selecting 'grub-pc-dbg' for glob 'grub*'
Note, selecting 'grub-efi-
Note, selecting 'grub-gfxpayloa
Note, selecting 'grub-efi-
Note, selecting 'grub2-
Note, selecting 'grub-rescue-pc' for glob 'grub*'
Note, selecting 'grub-ieee1275' for glob 'grub*'
Note, selecting 'grub' for glob 'grub*'
Note, selecting 'grub2' for glob 'grub*'
Note, selecting 'grub-efi-amd64' for glob 'grub*'
Note, selecting 'grub-efi-ia32' for glob 'grub*'
Note, selecting 'grub-efi-ia64' for glob 'grub*'
Note, selecting 'grub-efi-
Note, selecting 'grub-efi-ia32-bin' for glob 'grub*'
Note, selecting 'grub2-
Note, selecting 'grub-efi-ia32-dbg' for glob 'grub*'
Note, selecting 'grub-emu-dbg' for glob 'grub*'
Note, selecting 'grub-xen-host' for glob 'grub*'
Note, selecting 'grub-theme-
Note, selecting 'grub-firmware-
Package 'grub-efi-ia64' is not installed, so not removed
Package 'grub-yeeloong' is not installed, so not removed
Package 'grub' is not installed, so not removed
Package 'grub-legacy' is not installed, so not removed
Package 'grub-legacy-doc' is not installed, so not removed
Package 'grub-doc' is not installed, so not removed
Package 'grub-gfxpayloa
Package 'grub-legacy-ec2' is not installed, so not removed
Package 'grub-imageboot' is not installed, so not removed
Package 'grub-invaders' is not installed, so not removed
Package 'grub-splashimages' is not installed, so not removed
Package 'grub-theme-breeze' is not installed, so not removed
Package 'grub2-
Package 'grub...
hackeron (hackeron) wrote : | #16 |
It seems to only happen when doing:
# DEBIAN_
When it is interactive, it asks to select /dev/sda and then it upgrades.
How to upgrade this package non interactive?
Nathanaël Langlois (etoilefilante) wrote : | #17 |
I've tried everything, the patch was already applied, and the stackoverflow solution didn't work; I still have the error on ubuntu 20
LaMpiR (lampir) wrote : | #18 |
I have the same problem as the #17. I have tried everything from stackoverflow but nothing.
Nathanaël Langlois (etoilefilante) wrote : | #19 |
I just completely reinstalled an OVH server, and got the error while upgrading to ubuntu 20 from ubuntu 18. On the other server, an update created the error, it wasn't there when I installed ubuntu 20
Nathanaël Langlois (etoilefilante) wrote : | #20 |
An update released this morning of I don't know what package fixed the issue on multiple servers, so this appears to have been fixed
LaMpiR (lampir) wrote : | #21 |
For me as well.
Alex Haydock (alexhaydock) wrote : | #22 |
We're seeing this one too, on Ubuntu 20.04. I think something interesting to note is the disk layout which might be causing it to happen.
During apt upgrade or forced grub package installation, I get:
mount: /var/lib/grub/esp: special device /dev/sda1 does not exist.
dpkg: error processing package grub-efi-
installed grub-efi-
It seems like the install script is looking for /dev/sda1 to install GRUB updates to.
When checking /etc/fstab, I can see a line which states:
# /boot/efi was on /dev/sda1 during curtin installation
It's a VMware VM which was installed to a single emulated SCSI root VMDK, which will have been /dev/sda during installation. But /dev/sda1 no longer exists because new disks have been added to this system since then.
It seems like when assigning letters (as per the /dev/sd* schema), the SAS disks get assigned letters first, followed by the SCSI boot drive, which ends up being /dev/sdq (meaning the partition GRUB originally installed to is now all the way down at /dev/sdq1).
The disk that ends up being allocated to /dev/sda is one of many in a RAID array, and these are encrypted using LUKS across the entire disk (no partition). So there is no /dev/sda1 at all anymore as far as the GRUB installer is concerned.
Is there any way I can force GRUB to find the correct /boot/efi location? (Running lsblk confirms it is definitely at /dev/sdq1 now).
Ben Simpson (thehoagie) wrote : | #23 |
I am seeing this and I suspect it is because I installed Windows on an extra SSD that was a Linux partition. /dev/sda is that device
```
Setting up grub-efi-
NTFS signature is missing.
Failed to mount '/dev/sda1': Invalid argument
The device '/dev/sda1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
dpkg: error processing package grub-efi-
installed grub-efi-
```
I haven't tried purging the grub package because of the high risk. This seems to be a stale reference to the partition on what used to be a different OS.
Simeon Walker (simeon-walker) wrote : | #24 |
I too am seeing this error. Same circumstances as #23.
I have recently installed Win 10 on sda but sda1 is not the NTFS partition, that is sda2.
Ubuntu is on sdb, / on sdb2, /boot/efi on sdb1.
I can find no reference to sda1 in my Ubuntu /etc or /boot so I don't know where it's coming from.
Don't know if it's safe to reboot now.
Ben Simpson (thehoagie) wrote : | #25 |
Philipp Classen #13
> (Another issue, which I will mention as there is a tiny chance that it is related, although I doubt it: After rebooting, I was not able to boot (not even reaching the question for the passphrase). To solve it, I had to disable Secure Boot, then I reached the state where I could enter my passphrase to unlock the encrypted partition.)
Small modification to your commands above - after purging the grub packages I did a `sudo apt-get install grub-efi-
Pieter De Wit (pieter-insync) wrote : | #26 |
I am seeing this too (late upgrade to the system)
For me, this is caused by /usr/lib/
# /usr/lib/
mount: /var/lib/grub/esp: special device /dev/sdb1 does not exist.
I have a /dev/sdb, but it's a raw disk, no part. table
# ls /dev/sdb*
/dev/sdb
Thanks :)
max chistyakov (mchist) wrote : | #27 |
- grub-efi-amd64-signed.postinst Edit (746 bytes, text/plain)
If it fails because of `;;`, it's strange. Because my /var/lib/
Status changed to 'Confirmed' because the bug affects multiple users.