Cannot boot GRUB on Intel Mac after installing to LVM

Bug #745960 reported by Chad A Davis
118
This bug affects 22 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Invalid
High
Unassigned
Oneiric
Invalid
High
Unassigned
Precise
Invalid
High
Unassigned
grub2 (Ubuntu)
Fix Released
High
Canonical Foundations Team
Natty
Invalid
High
Unassigned
Oneiric
Invalid
High
Colin Watson
Precise
Fix Released
High
Canonical Foundations Team

Bug Description

Binary package hint: debian-installer

TEST CASE:
http://testcases.qa.ubuntu.com/Install/AlternateEncryptedLvm

I'm using kubuntu-alternate-amd64+mac.iso from 2011-03-29.1 on a MacBookPro6.2

The installation runs as expected. No errors are reported. After rebooting, grub does not load. It's not that grub does not load linux, but rather that the hardware never passes control to the grub menu. It stays at the grey mac boot screen, as if there were no operating systems. Holding 'Alt' during boot, which is the standard way to boot when only Linux is installed on the Mac, offers no partition to boot.

Installing the same system in the same manner without an encrypted LVM works fine. I did not test installing an unencrypted LVM.

tags: added: iso-testing
Revision history for this message
Colin Watson (cjwatson) wrote :

Could you attach installer logs? You should be able to get to them from rescue mode on the CD; they're in /var/log/installer/syslog and /var/log/installer/partman.

affects: debian-installer (Ubuntu) → grub2 (Ubuntu)
Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Kevin John Panzke (kevpan815) wrote :

This Bug affects me as well!

summary: - Cannot boot grub after installing encrypted LVM on mac
+ Cannot boot grub after installing to LVM on mac
Revision history for this message
Chad A Davis (chadadavis) wrote : Re: Cannot boot grub after installing to LVM on mac

I reinstalled, this time with a whole-disk LVM, without encryption.
Again Mac does not recognize any partitions and never hands control to grub after boot.
I booted in rescue mode, set the root partition to the LVM partition, ran: grub-install /dev/sda and got:

Installation finished. No error reported.

However, no /boot/grub/grub.cfg is created, which I thought was supposed to be the result of grub-install. But, I'm not familiar with installing grub on LVMs.

I'm attaching partman and syslog from the install.

Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :

In rescue mode, I had set the root file system to /dev/ubuntu-alternate-lvm/root and noticed that there is no option to 'Reinstall grub', which is generally an option in rescue mode. Maybe this is specific to LVM. I'm not familiar with how grub is supposed to work there.

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

I daresay this is not Mac-specific. I had the same thing on a Sony Vaio.
Perhaps worth nothing I was using an existing /home partition.
As Chad said, no grub.cfg was created. I installed GRUB using a Natty LiveUSB, but still didn't get the config file. Running update-grub in the live environment threw other errors, which I believe were a separate bug. Further compounding the issue is the fact that no one will tell you how to make your own grub.cfg, since update-grub is supposed to do it automatically. I finally managed to find an example on the forums that I used to improvise a file which allowed me to boot. Once inside the installed Natty, update-grub worked as expected.

Martin Pitt (pitti)
summary: - Cannot boot grub after installing to LVM on mac
+ Cannot boot grub after installing to LVM
Revision history for this message
pierz (pierz) wrote : Re: Cannot boot grub after installing to LVM

I have the same problem with lvm encrypted with ACER5940g.

it looks like my BIOS freeze and can't pass the relay to grub (only happen with an encrypted lvm).

I found a way to make it works, in BIOS i set my SATA hard disk mode to IDE and now it boot, (it doesn't boot works when SATA mode is AHCI).

tested on ubuntu 10.04.

Changed in grub2 (Ubuntu Oneiric):
status: New → Confirmed
Changed in ubuntu-release-notes:
importance: Undecided → High
Revision history for this message
Chad A Davis (chadadavis) wrote :

On Mac, if I boot first from the alternate CD and choose 'boot first hard drive', the system boots off the LVM fine.

Revision history for this message
Walt Corey (waltc) wrote :

This bug effects me as well. In my case the machine, Dell XPS 9100, installed and ran UEC 10.10 front end. Upon installing 11.04 the install goes fine and, upon reboot, I get a fast blinking cursor with a black background. I am using LVM but with NO encryption.

As a tangential, I have the same problem with U 10.10 installed on a Dell PowerEdge T410. I thought it had to do with the new graphics card but, seeing this problem on a machine that did run 10.10, I suspect it is this grub bug.

Revision history for this message
Walt Corey (waltc) wrote :
Download full text (11.0 KiB)

While, when I selected "does this bug effect you" it returned saying "This bug effects you and 2 other people", this is way low. From the forums this bug effects several more people. One of the references McIvor made, I believe, creates this output. I do not know how to go from here to booting in my image (as a circumvention to run grub-update. Here it is:

               Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
    partition #1 for dbh.
 => Syslinux is installed in the MBR of /dev/sdf
 => Grub 2 is installed in the MBR of /dev/mapper/isw_cdbgicafgh_Volume0 and
    looks on the same drive in partition #1 for dbh.

sda1: _________________________________________________________________________

    File system:
    Boot sector type: Unknown
    Boot sector info:
    Mounting failed:
mount: unknown filesystem type ''

sda2: _________________________________________________________________________

    File system: Extended Partition
    Boot sector type: Unknown
    Boot sector info:

sda5: _________________________________________________________________________

    File system:
    Boot sector type: Unknown
    Boot sector info:
    Mounting failed:
mount: unknown filesystem type ''
mount: unknown filesystem type ''

sdf1: _________________________________________________________________________

    File system: vfat
    Boot sector type: Unknown
    Boot sector info: According to the info in the boot sector, sdf1 starts
                       at sector 0. But according to the info from fdisk,
                       sdf1 starts at sector 62.
    Operating System:
    Boot files/dirs: /boot/grub/grub.cfg

isw_cdbgicafgh_Volume01: _________________________________________________________________________

    File system:
    Boot sector type: Unknown
    Boot sector info:
    Mounting failed:
mount: unknown filesystem type ''
mount: unknown filesystem type ''
mount: unknown filesystem type ''

isw_cdbgicafgh_Volume02: _________________________________________________________________________

    File system: Extended Partition
    Boot sector type: Unknown
    Boot sector info:

isw_cdbgicafgh_Volume05: _________________________________________________________________________

    File system:
    Boot sector type: Unknown
    Boot sector info:
    Mounting failed:
mount: unknown filesystem type ''
mount: unknown filesystem type ''
mount: unknown filesystem type ''
mount: unknown filesystem type ''

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 2,048 499,711 ...

Revision history for this message
cccccccc (cccccccc) wrote :

Hi, I have this bug also. I have no Mac - but normal PC. I use LVM and lux encrypt + natty ubuntu.
After 1st start of pc I have black screen at the moment I expect screen with password. I always have to restart pc, and after that I see menu with kernel, recovery etc... so I press latest kernel selection and then I see password screen and all is OK.
But I have to restart PC each time I want to turn my pc on.

Revision history for this message
Ari (a-r-i) wrote :

I experienced exactly the same as posted in #12 but I found a workaround.

On my PC the problem only appears when I'm booting on 2.6.38-8 Kernel. With 2.6.35.28 booting on "first try" works without any problem. Booting to Windows7 works on first try as well.

Revision history for this message
SilverWave (silverwave) wrote :

PC Intel quad core, 64bit 8gb RAM
Natty
3 x 500GB SATA HD
2.6.38-8 Kernel

Not using LMV

I have had this issue intermittently since installing Natty.

booting from the 11.04 cd and choosing "boot from first hard disk" seems be be the best, works most of the time.

Revision history for this message
A Wartnaby (thembisa-hopefarm) wrote :

Hi I have exactly the same problem with my HP 620 laptop. Have gone back to 10.10 but am really keen for a solve as I have ongoing problems with the battery and wireless which i am hoping will be fixed with 11.04. I have installed on a Emachine with no problem at all.

Changed in grub2 (Ubuntu Natty):
importance: Undecided → High
Changed in grub2 (Ubuntu Oneiric):
importance: Undecided → High
Revision history for this message
mbudd (marvbudd) wrote :

I have this problem on Dell Optiplex 980 using the BIOS raid. 10.10 worked ok, reboot after upgrade to 11.04 fails. Noticed the BIOS raid status was Initialise when it should say Normal. Another identical machine here also had intermittent success, but after upgrading BIOS from A01 to A08 it works about 4 out of 5 times. Mine is hard failing even after the BIOS upgrade.

Revision history for this message
mbudd (marvbudd) wrote :

I was able to solve my problem by reinstalling grub2 to the raid device. Booting from a live cd in 10.10 shows the device partition as ...ARRAY01, while under 11.04 the same partition is ARRAY0p1.

Also, /etc/default/grub was missing after the upgrade, and it seemed an old grub was installed.

This information was important when following the chroot instructions here: http://ubuntuforums.org/showthread.php?t=1581099 After reinstalling grub 2 I was able to boot, and clean up the incorrect entries for the root and swap partitions in /etc/fstab.

Revision history for this message
Dobbin (2zbswdnyuz) wrote :

I have successfully deployed Natty to 8 identical servers (using MSI boards), using unencrypted LVM. However using the exact same preseed config it has failed to deploy to a further 4 servers (using Intel boards). All other aspects of the configurations are identical. So it would appear to be some strange interaction with specific hardware.

For the servers that have failed to install correctly I've found that switching back to LILO resolves the problem for me for the time being. But we won't be rolling out to the rest of the estate.

Changed in grub2 (Ubuntu Oneiric):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
milestone: none → ubuntu-11.10-beta-1
Revision history for this message
yamo (stephane-gregoire) wrote :

Hi,
I didn't see if /boot is on LVM.
/boot should not be on a LVM partition with Grub, may this work LILO boot loader!

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 745960] Re: Cannot boot grub after installing to LVM

On the contrary, GRUB 2 supports having /boot on an LVM logical volume.

Martin Pitt (pitti)
Changed in grub2 (Ubuntu):
milestone: ubuntu-11.10-beta-1 → ubuntu-11.10-beta-2
Brad Figg (brad-figg)
tags: added: rls-mgr-o-tracking
Revision history for this message
Vinh Nguyen (vinhdizzo) wrote : Re: Cannot boot grub after installing to LVM

I too had this blank screen issue for my encrypted LVM setup. I found out that grub was installed on my usb installation drive instead of my hard disk. After re-installing grub onto my disk, I no longer get the blank screen. See my adventures [URL="http://blog.nguyenvq.com/2011/09/15/backup-re-install-ubuntu-with-full-disk-encryption-and-restore-all-files-and-settings/"]here[/URL].

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

Stéphane likes LVM... let's ask him to look at this :)

Changed in grub2 (Ubuntu Oneiric):
assignee: Canonical Foundations Team (canonical-foundations) → Stéphane Graber (stgraber)
milestone: ubuntu-11.10-beta-2 → ubuntu-11.10
Revision history for this message
Stéphane Graber (stgraber) wrote :

Ok, so I tried two different setups on Oneiric (in a VM):
 - Regular automated partitioning with LVM + cryptsetup => worked fine
 - Custom manual partitioning with just one primary bootable partition as a LVM physical volume containing one VG then containing two LVs, one for my root and another for my swap. => worked fine

So I'm not sure exactly what's wrong in your case and the information I found attached to your bug reports doesn't let me replicate the bug.

I'd appreciate it if you could try with Oneiric (either daily or beta2).
The attach the following information (either from the installed system if it boots or from a livecd, mounting the target system):
 - brief description of the partitioning options you selected at install time
 - /var/log/installer/syslog
 - output of "dmesg"
 - output of "lspci -nnn"
 - output of "sudo parted -l"
 - output of "sudo lvdisplay -a"
 - /etc/default/grub
 - /boot/grub/grub.cfg

Thanks

Changed in grub2 (Ubuntu Oneiric):
status: Confirmed → Incomplete
Changed in grub2 (Ubuntu Natty):
status: Confirmed → Incomplete
Revision history for this message
Walt Corey (waltc) wrote :

Stephane - In my case the level was Natty and the target was a Dell system with firmware RAID 1 against two 750 GB drives. It never wrote grub out. I could not get install to install grub. I ended up having to disable firmware RAID and fumbling through software RAID. Ubuntu has supported firmware RAID for several years now. I am guessing that support was regressed out.

Revision history for this message
Chad A Davis (chadadavis) wrote :

My original report was on a MacBookPro. I'm not sure if the RAID reports are related. I also tested in a VM, without problems, whether the LVM was encrypted or not. The problem occurred only on the Mac, both encrypted and not encrypted, when using LVM. I used the default: entire-disk. I did not opt to encrypt the home directory. The symtoms are the same on Oneirc as they were on Natty.

I'm attaching the files you requested. This install is from the daily ISO ubuntu-oneiric-alternate-amd64+mac.iso from 2011-09-20 .

Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Revision history for this message
Chad A Davis (chadadavis) wrote :
Changed in grub2 (Ubuntu Oneiric):
assignee: Stéphane Graber (stgraber) → Colin Watson (cjwatson)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Assigning to Colin as I don't have any hardware I can use to reproduce the issue and further debug it.

The logs above seem fine though I'm no expert on what kind of magic happens on Mac using a GPT partition table but then running grub-pc (as seems to be the case from the syslog you attached).

Steve Langasek (vorlon)
Changed in grub2 (Ubuntu Oneiric):
milestone: ubuntu-11.10 → oneiric-updates
Changed in grub2 (Ubuntu Precise):
status: New → Incomplete
importance: Undecided → High
tags: added: rls-mgr-p-tracking
removed: rls-mgr-o-tracking
Steve Langasek (vorlon)
tags: added: rls-p-tracking
Revision history for this message
Dirk Räder (db6edr) wrote :

This bug also applies to a Samsung NC10 Plus netbook with latest Kubuntu Oneiric Ocelot x64.

I don't have any logfiles available nor have I verified whether the machine boots with any unencrypted installation of Kubuntu.

Steve Langasek (vorlon)
Changed in grub2 (Ubuntu Precise):
milestone: none → ubuntu-12.04
assignee: nobody → Canonical Foundations Team (canonical-foundations)
summary: - Cannot boot grub after installing to LVM
+ Cannot boot GRUB after installing to LVM
Revision history for this message
Dirk Räder (db6edr) wrote :

Tested in a VirtualBox environment with Precise's daily from 2012-07-16. The issue is still there.

Host:
Windows 7 Enterprise Service Pack 1 x64
Intel Core2 Quad Q6600 @ 2.40 GHz
8 GB RAM

VM:
2 CPUs; 2048 MB RAM
IO-APIC enabled; Hardware clock in UTC
VT-x / AMD-V active; nested paging active

Revision history for this message
Nyan Cat (nyancat) wrote :

can you reproduce it with GRUB2 EFI on Mac?
(I don't recommend using "+mac" iso's, use normals)
Format pendrive to FAT32 -> copy all files from the iso there(remember the hidden .disk folder) -> hold ALT and select your pendrive on list, thats it, you can install with native EFI boot ;)

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

