grub-mount hangs when update-grub is ran

Bug #988583 reported by Sébastien Bernard
104
This bug affects 23 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
High
Colin Watson
Precise
Won't Fix
High
Unassigned

Bug Description

Whenever my system tries to build the grub.cfg, the grub-mount hangs and I have to kill it 3 times before the command completes.
I had a look on the internet and I got this links which is related :

http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00206.html

To sum up, I have a 3 fs on my disks which are hfs+ and grub-mount hangs each time it tries to process them.

Problem seems to have been fixed upstream.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: grub-pc 1.99-21ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0.1-0ubuntu6
Architecture: amd64
Date: Wed Apr 25 23:51:07 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64+mac (20110126)
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: Upgraded to precise on 2012-03-10 (46 days ago)

Revision history for this message
Sébastien Bernard (sbernard) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
G_Lambert (hervouj2) wrote :

Apparently this bug causes Precise installation to freeze : ubiquity needs os-prober to detect partitions and other OSes. And os-prober calls grub-mount which hangs if an hfs+ partition exists.

See : http://ubuntuforums.org/showthread.php?t=1966261

or : http://forum.ubuntu-fr.org/viewtopic.php?id=897031 (in french).

Revision history for this message
Eric Zig (zuric) wrote :

Same issue with my MacBook Air and HFS+ partition.
So I killed grub-mount for precise install and I kill it for do upgrades

Revision history for this message
Sébastien Bernard (sbernard) wrote : Re: [Bug 988583] Re: grub-mount hangs when update-grub is ran

Le 03/05/2012 18:55, Eric Zig a écrit :
> Same issue with my MacBook Air and HFS+ partition.
> So I killed grub-mount for precise install and I kill it for do upgrades
>
Same thing here. I have 3 hfs+ volumes and I'm tired to kill -9
grub-mount each time grub-update.
Since grub-update do a grub-mount in a loop, I have to kill it 3 times
in a row.

Seb

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

Bug 992940 is probably an installation failure because of this.

Revision history for this message
Brian Murray (brian-murray) wrote :
Changed in grub2 (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Changed in grub2 (Ubuntu):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Eric Zig (zuric) wrote :

I think #992940 and #990173 are duplicate of this bug

when I tried to install Precise 64bits, I had freeze like them.
So I start live sessions, start Ubiquity and when it freeze,
I do kill -9 grub-mount,
and the installation continues

Revision history for this message
Sébastien Bernard (sbernard) wrote :

I rebuild grub2 from upstream.
I confirm that simply replacing the grub-mount executable by the newer make the hangs vanish.
The grub-update comples sucessfully. No more kill -9 on the grub-mount.

Revision history for this message
Jan de Haan (jdehaan) wrote :

See bug 1002461.

Bug is not exclusive to hfs, I do see it on jfs too.

Second: Building upstream and replacing grub-mount does not help.

Revision history for this message
Jacques (jacques-eavr) wrote :

Same bug here on MacBook air mid 2011. Very annoying.

Indeed, trying to replace grub-mound executable from QQ repository does not help. I've seen some exchanges on the web between what seems to be the developers of grub and they seemed to be happy about the correction of this bug. Have someone found where is the source of this corrected version of grub-mount and how to compile it under PP ?

Thanks,
Jacques

Revision history for this message
Jacques (jacques-eavr) wrote :

Meanwhile, I managed to compile "grub-mount" from the source repository of grub (http://www.gnu.org/software/grub/) with the lastest known version (bzr branch http://bzr.savannah.gnu.org/r/grub/trunk/grub). I replaced the buggy ubuntu binary with the one I just compiled...and it works !

You can just download this executable and copy it in /usr/bin to fix this issue on this webpage :

http://newlsiit.u-strasbg.fr/avr_fr/index.php/12.04_LTS_on_MacBook_Air_mid_2011

After refit I have now the standard grub boot menu allowing me to select various boot option (Linux, memtest, Mac OSX, ...)

Jacques

Revision history for this message
Olivier Cortès (olive) wrote :

Same issue on a Macbook Air late 2010 (MacBookAir3,2). Killing grub-mount lets ubiquity continue to install, else it's frozen like death. Didn't try the binary from Jacques.

Note that I must kill grub-mount many times during the installation process: before typing my personnal details, after taking a photo with the webcam... I let a terminal open and launch "sudo killall -9 grub-mount" everytime things seem to hang. It succeeded at least 3 times (installation is still going on).

Regards,

Revision history for this message
Yonnel Bécognée (ybecognee) wrote :

I have the same problem on a macbookpro 8,1

I don't know how to "rebuild grub2 from upstream".
Can anybody explain me please ?

Thank you

Revision history for this message
Yonnel Bécognée (ybecognee) wrote :

5 days that I'm on this bug !
I can't understand that it can works fine for some ones...

"I have recently installed Ubuntu 12.04 on my MacBook Pro 8.2 so that I can dualboot. Installation went fine and everything seems to be working great..."
http://ubuntuforums.org/showthread.php?t=2046751

"I installed Mountain Lion first then the latest version of refit followed by Windows 7 and all worked perfect. I then installed the latest desktop release of Ubuntu 12.04.1 LTS x64 which again installed absolutely fine."
http://ubuntuforums.org/showthread.php?t=2047663

How does it's possible !!!

Revision history for this message
Sébastien Bernard (sbernard) wrote :

Le 01/09/2012 02:43, Yonnel Bécognée a écrit :
> 5 days that I'm on this bug !
> I can't understand that it can works fine for some ones...
>
> "I have recently installed Ubuntu 12.04 on my MacBook Pro 8.2 so that I can dualboot. Installation went fine and everything seems to be working great..."
> http://ubuntuforums.org/showthread.php?t=2046751
>
> "I installed Mountain Lion first then the latest version of refit followed by Windows 7 and all worked perfect. I then installed the latest desktop release of Ubuntu 12.04.1 LTS x64 which again installed absolutely fine."
> http://ubuntuforums.org/showthread.php?t=2047663
>
> How does it's possible !!!
>
Workaroud is to kill -9 grub-mount.
The exact report is it depends on the hf+ filesystem. Somtimes, the hfs
driver goes into an infinite loop while reading the metadata.

The exact condition under which this problem happens is unknow.

Seb

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

If anyone suffering from this bug is running quantal, I'd appreciate testing of my preliminary 2.00 packages:

  https://lists.ubuntu.com/archives/ubuntu-devel/2012-September/035887.html

There've been a number of upstream changes to the hfsplus driver, and it's quite possible that one of them has fixed this bug.

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

The 2.00 packages are now available in quantal and it would be really helpful if someone could test this bug again with quantal. Thanks in advance!

Changed in grub2 (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Sébastien Bernard (sbernard) wrote :

New packages is ok. The previous fixe was to compile a grub-mount from uptodate upstream.
Since the new version is in ubuntu the bug can be considered fixed.
However, could you backport the new version to the previous LTS version.
I think upgrading the grub packages in previous supported boot image would benefit to many.

Revision history for this message
Flyos (pflyos) wrote :

I agree on the last comment : if the bug is fixed for Quantal, it would be really useful to backport it to Precise, especially because it is the LTS and, as such, recommanded by many people for an install out there.

I'm not sure how many people install Linux along with Mac, but I think it covers more than a few Ubunteros ! ;)

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

OK, we can consider trying to track down the relevant commit(s) for 12.04.3, then. It may not be quite straightforward because there were several relevant changes and I'd need to work out exactly which one caused them.

If anyone has an HFS+ filesystem whose contents they might be able to share publicly and which isn't too gigantic, it might help to take an image of it with dd and post it somewhere.

Changed in grub2 (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → Colin Watson (cjwatson)
status: Incomplete → Fix Released
Changed in grub2 (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Colin Watson (cjwatson)
milestone: none → ubuntu-12.04.3
Revision history for this message
Colin Watson (cjwatson) wrote :

Of course I mean an HFS+ filesystem which triggered the grub-mount hang before.

Revision history for this message
Flyos (pflyos) wrote :

Sorry, I can't: professional data... I've posted a message on the French Ubuntu forum saying that you were looking for one, though!

Revision history for this message
Flyos (pflyos) wrote :

Hi guys ! I'm just fishing for news: is there a plan to add the bug fix into the 12.04.3 release or before? I'm getting tired of the "sudo killall -9 grub-mount" on every grub-update (not that there is many though...).

I know you guys have a lot of work: I'm not complaining, just asking ! ;)

Revision history for this message
Tomse (tomse-tomse) wrote :

I'm waiting for a released fix on this one too. (I can't install ubuntu on a couple of servers).

Is there any way of making an ISO, with this fix applied, myself ?

Revision history for this message
FiNeX (finex) wrote :

I've got the same bug on Ubuntu 13.10 without hsf filesystem. I've only ext3/ext4 .

Revision history for this message
Hans-Christoph Steiner (eighthave) wrote :

I'm also affected by this on Ubuntu/precise (Mint/maya). I have my internal laptop drive with dual boot HFS+/Mac OS X and ext4/GNU/Linux. The grub-mount hang never happens with that disk. It does happen when my external backup disk is attached. I thought maybe it had something to do with how the disks were partitioned. Here's my internal disk that works fine:

$ sudo parted /dev/sda
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: ATA ST9750420AS (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 20.5kB 210MB 210MB fat32 EFI System Partition boot
 2 210MB 483GB 483GB hfs+ Untitled
 3 484GB 645GB 161GB ext4 Untitled
 4 645GB 666GB 21.5GB ext3 Apple_HFSX_Untitled_4
 5 666GB 750GB 83.8GB ext3 Apple_HFSX_Untitled_2

Here's the backup disk that triggers the problem:
$ sudo parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: WD Ext HDD 1021 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 20.5kB 210MB 210MB fat32 EFI System Partition boot
 2 210MB 400GB 400GB hfsx BIGBACKUP
 3 400GB 2000GB 1600GB ext4

Colin Watson (cjwatson)
Changed in grub2 (Ubuntu Precise):
assignee: Colin Watson (cjwatson) → nobody
milestone: ubuntu-12.04.3 → none
Revision history for this message
Michael Eden (themichaeleden) wrote :

Just wanted to add this affects me too on Ubuntu 12.04 with grub-mount version 2.02~beta2-9ubuntu1.

Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in grub2 (Ubuntu Precise):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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