update-grub stalls at user input

Bug #194710 reported by A Kao on 2008-02-23
Affects Status Importance Assigned to Milestone
grub (Ubuntu)

Bug Description

Binary package hint: grub

After a clean install of 8.04 x86 Alpha 5 (without bootloader), I installed the grub package. When I run "sudo update-grub", I get the following output:

Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ...

Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N)

The script stalls at this point. No matter what I type, the script just stalls there. Looking at the script, the problem area is here:

  echo -n "Would you like $menu_file generated for you? " >&2
  echo -n "(y/N) " >&2
  read answer

I created a short script to reproduce the problem, and it seems that the problem stems from:

. /usr/share/debconf/confmodule

Here's the sample script that reproduces the stalling:

. /usr/share/debconf/confmodule
read answer
echo $answer

I don't know why confmodule is causing this.

The workaround is invoke update-grub with "-y".

Related branches

Steve Langasek (vorlon) wrote :

yes, this is expected behavior when using debconf; I should have foreseen the problem. Will be fixed in the next upload.

Changed in grub:
importance: Undecided → Medium
status: New → In Progress
Steve Langasek (vorlon) on 2008-02-27
Changed in grub:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub - 0.97-29ubuntu18

grub (0.97-29ubuntu18) hardy; urgency=low

  * debian/update-grub: additional adjustment of the menu output when
    emulating old grub for upgrades: if there are no kernel options for the
    kernel (such as for memtest), output a trailing space.
  * debian/update-grub: now that we're using debconf, the non-debconf prompt
    (which we'll leave non-debconfed for the time being) needs to read from
    file descriptor #2 instead of stdin. LP: #194710.

 -- Steve Langasek <email address hidden> Wed, 27 Feb 2008 17:57:49 -0800

Changed in grub:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers