Software Updater freezes when trying to upgrade grub-pc package

Bug #1457353 reported by Pierre Equoy
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu version: 14.04.2

When running Software Updater (update-manager) to update the packages, it freezes when trying to update grub-pc package.

I think this is related to the fact that grub-pc detected a modification of a configuration file and needs to ask the user for confirmation on the action to take. However, the package required to display this (libgtk2-perl) is not installed by default.

Steps to reproduce the problem:
1 - install a fresh stock version of Ubuntu 14.04.2 on your device
2 - modify the file /etd/default/grub (for instance, comment the line "GRUB_HIDDEN_TIMEOUT=0" or simply add a comment at the end of the file), then save and run `sudo update-grub2`
3 - Restart the computer and start "Software Updater"
Updates are being downloaded and installed. However when reaching grub-pc configuration, the window turns black and white and it has to be killed. (see attached screenshot update-manager-freeze.png)

In order to fix the problem, before running the Software Updater, you need to install package `libgtk2-perl`. In that case, a new window will be displayed to ask what to do with the modified configuration file (see screenshot grub-gui-choice.png).

Note that this problem does not happen when running the update through a terminal (sudo apt-get update && sudo apt-get dist-upgrade) because the grub modification confirmation is then displayed using ncurse.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ubuntu-release-upgrader-core 1:0.220.7
ProcVersionSignature: Ubuntu 3.16.0-30.40~14.04.1-generic 3.16.7-ckt3
Uname: Linux 3.16.0-30-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.10
Architecture: amd64
CrashDB: ubuntu
CurrentDesktop: Unity
Date: Thu May 21 15:09:54 2015
InstallationDate: Installed on 2015-05-21 (0 days ago)
InstallationMedia: Ubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
Symptom: dist-upgrade
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Pierre Equoy (pieq) wrote :
Revision history for this message
Pierre Equoy (pieq) wrote :
description: updated
tags: added: libgtk2-perl
tags: added: grub-pc
tags: added: update-manager
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Adrian Aichner@gmail.com (adrian-aichner) wrote :

I just experienced this bug today after using workaround described in
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1500751/comments/5
on my xps13 2015 laptop

firefox-trunk upgraded fine via the graphical Ubuntu Software Update

After that the updater dimmed down pretty dark and I can barely see it displaying
Configuring grub-efi-amd64

I have this change in place:

adrian@adrian-xps-13-9343:/etc/default$ diff grub grub.ucf-dist
11d10
< # https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1500751/comments/5
13d11
< # GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
adrian@adrian-xps-13-9343:/etc/default$

Revision history for this message
Brian Murray (brian-murray) wrote :

I've tried recreating this, using the test case you provided (thanks!), and ensuring that libgtk2-perl was not installed. However, the upgrade (which included grub-pc) did not hang for me at all. Are you sure modifying /etc/default/grub is sufficient?

Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Pierre Equoy (pieq) wrote :

Hi Brian,

I've installed Ubuntu 14.04.2 in a VM and I cannot reproduce the issue anymore... Could it be that the packages are updated during installation? In my original description there is not enough details regarding the original versions of the update manager and other relevant packages, so I'm not sure how to check this out.

If I remember correctly, we discovered an issue when testing an OEM version (see lp:1454090), and I tried on a stock Ubuntu image and found out I had a similar issue.

Not sure what could have changed since then that makes stock Ubuntu 14.04.2 work fine now...

Revision history for this message
Benjamin Bach (benjaoming) wrote :

I would think the issue is related to the debconf of grub-pc -- Brian, if you still have the test ready to run, try clearing the debconf of grub-pc (or related package) before upgrading the package. Something like:

echo "purge" | sudo -E debconf-communicate grub-pc

As a general rule, Update Manager and Ubuntu Software Center have problems when libgtk2-perl isn't installed and debconf needs a frontend. Either the problem is about frozen UI or it's about critical answers or information not being displayed.

Revision history for this message
sushanth (sushanth53) wrote :

Even i am facing the same issue, while updating ubuntu it stops at installing grub and it freeze the entire laptop if do a force restart it taking me to grub terminal due to this again i have to reinstall ubuntu 14.04

Revision history for this message
Marc Hunter (hunter1728) wrote :