Can anyone reproduce the originally reported issue with the 12.04 beta? The developers have never been able to reproduce this; but there have been improvements in the partition table handling in 12.04 that may have fixed the bug along the way.

summary: - Cannot boot GRUB after installing to LVM
+ Cannot boot GRUB on Intel Mac after installing to LVM
tags: removed: rls-p-tracking
Revision history for this message
Walt Corey (waltc) wrote : Re: [Bug 745960] Re: Cannot boot GRUB on Intel Mac after installing to LVM

I believe there were several bugs open for essentially the same thing.
In my case if the partition was from a firmware RAID, grub wouldn't be
installed. I viewed this as a regression as originally, perhaps in the
7. time frame it didn't work with firmware raid unless one used the
alternate install, even for desktop. I believe in the 8. or certainly
the 9. time frame it would with the standard install, until 11.10 where
it once again broke.

Walt

On 04/11/2012 10:49 AM, Steve Langasek wrote:
> Can anyone reproduce the originally reported issue with the 12.04 beta?
> The developers have never been able to reproduce this; but there have
> been improvements in the partition table handling in 12.04 that may have
> fixed the bug along the way.
>
> ** Summary changed:
>
> - Cannot boot GRUB after installing to LVM
> + Cannot boot GRUB on Intel Mac after installing to LVM
>
> ** Tags removed: rls-p-tracking
>

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

