Bug#608449: grub-pc: infinite debconf prompt loop (10 which devices? 20 continue without installing? 30 goto 10)

Colin Watson cjwatson at debian.org
Fri Dec 31 23:08:43 UTC 2010


On Thu, Dec 30, 2010 at 05:48:53PM -0600, Jonathan Nieder wrote:
> Stock squeeze system.  Upgrading grub-pc, I am asked:
> 
> | # The grub-pc package is being upgraded. This menu allows you to
> | # select which devices you'd like grub-install to be
> | # automatically run for, if any.
> [...]
> | # (Choices: /dev/sda (6448 MB, WDC_WD64AA), - /dev/sda1 (254 MB,
> | # /boot), /dev/dm-0 (5867 MB, copier-root))
> | # (Enter zero or more items separated by a comma followed by a space
> | # (', ').)
> | # GRUB install devices:
> | grub-pc/install_devices=""
> 
> I answer "/dev/sda (6448 MB, WDC_WD64AA)" and receive an odd response:
> 
> | # You chose not to install GRUB to any devices.
> [...]
> | # (Choices: yes, no)
> | # Continue without installing GRUB?
> | grub-pc/install_devices_empty="no"

Would it be possible to get a log with DEBCONF_DEBUG=developer set in
the environment, to confirm exactly what's going on here?

>  - It looks like the splitting on comma for grub-pc/install_devices
>    is broken, at least with the debconf editor frontend.  Maybe
>    another delimiter would work better?
> 
> 	old_devices="$(echo "$RET" | sed 's/, / /g')"

This is indeed probably the problem - I was sure that at one point I had
this as a semicolon instead, but I can find no evidence of that in
revision control history.  Using values containing commas in multiselect
choices is certainly optimistic.

The good news is that this only affects frontends where debconf needs to
compare strings in order to figure out which choice you meant.  I
believe that this means only the editor frontend has a problem.

>  - No error response for typos --- the malformed resulting old_devices
>    seems to just result in install_devices="" or something.

That's a debconf bug (or missing feature).
Debconf::Editor::Multiselect::value just greps out invalid values.

>  - Infinite loop with no escape!  What if I just want to use the old
>    version of grub-pc, which worked?  I tried exiting vi with :cq but
>    that leaves me in the same loop.

The escape is to answer "yes" to the "Continue without installing GRUB?"
prompt.  It may not be *desirable*, but given the existence of this bug
in the first place ...

-- 
Colin Watson                                       [cjwatson at debian.org]





More information about the Pkg-grub-devel mailing list