shim-signed update unrecognized option

Bug #1250611 reported by Bram Kuijper on 2013-11-12
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
shim-signed (Ubuntu)
Undecided
Unassigned

Bug Description

I am having a macbook with ubuntu 12.04. Just did sudo-apt-get update; sudo apt-get upgrade; This installs an updated version of the package shim-signed.

However, upon updating shim-signed, grub complains that it cannot recognize the option `--target=x86_64-efi'. Seems very related to a recent update on shim-signed that has been pushed recently, https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1242417.

Below the resulting error message:

sudo apt-get update;

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.
Do you want to continue [Y/n]? Y
Setting up shim-signed (1.5~12.04.1+0.4-0ubuntu4) ...
Unrecognized option `--target=x86_64-efi'
Usage: grub-install [OPTION] [install_device]
Install GRUB on your drive.

  -h, --help print this message and exit
  -v, --version print the version information and exit
  --modules=MODULES pre-load specified modules MODULES
  --boot-directory=DIR install GRUB images under the directory DIR/grub
                          instead of the /boot/grub directory
  --grub-setup=FILE use FILE as grub-setup
  --grub-mkimage=FILE use FILE as grub-mkimage
  --grub-mkrelpath=FILE use FILE as grub-mkrelpath
  --grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
  --grub-probe=FILE use FILE as grub-probe
  --no-floppy do not probe any floppy drive
  --allow-floppy Make the drive also bootable as floppy
                          (default for fdX devices). May break on some BIOSes.
  --recheck probe a device map even if it already exists
  --force install even if problems are detected
   --removable the installation device is removable
   --bootloader-id=ID the ID of bootloader.
   --uefi-secure-boot install an image usable with UEFI Secure Boot
                           (only available if the grub-efi-amd64-signed
                           package is installed)
   --no-uefi-secure-boot do not install an image usable with UEFI Secure
                           Boot, even if the system was currently started
                           using it

INSTALL_DEVICE can be a GRUB device name or a system device filename.

grub-install copies GRUB images into /boot/grub, and uses grub-setup
to install grub into the boot sector.

