grub-setup hangs on upgrade (natty)

Bug #691569 reported by Brandon Liles
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Debian)
Fix Released
Unknown
grub2 (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

Binary package hint: grub2

Running Ubuntu natty (development branch) 11.04 i386

Attempted to upgrade grub to 1.99~20101210-1ubuntu2, grub-setup hangs.

These are the current active processes:

 2086 pts/0 S+ 0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/grub-pc.postinst configure 1.99~20101126-1ubuntu3
 2096 pts/0 S+ 0:00 /bin/bash /var/lib/dpkg/info/grub-pc.postinst configure 1.99~20101126-1ubuntu3
 2290 pts/0 S+ 0:00 /bin/sh /usr/sbin/grub-install --force --no-floppy /dev/sda
 2959 pts/0 D+ 0:00 /usr/sbin/grub-setup --force --directory=/boot/grub --device-map=/boot/grub/device.map /dev/sda

Tags: natty

Related branches

Revision history for this message
Brandon Liles (brandon.liles) wrote :

I was able to get past the hang by starting in recovery mode.

tags: added: natty
Revision history for this message
Bryce Harrington (bryce) wrote :

Think I'm seeing the same problem. I ran

salisbury:~$ sudo dpkg --configure -a
Setting up grub-pc (1.99~20101210-1ubuntu2) ...

but it just hangs there indefinitely until I ^C.

Seems like it could be a critical issue, but just setting to high for now until the scope/severity is clearer. I definitely think this should be investigated prior to alpha-2, else we might have many unhappy upgraders on our hands.

salisbury:/srv/Source/HWSetup$ ps aux | grep grub
root 15694 0.0 0.1 5040 1588 pts/3 S 14:31 0:00 /bin/bash /var/lib/dpkg/info/grub-pc.postinst configure 1.99~20101126-1ubuntu3
root 15914 0.0 0.0 1896 592 pts/3 S 14:31 0:00 /bin/sh /usr/sbin/grub-install --force --no-floppy /dev/sda
root 16626 0.0 0.2 8088 4520 pts/3 D 14:31 0:00 /usr/sbin/grub-setup --force --directory=/boot/grub --device-map=/boot/grub/device.map /dev/sda
root 26994 0.0 0.5 11972 8340 pts/3 S+ 14:38 0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/grub-pc.postinst configure 1.99~20101126-1ubuntu3
root 27007 0.0 0.1 5040 1588 pts/3 S+ 14:38 0:00 /bin/bash /var/lib/dpkg/info/grub-pc.postinst configure 1.99~20101126-1ubuntu3
root 27217 0.0 0.0 1896 592 pts/3 S+ 14:38 0:00 /bin/sh /usr/sbin/grub-install --force --no-floppy /dev/sda
root 27910 0.1 0.2 8088 4520 pts/3 D+ 14:38 0:00 /usr/sbin/grub-setup --force --directory=/boot/grub --device-map=/boot/grub/device.map /dev/sda

Changed in grub2 (Ubuntu):
importance: Undecided → High
milestone: none → natty-alpha-2
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

I rebooted without issue and then re-ran sudo dpkg --configure -a and grub-pc updated itself normally.

Not sure how the system got into a state where grub-pc was hanging. I did have a lot of defunct processes hanging around for some reason.

Revision history for this message
Colin Watson (cjwatson) wrote :

Any hope of any debugging information, like an strace?

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Colin Watson (cjwatson) wrote :

Also, if it can be reproduced, adding the --debug option to grub-install (in your cases it's currently being run as 'grub-install --force --no-floppy /dev/sda', so make that 'grub-install --debug --force --no-floppy /dev/sda') and providing the output would be helpful.

If it goes away when you try to reproduce it, I don't know if there's much I can do.

Revision history for this message
Bryce Harrington (bryce) wrote :

I tried reproducing it by downgrading the grub-pc and grub-common packages to 1.99~20101126-1ubuntu3 and then repeated the upgrade but it did not hang.

Anyway, if no one else is having the same issue maybe it's not important.

Revision history for this message
Colin Watson (cjwatson) wrote :

Unmilestoning until/unless we have some way to reproduce and debug this.

Changed in grub2 (Ubuntu):
milestone: natty-alpha-2 → none
Revision history for this message
bugssoren (paul-sorenassoc-deactivatedaccount) wrote :

Saw same hang when upgrading from 10.04 to 10.10. Problem for me is the dialog for grub-pc configuration was behind the main update manager's window. Waiting on input. But I couldn't rearrange the windows to accept the grub-pc configuration question.

CPU usage was near 100% with no processes using large amounts of CPU. Sat like that for 2 or 3 hours with no progress.

What allowed me to continue was to set
System->Preferences->Appearance->Visual Effects
from None to Normal setting.

Once this was done I could rearrange the windows and click the button to accept grub-pc config.

A friend had the same problem and he aborted. I was able to recover one machine as others had after reboot. The other, grub-pc had to be un-installed and re-installed to clean up partial upgrade.

Revision history for this message
sc9944 (sc9944) wrote :

grub-setup seems to be trying to scan the empty space before the first paritition. In my case about 75 gb.
Also it's using about 1 gb ram causing my machine to thrash and grind to halt.

The fix for me was to create a partition at the beginning of the disk.

Revision history for this message
sc9944 (sc9944) wrote :

Easily reproducible, also.

Revision history for this message
Colin Watson (cjwatson) wrote :

Ah, that would make sense. In that case it's a bug in the embed-sectors branch.

Changed in grub2 (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: Incomplete → Triaged
Colin Watson (cjwatson)
Changed in grub2 (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.4 KiB)

This bug was fixed in the package grub2 - 1.99~rc1-6ubuntu1

---------------
grub2 (1.99~rc1-6ubuntu1) natty; urgency=low

  * Resynchronise with Debian. Remaining changes:
    - Adjust for default Ubuntu boot options ("quiet splash").
    - Default to hiding the menu; holding down Shift at boot will show it.
    - Set a monochromatic theme and an aubergine background for Ubuntu.
    - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
      recovery mode, quiet option, tweak how memtest86+ is displayed, and
      use UUIDs where appropriate.
    - Fix backslash-escaping in merge_debconf_into_conf.
    - Remove "GNU/Linux" from default distributor string.
    - Add crashkernel option.
    - Bypass menu unless other OSes are installed or Shift is pressed.
    - Allow Shift to interrupt 'sleep --interruptible'.
    - Reduce visual clutter in normal mode.
    - Remove verbose messages printed before reading configuration.
    - Suppress kernel/initrd progress messages, except in recovery mode.
    - Handle filesystems loop-mounted on file images.
    - Ignore devices loop-mounted from files in Linux grub.d scripts.
    - Show the boot menu if the previous boot failed.
    - Don't generate device.map during grub-install or grub-mkconfig.
    - Adjust upgrade version checks for Ubuntu.
    - Suppress "GRUB loading" message unless Shift is held down.
    - Adjust versions of grub-doc and grub-legacy-doc conflicts.
    - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
    - Look for .mo files in /usr/share/locale-langpack first.
    - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
    - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
    - Use qemu rather than qemu-system-i386.
    - Add a grub-rescue-efi-amd64 package.
    - On Wubi, don't ask for an install device, but just update wubildr
      using the diverted grub-install.
    - Enable lua from grub-extras.
    - Incorporate the bitop library into lua.
    - Add enum_pci function to grub module in lua.
    - Check hardware support before using gfxpayload=keep.
    - Build part_msdos and vfat into EFI boot images.
    - Put second and subsequent Linux menu entries in a submenu.
    - Preferred resolution detection for VBE.
    - Set vt.handoff=7 for smooth handoff to kernel graphical mode.
    - Build with gcc-4.5 on ppc64.
    - Add apport hook for ProblemType = 'Package'.

grub2 (1.99~rc1-6) unstable; urgency=low

  * Cherry-pick from upstream:
    - Fix crash when extending menu entry line beyond 79 characters (closes:
      #615893).
    - Account for FreeBSD module headers when calculating allocation size.
    - Switch back to framebuffer page zero before loading the kernel
      (thanks, Felix Kuehling).
  * Merge from Ubuntu:
    - If we're upgrading and /boot/grub/core.img doesn't exist, then don't
      ask where to install GRUB, since it probably means we're in some kind
      of specialised environment such as a live USB stick (LP: #591202).
    - Drop the default priority of grub2/linux_cmdline to medium. We only
      need to ask it if we're upgrading from GRUB Legacy and found an empty
      kopt in menu.lst (LP: #591202)....

Read more...

Changed in grub2 (Ubuntu):
status: Fix Committed → Fix Released
Changed in grub2 (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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