Walt, we understand that people were seeing this in 11.10 (although none
of the developers could ever reproduce this). Steve was asking if you
could reproduce this in the 12.04 beta, though, and that would still be
useful information.

Revision history for this message
Dirk Räder (db6edr) wrote :

Hi,

I've just completed the installation of the 20120417 ISO image inside an x64 Virtual Box. The host system is Windows 7 x64 Enterprise.

As far as I can tell, querying the password for encrypted LVM and handing control over to GRUB worked fine. Post installation tests also completed successfully.

Regards, Dirk

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

This bug is marked incomplete because it's suspected resolved and we're waiting for feedback. That doesn't seem like something to be documented in the release notes.

Changed in ubuntu-release-notes:
status: New → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote :

Based on Dirk's feedback, I'm going to mark this fixed for precise. If anyone is still seeing this problem in 12.04, please reopen.

Changed in grub2 (Ubuntu Precise):
status: Incomplete → Fix Released
Revision history for this message
Chad A Davis (chadadavis) wrote :

My original report was on a Mac. I was able to reproduce the issue consistently at that time. I was never able to reproduce the issue on a x86 VM. I don't believe a test on an x86 VM answers the question here. I would leave this incomplete until someone has time to test this on real hardware, preferably some type of hardware that previously had the problem, or at least something that uses GPT.

