#208 rEFIt not working with LION and Filevault 2

EFI Tools (14)


i would like to install Gentoo on my Macbook Air 2010 with Lion as the main OS and using FileVault with the complete MAC-drive crypted.
How can i get this working? I read about Problems with rEFIt and FileVault
Can anyone tell me some informations about this? What is the best way?
If i install rEFIt without FileVault i can boot the Gentoo. But if i try FileVault it just starts only LION. No Bootscreen nothing.
I read something like this: http://www.insanelymac.com/forum/index.php?showtopic=264528

Thanks a lot for some infos.

Cu kami83


  • Joe van Tunen
    Joe van Tunen

    To install rEFIt:
    1) Install refit to the efi partition (use mount_msdos to mount the EFI partition).
    2) Use the bless command to bless refit.
    3) Modify /Library/StartupItems/rEFItBlesser's StopService () function so that it mounts and unmounts the EFI partition before it looks for refit. Read the rEFIt documentation about rEFItBlesser to see what it's good for.

    To fix up the MBR to allow booting of Linux:
    1) use gpt fdisk (on sourceforge) or iPartition to sync the MBR and GPT - just add only the Linux partition to the MBR because the Mac OS X partition is encrypted and won't be readable by Windows.
    2) Make sure the Linux partition is flagged as the startup partition in the MBR.

    To boot Mac OS X:
    1) press the option key at startup to bypass rEFIt

    To boot Linux:
    1) use rEFIt or press the option key at startup and select "Windows"

    To allow rEFIt to boot Mac OS X:
    1) Use the bless command to figure out how the Recorery HD is used to boot the encrypted Mac OS X partition
    2) Modify the rEFIt source code with the information
    3) recompile rEFIt on Windows (maybe doable with Visual Studio 2010 Express), then replace refit.efi with the new build.

    rEFItBlesser's StopService () function should look something like this (just replace "YourLionOSXDisk" with the name of your OS X partition) (this is untested):

    StopService ()
    if MacOSXBlessed ; then
    diskutiloutput="`diskutil list`"
    DEVICE=`echo "$diskutiloutput" | sed -n -E "/^.* YourLionOSXDisk .* (disk[0-9]*)s[0-9]*$/s//\1/p"`
    SLICE=`echo "$diskutiloutput" | sed -n -E "/^.* EFI .* ("$DEVICE"s[0-9]*)$/s//\1/p"`
    mkdir $MOUNTPOINT
    mount_msdos /dev/$SLICE $MOUNTPOINT
    if [ -f "$MOUNTPOINT/efi/refit/refit.efi" ]; then
    echo "rEFItBlesser blessing rEFIt on Shutdown"
    bless --mount "$MOUNTPOINT" --file "$MOUNTPOINT/efi/refit/refit.efi" --setBoot
    umount $MOUNTPOINT
    return 0

  • kami


    thanks a lot. Now on the boot device. It works really fine. Thanks a lot.

    Cu kami