Comment 7 for bug 347532

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.