I am running it inside a virtualbox vm - and it always killed my VM. I then ran it from terminal as per this link:
http://askubuntu.com/questions/196768/how-to-install-updates-via-command-line

and it comes up with this msg, which is what I presume is freezing it:

Package configuration

 ┌──────────────────────────┤ Configuring grub-pc ├──────────────────────────┐
 │ │
 │ The GRUB boot loader was previously installed to a disk that is no │
 │ longer present, or whose unique identifier has changed for some reason. │
 │ It is important to make sure that the installed GRUB core image stays in │
 │ sync with GRUB modules and grub.cfg. Please check again to make sure │
 │ that GRUB is written to the appropriate boot devices. │
 │ │
 │ If you're unsure which drive is designated as boot drive by your BIOS, │
 │ it is often a good idea to install GRUB to all of them. │
 │ │
 │ Note: it is possible to install GRUB to partition boot records as well, │
 │ and some appropriate partitions are offered here. However, this forces │
 │ GRUB to use the blocklist mechanism, which makes it less reliable, and │
 │ therefore is not recommended.

and then

┌───────────┤ Configuring grub-pc ├───────────┐
                │ GRUB install devices: │
                │ │
                │ [ ] /dev/sda (35279 MB; VBOX_HARDDISK) │
                │ [ ] - /dev/sda1 (33130 MB; /) │
                │ │
                │ │
                │ <Ok> │
                │ │
                └─────────────────────────────────────────────┘

In case that helps

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ubuntu-release-upgrader (Ubuntu) because there has been no activity for 60 days.]

Changed in ubuntu-release-upgrader (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Christian Walde (walde-christian) wrote :

This is still an issue, and letting it time out does not speak well for someone who's only trying to install Ubuntu to repro an issue impacting one of your users.

Changed in ubuntu-release-upgrader (Ubuntu):
status: Expired → Incomplete
Revision history for this message
Christian Walde (walde-christian) wrote :

Oh yeah, and in case you do still need info on how to reproduce: As Marc Hunter said: Install Ubuntu in a virtualbox vm and try to update it.

Revision history for this message
Dustin Henning (the00dustin) wrote :

I appear to be experiencing this as well, see http://ubuntuforums.org/showthread.php?t=2328686.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ubuntu-release-upgrader (Ubuntu) because there has been no activity for 60 days.]

Changed in ubuntu-release-upgrader (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Miceal Gallagher (we-all-haul) wrote :

Currently experiencing this issue on Ubuntu 16.04. I've modified my /etc/default/grub by updating the property GRUB_GFXMODE=1280x1024

Revision history for this message
Mark O'Donovan (shiftee) wrote :

Also on 16.04.
I did not modify /etc/default/grub in the last 3-4 months, if at all.
Clicking the close button did nothing and I had to use the force-close dialog.
I installed libgtk2-perl from the terminal without issue.
Re-running Software updater installed one or two inconspicuous packages without issue.
Rebooting worked fine.

I found the following with the ps command:
root 3935 0.0 0.1 21648 9164 pts/8 SNs+ 18:36 0:00 /usr/bin/dpkg --status-fd 67 --configure libc6-dbg:amd64 libc-dev-bin:amd64 linux-libc-dev:amd64 libc6-dev:amd64 locales:all <many more packages>

Revision history for this message
Mike Ciaraldi (ciaraldi) wrote :

For what it's worth, I have seen the same problem with 16.04LTS, and saw it again two days ago.

Changed in ubuntu-release-upgrader (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Mike Ciaraldi (ciaraldi) wrote :

To reproduce:

1) Create a virtual machine using VirtualBox (I did it on Microsoft Windows 7 Enterprise).
2) Install from the Ubuntu 16.04LTS DVD, accepting all defaults, except for allowing third-party software (but not updates during installation).
3) Reboot.
4) Run the GUI Software Updater.
5) Observe that the update hangs while updating grub-pc.

Note: Once this happens, to recover you can reboot, then try to install grub manually, like this:
   sudo apt-get ypgrade grub-pc
You get a message that you need to clear the lock on updates using a specific dpkg command. Do that, then try again to upgrade grub. This time it succeeds.

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.