Report bugs to <email address hidden>.
dpkg: error processing shim-signed (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Launchpad Janitor (janitor) wrote :

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

Changed in grub2 (Ubuntu):
status: New → Confirmed
Ivo Gonçalves (ivogonzalvez) wrote :

Exactly as described by Terabyte. Macbook 4.1 with Ubuntu 12.04.

Simon Déziel (sdeziel) wrote :

I'm affected too on a Lenovo laptop runing 12.04.3 (Quantal kernel)

Stéphane Graber (stgraber) wrote :

Can you please provide the following:
 ls -l /sys/firmware
 dpkg -l | grep grub
 dpkg -l | grep shim

affects: grub2 (Ubuntu) → shim-signed (Ubuntu)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shim-signed - 1.5~12.04.2

---------------
shim-signed (1.5~12.04.2) precise; urgency=low

  * Revert part of the previous fix as it turned out to be incompatible
    with precise's grub version. (LP: #1250611)
 -- Stephane Graber <email address hidden> Tue, 12 Nov 2013 21:16:19 -0500

Changed in shim-signed (Ubuntu):
status: Confirmed → Fix Released
Rodolfo Aramayo (raramayo) wrote :
Download full text (3.7 KiB)

I continue to see the problem on a MacMini Running Ubuntu 12.04

I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  shim-signed
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/434 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up shim-signed (1.5~12.04.1+0.4-0ubuntu4) ...
Unrecognized option `--target=x86_64-efi'
Usage: grub-install [OPTION] install_device
Install GRUB on your drive.

  -h, --help print this message and exit
  -v, --version print the version information and exit
  --modules=MODULES pre-load specified modules MODULES
  --boot-directory=DIR install GRUB images under the directory DIR/grub
                          instead of the /boot/grub directory
  --grub-setup=FILE use FILE as grub-setup
  --grub-mkimage=FILE use FILE as grub-mkimage
  --grub-mkrelpath=FILE use FILE as grub-mkrelpath
  --grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
  --grub-probe=FILE use FILE as grub-probe
  --no-floppy do not probe any floppy drive
  --allow-floppy Make the drive also bootable as floppy
                          (default for fdX devices). May break on some BIOSes.
  --recheck probe a device map even if it already exists
  --force install even if problems are detected
  --disk-module=MODULE disk module to use

INSTALL_DEVICE can be a GRUB device name or a system device filename.

grub-install copies GRUB images into /boot/grub, and uses grub-setup
to install grub into the boot sector.

Report bugs to <email address hidden>.
dpkg: error processing shim-signed (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 shim-signed
[ Rootkit Hunter version 1.3.8 ]
File updated: searched for 166 files, found 136
E: Sub-process /usr/bin/dpkg returned an error code (1)

Other details:

# ls -l /sys/firmware
total 0
drwxr-xr-x 4 root root 0 Nov 9 20:18 acpi
drwxr-xr-x 4 root root 0 Nov 8 09:07 efi
drwxr-xr-x 26 root root 0 Nov 9 20:18 memmap

# dpkg -l | grep grub
rc grub 0.97-29ubuntu66 GRand Unified Bootloader (Legacy version)
ii grub-common 1.99-21ubuntu3.10 GRand Unified Bootloader (common files)
rc grub-efi-amd64 1.99-21ubuntu3.10 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 1.99-21ubuntu3.10 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
ii grub-gfxpayload-lists 0.6 GRUB gfxpayload blacklist
ii grub-pc 1.99-21ubuntu3.10 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 1.99-21ubuntu3.10 GRand Unified B...

Read more...

Stéphane Graber (stgraber) wrote :

That's because you're not installing the fixed version. 12.04.1 is the buggy one, 12.04.2 is the one with the problematic change reverted.

Make sure to run apt-get update and maybe wait a bit for your local mirror to catch up.

Felipe Farias (felipe-aplaplac) wrote :

sorry my englifh is bad...

whtever i try install, give me this error

sunta (claus-mrlinux) wrote :

Setting up shim-signed (1.5~12.04.1+0.4-0ubuntu4) ...

just wait on your mirror to have 12.04.2

Simon Déziel (sdeziel) wrote :

@Stéphane, still not upgrading properly even with 12.04.2:

The following packages will be upgraded:
   shim-signed (1.5~12.04.1+0.4-0ubuntu4 => 1.5~12.04.2+0.4-0ubuntu4)
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/434 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up shim-signed (1.5~12.04.1+0.4-0ubuntu4) ...
Unrecognized option `--target=x86_64-efi'
Usage: grub-install [OPTION] [install_device]
Install GRUB on your drive.

  -h, --help print this message and exit
  -v, --version print the version information and exit
  --modules=MODULES pre-load specified modules MODULES
  --boot-directory=DIR install GRUB images under the directory DIR/grub
                          instead of the /boot/grub directory
  --grub-setup=FILE use FILE as grub-setup
  --grub-mkimage=FILE use FILE as grub-mkimage
  --grub-mkrelpath=FILE use FILE as grub-mkrelpath
  --grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
  --grub-probe=FILE use FILE as grub-probe
  --no-floppy do not probe any floppy drive
  --allow-floppy Make the drive also bootable as floppy
                          (default for fdX devices). May break on some BIOSes.
  --recheck probe a device map even if it already exists
  --force install even if problems are detected
   --removable the installation device is removable
   --bootloader-id=ID the ID of bootloader.
   --uefi-secure-boot install an image usable with UEFI Secure Boot
                           (only available if the grub-efi-amd64-signed
                           package is installed)
   --no-uefi-secure-boot do not install an image usable with UEFI Secure
                           Boot, even if the system was currently started
                           using it

INSTALL_DEVICE can be a GRUB device name or a system device filename.

grub-install copies GRUB images into /boot/grub, and uses grub-setup
to install grub into the boot sector.

Report bugs to <email address hidden>.
dpkg: error processing shim-signed (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)

This seems to be because it tries to finish the installation of the 12.04.1 version

Simon Déziel (sdeziel) wrote :

In the meantime, I simply skipped 12.04.1 postinst with this:

  dpkg -l | grep -qE 'shim-signed[[:space:]]+1\.5~12\.04\.1' && sed -i '1a exit 0' /var/lib/dpkg/info/shim-signed.postinst
  apt-get update && apt-get dist-upgrade && apt-get dist-upgrade

I had to run dist-upgrade twice, once to finish setting up 12.04.1 and the last to effectively install 12.04.2

Rodolfo Aramayo (raramayo) wrote :

I tried your suggestion Simon, but it did not help
I then uninstalled and re-installed 'shim-signed' but the error still remains:

####
Setting up shim-signed (1.5~12.04.2+0.4-0ubuntu4) ...
install_device not specified.
Usage: grub-install [OPTION] install_device
Install GRUB on your drive.
####

Rodolfo Aramayo (raramayo) wrote :

Simple question:

What would be the implications of removing the 'shim-signed' package?

Thanks

Stéphane Graber (stgraber) wrote :

Can you please provide the following:
 ls -l /sys/firmware
 dpkg -l | grep grub
 dpkg -l | grep shim

The error you're getting seems to suggest you have shim-signed installed on a non-UEFI system, in which case it'd be safe to remove, but I'd prefer to make sure of this since removing shim-signed on a UEFI system will lead to the machine to fail to boot entirely.

Rodolfo Aramayo (raramayo) wrote :

Here we go:

root@OR00:~# ls -l /sys/firmware
total 0
drwxr-xr-x 4 root root 0 Nov 9 20:18 acpi
drwxr-xr-x 4 root root 0 Nov 8 09:07 efi
drwxr-xr-x 26 root root 0 Nov 9 20:18 memmap
root@OR00:~# dpkg -l | grep grub
rc grub 0.97-29ubuntu66 GRand Unified Bootloader (Legacy version)
ii grub-common 1.99-21ubuntu3.10 GRand Unified Bootloader (common files)
rc grub-efi-amd64 1.99-21ubuntu3.10 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 1.99-21ubuntu3.10 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
ii grub-gfxpayload-lists 0.6 GRUB gfxpayload blacklist
ii grub-pc 1.99-21ubuntu3.10 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 1.99-21ubuntu3.10 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2 1.99-21ubuntu3.10 GRand Unified Bootloader, version 2 (dummy package)
ii grub2-common 1.99-21ubuntu3.10 GRand Unified Bootloader (common files for version 2)
root@OR00:~# dpkg -l | grep shim
ii shim 0.4-0ubuntu4 boot loader to chain-load signed boot loaders under Secure Boot
iF shim-signed 1.5~12.04.2+0.4-0ubuntu4 Secure Boot chain-loading bootloader (Microsoft-signed binary)
root@OR00:~#

Thanks

Stéphane Graber (stgraber) wrote :

Ok, so your machine is booted from EFI but has both the PC and EFI version of grub installed, that's the problem.

Try removing grub-pc and grub-pc-bin from your system, then install shim-signed again.

On Wed, Nov 13, 2013 at 03:48:31PM -0000, Rodolfo Aramayo wrote:
> I tried your suggestion Simon, but it did not help

> I then uninstalled and re-installed 'shim-signed' but the error still
> remains:

That's a different bug. You have the wrong grub package installed, which is
exactly what the shim-signed change was supposed to work around with the
--target argument. You need to install grub-efi-amd64 instead of grub-pc.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Rodolfo Aramayo (raramayo) wrote :

Stéphane, Steve,

So I did the following:

 apt-get remove grub-pc
 apt-get remove grub-pc-bin
 apt-get remove shim-signed
 apt-get install grub-efi-amd64
 apt-get install shim-signed

and YES this solve the problem

I did not realize there was a difference between grub-efi and grub-efi-amd64

I guess the acid test will be to reboot the machine...;;))