Revision history for this message
Dirk Räder (db6edr) wrote :

Hi Chad,

this issue has been reported on several machines ranging from Mac thru
x86/x64 VMs to x86/x64 physical machines. I experienced it on a
Samsung netbook and different VMs Virtual Box on two different hosts.
On both hosts inside the VMs, this issue doesn't occur any more.
Regarding the netbook - I simply don't have a disc image to restore
its current state, else I would already have tested it.

Could you take the time and verify the bug is fixed on your Mac, then? Thanks!

2012/4/19 Chad A. Davis <email address hidden>:
> My original report was on a Mac. I was able to reproduce the issue
> consistently at that time. I was never able to reproduce the issue on a
> x86 VM. I don't believe a test on an x86 VM answers the question here. I
> would leave this incomplete until someone has time to test this on real
> hardware, preferably some type of hardware that previously had the
> problem, or at least something that uses GPT.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/745960
>
> Title:
>  Cannot boot GRUB on Intel Mac after installing to LVM
>
> Status in Release Notes for Ubuntu:
>  Invalid
> Status in Release Notes for Ubuntu oneiric series:
>  New
> Status in Release Notes for Ubuntu precise series:
>  Invalid
> Status in “grub2” package in Ubuntu:
>  Fix Released
> Status in “grub2” source package in Natty:
>  Incomplete
> Status in “grub2” source package in Oneiric:
>  Incomplete
> Status in “grub2” source package in Precise:
>  Fix Released
>
> Bug description:
>  Binary package hint: debian-installer
>
>  TEST CASE:
>  http://testcases.qa.ubuntu.com/Install/AlternateEncryptedLvm
>
>  I'm using kubuntu-alternate-amd64+mac.iso from 2011-03-29.1 on a
>  MacBookPro6.2
>
>  The installation runs as expected. No errors are reported. After
>  rebooting, grub does not load. It's not that grub does not load linux,
>  but rather that the hardware never passes control to the grub menu. It
>  stays at the grey mac boot screen, as if there were no operating
>  systems. Holding 'Alt' during boot, which is the standard way to boot
>  when only Linux is installed on the Mac, offers no partition to boot.
>
>  Installing the same system in the same manner without an encrypted LVM
>  works fine. I did not test installing an unencrypted LVM.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu-release-notes/+bug/745960/+subscriptions

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

Of course, given that we never actually understood this bug at the code
level, there's no particularly clear evidence that the non-Mac reports
in this bug log actually had anything to do with the original report
aside from having a similar symptom. :-)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I verified the fix on a Mac Mini with Ubuntu Precise Alternate amd64+mac 20120419 and confirm that it is fixed in Precise. The system boots as expected after installation with encrypted LVM.

Revision history for this message
Chad A Davis (chadadavis) wrote :

I also verified the fix on a MacBookPro (8,1) with precise-alternate-amd64+mac.iso from 2012-04-21 using an encrypted LVM.

Revision history for this message
Vishvas Chitale (vishvas-chitale) wrote :

Grub2 cannot install boot on VM version 4

Revision history for this message
Dirk Räder (db6edr) wrote :

@vishvas-chitale:
Some more information would be helpful:
- what is "VM version 4"? Please specify the exact product you are hosting your virtual machine in.
- what do you mean with "cannot install boot"? Please copy the error message, if there's any.

Thanks!

Revision history for this message
dino99 (9d9) wrote :
Changed in grub2 (Ubuntu Oneiric):
status: Incomplete → Invalid
Changed in grub2 (Ubuntu Natty):
status: Incomplete → Invalid
Revision history for this message
Hawkwing (androlgenhald) wrote :

Having this issue now with 13.04 server install. I couldn't get the desktop install to set up an encrypted lvm how I wanted so I thought I'd do the server and install ubuntu-desktop. I have a 2tb hard disk with a 200mb /boot ext4 partition and a 2tb physical volume for encryption. There's a 2tb volume group with a 2tb logic volume on top of the encrypted partition as ext4 at /. When the install finished and it restarted the bios couldn't find a boot device.

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.