[jaunty] package grub-pc 1.96+20080724-12ubuntu2 failed to install/upgrade: sub-process pre-removal script returned 10

Bug #347532 reported by Grizzly
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Invalid
Undecided
Rolf Leggewie

Bug Description

Binary package hint: grub2

I had neither menu.lst nor grub.cfg anywhere on my traditional-styls ext2 boot partition.
Wanted to check out grub2, could not change kernel lines in menu.lst or grub.cfg, wanted to switch back to grub.
On next alternate install will use traditional grub.... given, there will be the option to select it on the mini.iso...

ProblemType: Package
Architecture: amd64
DistroRelease: Ubuntu 9.04
ErrorMessage: Unterprozess pre-removal script gab den Fehlerwert 10 zurück
NonfreeKernelModules: nvidia
Package: grub-pc 1.96+20080724-12ubuntu2
SourcePackage: grub2
Title: package grub-pc 1.96+20080724-12ubuntu2 failed to install/upgrade: Unterprozess pre-removal script gab den Fehlerwert 10 zurück
Uname: Linux 2.6.28-11-generic x86_64

Revision history for this message
Grizzly (sven-witterstein) wrote :
Revision history for this message
Felix Zielcke (fzielcke) wrote :

Entferne grub-pc ...
dpkg: Fehler beim Bearbeiten von grub-pc (--remove):
 Unterprozess pre-removal script gab den Fehlerwert 10 zurück

That can only mean that `db_get grub-pc/chainload_from_menu.lst' returned 10.
But I'm not a debconf expert and don't have a clue why this could have happened.

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 347532] Re: [jaunty] package grub-pc 1.96+20080724-12ubuntu2 failed to install/upgrade: sub-process pre-removal script returned 10

It means that the question doesn't exist in the debconf database.

Steve Magoun (smagoun)
Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Steve Magoun (smagoun) wrote :

Reproduced this in a build of Ubuntu (Karmic/i386) I generated using live-helper and live-installer. I'm using the following preseed option:

d-i grub-installer/grub2_instead_of_grub_legacy boolean false

which results in grub-installer trying to 'dpkg -P grub-pc' from the target and install grub. The purge command fails with the same 'error 10' as in the original bug report.

After the error halts installation, 'debconf-show grub-pc' in the target (via chroot) shows "grub-pc/chainload_from_menu.lst: true".

Revision history for this message
Rolf Leggewie (r0lf) wrote :

does this still affect xenial or later?

Changed in grub2 (Ubuntu):
assignee: nobody → Rolf Leggewie (r0lf)
status: Confirmed → Incomplete
Revision history for this message
Rolf Leggewie (r0lf) wrote :

closing as obsolete

Changed in grub2 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Stefan (steffel) wrote :

Just had exactly that problem on a 18.04 installation at the end.
It was a EFI installation and grub wanted to remove "grub-pc".

As described above, the prerm script tried to db_get the variable

    grub-pc/chainload_from_menu.lst.

grub-pc version is the latest from bionic-update (2.04-1ubuntu35.2).

-- prerm ------

  #!/bin/bash
  set -e

  case "$1" in
    remove|deconfigure)
      . /usr/share/debconf/confmodule
      db_get grub-pc/chainload_from_menu.lst <---- here the scripts aborts
      if $RET && test -e /boot/grub/menu.lst ; then
  ...

---------------

Because of "set -e", the scripts aborts when the variable is not available.

Looking into grub-pc's config script, i find this:

  db_input high grub-pc/chainload_from_menu.lst || true

Maybe this would be a good improvement for the prerm script?

The only workaround I think of, is to preseed that variable, hoping it doesn't harm anything.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.