Thanks for your help

Rodolfo Aramayo (raramayo) wrote :

Stéphane, Steve,

I have a last question for you

Am I likely to damage my system if I, after deleting grub-pc and grub-pc-bin I now purge those packages?

This is:

 apt-get purge grub-pc
 apt-get purge grub-pc-bin

and, related question

can one purge a package that has not been deleted? or is this likely to produce damage?

Thanks

Steve Langasek (vorlon) wrote :

On Fri, Nov 15, 2013 at 10:05:23AM -0000, Rodolfo Aramayo wrote:
> I have a last question for you

> Am I likely to damage my system if I, after deleting grub-pc and grub-
> pc-bin I now purge those packages?

> This is:

> apt-get purge grub-pc
> apt-get purge grub-pc-bin

It looks like this would take out /etc/default/grub on your system.
Probably best to not purge them.

Benny (benny-malengier) wrote :

I have the error in Ubuntu 13.10. Has a fix been released there too?

Error:
Updating /boot/grub/menu.lst ... done

Instellen van shim-signed (1.5~13.10.1+0.4-0ubuntu4) ...
Unrecognized option `--target=x86_64-efi'
Usage: grub-install [OPTION] install_device
Install GRUB on your drive.

  -h, --help print this message and exit
  -v, --version print the version information and exit
  --root-directory=DIR install GRUB images under the directory DIR
                          instead of the root directory
  --grub-shell=FILE use FILE as the grub shell
  --no-floppy do not probe any floppy drive
  --force-lba force GRUB to use LBA mode even for a buggy
                          BIOS
  --recheck probe a device map even if it already exists

INSTALL_DEVICE can be a GRUB device name or a system device filename.

grub-install copies GRUB images into the DIR/boot directory specfied by
--root-directory, and uses the grub shell to install grub into the boot
sector.

Report bugs to <email address hidden>.
dpkg: error processing shim-signed (--configure):
 subproces installed post-installation script gaf een foutwaarde 1 terug
Instellen van linux-image-extra-3.11.0-14-generic (3.11.0-14.21) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)

Information on my system:
benny@bennygeosound:~/.kde/share/config$ ls -l /sys/firmware
totaal 0
drwxr-xr-x 6 root root 0 dec 20 09:00 acpi
drwxr-xr-x 4 root root 0 dec 19 09:54 efi
drwxr-xr-x 23 root root 0 dec 20 09:00 memmap

benny@bennygeosound:~/.kde/share/config$ dpkg -l | grep grub
ii grub 0.97-29ubuntu66 amd64 GRand Unified Bootloader (Legacy version)
ii grub-common 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader (common files)
rc grub-efi-amd64 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)

benny@bennygeosound:~/.kde/share/config$ dpkg -l | grep shim
ii shim 0.4-0ubuntu4 amd64 boot loader to chain-load signed boot loaders under Secure Boot
iF shim-signed 1.5~13.10.1+0.4-0ubuntu4 amd64 Secure Boot chain-loading bootloader (Microsoft-signed binary)
ii systemd-shim 4-0ubuntu0.13.10 amd64 shim for systemd
benny@bennygeosound:~/.kde/share/config$

Steve Langasek (vorlon) wrote :

> I have the error in Ubuntu 13.10. Has a fix been released there too?

Partly, but a new issue has been found. You need to install grub2-common, which appears to be missing from your system.

公输目 (yue937) wrote :

confirm +1

公输目 (yue937) wrote :

Ubuntu 16.04...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers