package grub-efi-amd64 2.02~beta2-36ubuntu3.10 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2

Bug #1692175 reported by Sayan Mandal
92
This bug affects 16 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am new to this environment, I don't know what this bug is supposed to mean.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: grub-efi-amd64 2.02~beta2-36ubuntu3.10
ProcVersionSignature: Ubuntu 4.8.0-53.56~16.04.1-generic 4.8.17
Uname: Linux 4.8.0-53-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
Date: Sat May 20 10:58:33 2017
DuplicateSignature:
 package:grub-efi-amd64:2.02~beta2-36ubuntu3.10
 Setting up grub-efi-amd64 (2.02~beta2-36ubuntu3.10) ...
 /var/lib/dpkg/info/grub-efi-amd64.postinst: line 703: syntax error near unexpected token `fi'
 dpkg: error processing package grub-efi-amd64 (--configure):
  subprocess installed post-installation script returned error exit status 2
ErrorMessage: subprocess installed post-installation script returned error exit status 2
InstallationDate: Installed on 2016-10-27 (205 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
InvalidGrubScript: /etc/grub.d/25_custom
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.8.0-53-generic root=UUID=f8b0836b-d65f-4dd1-bc20-6c42b8e1009f ro quiet splash vt.handoff=7
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.2
 apt 1.2.20
SourcePackage: grub2
Title: package grub-efi-amd64 2.02~beta2-36ubuntu3.10 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sayan Mandal (sayanmndl21) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Wolf (christianlupus) wrote :

I can confirm this bug as well. It happens as well when upgrading from a previous installation of grub-efi (2.02~beta2-36ubuntu3.9 to 2.02~beta2-36ubuntu3.10).

Revision history for this message
Jan Wester (j-vester) wrote :

i also confirm this bug. it happens since morning 2017-05-20 when doing an apt upgrade. did not happen 2017-05-19. On 16.04LTS.

Revision history for this message
Andre Hufschmidt (andre-hufschmidt) wrote :

Same error for grub-pc. Downgrading to 2.02~beta2-36ubuntu3.9 fixes the issue at the expense of losing /etc/default/grub. It will be replaced by the package file.

Revision history for this message
DorianDaumiller (dorian-daumiller) wrote :

same error trying to upgrade to grub-pc (2.02~beta2-36ubuntu3.10). Will revert to 3.9 for the time being. Thanks @andre-hufschmidt

Revision history for this message
DorianDaumiller (dorian-daumiller) wrote :

from the changelog of grub-pc ... 3.10:

2017-05-19 - Mathieu Trudel-Lapierre <email address hidden> grub2 (2.02~beta2-36ubuntu3.10) xenial; urgency=medium * debian/patches/install_signed.patch: don't install fb$arch.efi; it breaks "removable" installs where files are all installed to /EFI/BOOT; and it also doesn't belong in the /EFI/ubuntu path for the default case. Fallback install simply needs more work and isn't ready for SRU. (LP: #1684341) * debian/postinst.in: clean up fb$arch.efi.

(source: https://ubuntu.pkgs.org/16.04/ubuntu-proposed-main-i386/grub-pc_2.02~beta2-36ubuntu3.10_i386.deb.html)

Revision history for this message
Mark-pcnetspec (mark-pcnetspec) wrote :

Is there a missing semicolon on line 699 ?

        if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 then

should than not be:

        if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 ; then

Correcting that in
/var/lib/dpkg/info/grub-efi-amd64-signed.postinst
and running
sudo dpkg --configure grub-efi-amd64
allows the installation to complete without error

Revision history for this message
Mark-pcnetspec (mark-pcnetspec) wrote :

sorry I meant in the grub-efi-amd64 postinst script

Revision history for this message
Mark-pcnetspec (mark-pcnetspec) wrote :

Sorry (again), I meant correcting it in
/var/lib/dpkg/info/grub-efi-amd64.postinst

Revision history for this message
jens_we (jens-westphal) wrote :

Here ist was

vi /var/lib/dpkg/info/grub-pc.postinst

changed

if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 then

       if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 ;
        then

and apt-get -f install

completed without error

Thanks,

jens

Revision history for this message
linuxball (linuxball) wrote :

(1) This bug affects me, too.
(2) The proposed change in comment #8 [1] of this report and in comment #2 [2] of duplicate #1692205 fixes the problem.

[1] https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1692175/comments/8
[2] https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1692205/comments/2

Revision history for this message
cement_head (andorjkiss) wrote :

@mark-pcnetspec

Post #8 through #10 solved for me.

Thanks!

Revision history for this message
Jan Wester (j-vester) wrote :

Adding a ; solved problem for me. Thanks guys

Revision history for this message
Jeffrey Walton (noloader) wrote :

jens-westphal's fix in comment #11 resolved the issue for i386-pc as well.

Revision history for this message
hackeron (hackeron) wrote :

Wow, how can a package that does not install because of a syntax error be committed to production? - Are there no automated tests to prevent this sort of thing?

Revision history for this message
Simon Déziel (sdeziel) wrote : Re: [Bug 1692175] Re: package grub-efi-amd64 2.02~beta2-36ubuntu3.10 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2

On 2017-05-20 01:20 PM, hackeron wrote:
> Wow, how can a package that does not install because of a syntax error
> be committed to production? - Are there no automated tests to prevent
> this sort of thing?

This package is in -proposed specifically to catch such mistakes before
they hit -update. Don't run your prod with -proposed enabled.

Revision history for this message
Sayan Mandal (sayanmndl21) wrote :

Thank you, The problem is solved.

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.