Menu

#84 rEFIt Hangs on 2011 MacBook Pro (version 8.2?) & Lion

open
nobody
None
5
2011-08-16
2011-08-16
dave m
No

I got a new MBP, which came with Lion pre-installed. I've tried various things to get triple-booting going (OSX, Win7, Linux) but no luck so far. The stock boot selector (accessed via Option key on startup) recognizes multiple OSX partitions and a Windows partition, but not any Linux partitions. Windows, run in native mode, reports that the hardware version is 8.2.

During my set-up flailing, I installed rEFIt several times, but after each install, it would break whatever config I had working before then. IIRC, it was an every-other-boot breakage: I'd have to power down to recover from an unresponsive system, then the next Option-key boot would work, then the next boot would hang again. Perhaps this has something to do with the Blessing process?

Any advice on getting rEFIt to work, or on making the stock Option-key boot selector recognize the bootability of Linux GUID partitions?

Thanks!

Discussion

  • dave m

    dave m - 2011-08-19

    As I recall, the machine just hung at the gray screen (boot sound, then nothing). I suppose it's possible I got the gray "NO" (circle + slash) indicator; I don't remember. I saw it at some point, but I was trying all kinds of things. I never saw anything that looked like a rEFIt menu.

    I don't think the current Mac boot code relies on the boot flag in the hybrid MBR to identify bootable partitions (and I have no idea what it's looking at to identify bootable GPT partitions!)

    My current partition setup is:

    s1: protective (?)
    s2: MacOS-1
    s3: Lion Recovery Partition (automatically generated during install of MacOS-1)
    s4: MacOS-2
    s5: Lion Recovery Partition (automatically generated during install of MacOS-2)
    s6: Mac Data
    s7: Linux data
    s8: Linux swap
    s9: Linux root (system)
    s10: Win7 system
    s11: Win data

    I installed the first MacOS, then Linux and Windows, then the second MacOS (which somehow broke the MBR or GPT so I couldn't boot Windows any more). I used Rod Smith's GPT fdisk to recreate the hybrid MBR and Windows became available to boot again, so there's clearly something useful going on there. However, in the hybrid MBR, I have Linux root, Win7 system and Win7 data as the 3 partitions after 0xee, but I can only boot Win7. Even if I set the bootable flag on the Linux root partition in the MBR, it doesn't show up in the stock bootloader menu.

    However, reading your message more carefully, maybe if I set the bootable flag on the Linux root partition in the hybrid MBR, I'll be able to boot it (i.e., maybe the Startup Manager is _saying_ Windows, but maybe it doesn't really know or care.) I'll try that next.

    However, given that the Startup Manager can identify two MacOS partitions and two Recovery partitions as bootable, there must be some way to flag them. I only need one of the Recovery images (they're little 650MB partitions) so if I could figure out how to mark it properly, it'd be great to put Linux /boot in one of them and boot Linux that way.

    Do you know of any docs about how the Startup Manager works on GPT partitions?

    Thanks!

     
  • joevt

    joevt - 2011-08-19

    The Startup Manager looks for certain EFI files (e.g. boot.efi) in certain locations (e.g. /System/Library/CoreServices) on certain file systems (e.g. HFS+). It will list all of these locations. If you select one of them to boot, it will boot it using EFI. EFI booting cares nothing about the MBR when the disk contains a GPT.

    The Startup Manager will show a single (one) Windows option for every hard disk that has an MBR with valid partitions no matter how many partitions are on the hard disk or what OS is on those partitions. If you select the Windows option, It will load BIOS from EFI to boot the MBR on that hard disk. The MBR will then boot the VBR of the partition selected as the boot partition in the MBR. When the Startup Manager says "Windows", just think of it as "BIOS" or "MBR".

    rEFIt does the same as the above but looks for more types of EFI files in other locations (for other OS's, the EFI Shell, or whatever). lists all MBR partitions, and it will set the boot partition in the MBR if you select an MBR partition to boot.

    The only way you can get Linux to show up in the Startup Manager is to have it boot using EFI instead of BIOS. Some Linux OS's support EFI booting but there may be compatibility issues with video or whatever or with the Mac's EFI. Plus, the linux efi files would need to be in a location that Startup Manager would understand which probably will not be the case and you'll still need rEFIt to boot it for you. I haven't done any research on this or know the current state of support. You would be better off getting Linux to boot with BIOS.
    http://www.rodsbooks.com/ubuntu-efi/index.html

    Is your Linux root partition a boot partition only or does it have a file system on it with other files? Is grub2 installed to it?

    Run the script at http://members.shaw.ca/joevt/dumpvols.sh.zip to list all your partition info. It will also help identify which partitions have BIOS boot code (grub or Windows).

    Also, try selecting the Windows partition in Startup Disk preferences panel, then leave the preference panel (click Show All) so it saves the change to NVRAM, then dump the nvram using the following command:
    ioreg -w 0 -n AppleEFINVRAM | sed -n -E "/^[ \|]+[ ]+(\".*)$/s//\1/p;"

    The efi-boot-device-data will identify if rEFIt can boot BIOS on your Mac. This might not help at all if you can't even see the rEFIt menu. Try setting textonly in the refit.conf file and see if that changes anything.

    If rEFIt won't work then you'll need to configure the Windows boot manager to boot Linux (using EasyBCD) or configure grub2 to boot Windows.

     
  • Anonymous

    Anonymous - 2012-04-01

    The issue many people have experienced with rEFIt not working properly under Lion can be fixed by running the rEFIt installer, deleting the "rEFItBlesser" in /library/Startup Items/, then going to /efi/refit and running ./enable.sh. There's something wrong where the automatic blesser doesn't work but the enable.sh does.

     

    Last edit: Anonymous 2015-04-04
  • joevt

    joevt - 2012-05-07

    Removing rEFIt works because it stops rEFItBlesser from blessing Mac OS X when it starts up. The real problem though, is that for some people, it is unable to bless rEFIt when Mac OS X is shutdown. This can happen if rEFIt is on a removable partition and the OS unmounts it before calling rEFItBlesser's StopService.

    I've created a version of rEFItBlesser ( http://members.shaw.ca/joevt/rEFItBlesser ) that can mount the volume containing rEFIt if it can't be found. You need to modify the script so that it has the path to rEFIt (MOUNTPOINT), the disk slice of the partition containing rEFIt (must be on the same hard drive containing the root file system / ) (MOUNTSLICE), and the mount command used to mount the partition (mount_hfs for HFS+ and mount_msdos for FAT) (MOUNTCOMMAND). I also added some extra logging that logs output to a file at /Users/Shared/rEFItBlesser.log because the system log file is not available at shutdown. You can add more logging to find why it's not working at shut down.

    rEFItBlesser is located at /Library/StartupItems/rEFItBlesser/rEFItBlesser. You need to make sure it contains permissions like this:
    ls -la /Library/StartupItems/rEFItBlesser/
    drwxr-xr-x 4 root wheel 136 May 7 10:55 .
    drwxr-xr-x 4 root wheel 136 May 7 10:55 ..
    -rw-r--r-- 1 root wheel 72 May 4 19:17 StartupParameters.plist
    -rwxr-xr-x@ 1 root wheel 2041 May 7 10:55 rEFItBlesser

    Use the following command to change the owner:
    sudo chown root:wheel rEFItBlesser

     

Log in to post a comment.