Triple EFI boot OSX Lion, Windows 8 RP, Scientific Linux 6.3 Mac Book Pro Retina 15"
Hey there,
I'm playing with the Mac Book Pro Retina at the moment, and enjoy a nice triple boot Windows 8, OSX Lion and Scientific Linux 6.3 with a custom kernel based on the kernel-ml 3.5.2 from elrepo. Everything boots in native EFI, no grub/elilo in the way, with rEFInd boot manager. I'm writing this post to share my experience with you, as I greatly benefited from this thread and others' own experience during my install. At the end of this post, you'll find something I'm trying to fix, so don't hesitate to answer
Windows 8
No hack needed for the Windows 8 Release Preview (i.e. no need to slipstream drivers from bootcamp), just start the Windows EFI installer from the rEFInd (previously installed from Mac OS X) boot manager.
However, I had to boot a liveCD (
System Rescue CD, Gentoo based

) to remove the partitions created by bootcamp during my first tries (impossible to remove them from DiskUtility under Mac OS X for whatever reasons). After having removed every partition except the Mac OS X ones and the EFI one, I could extend the Mac OS X to span accross the whole disk, then resize it with only 100Go and the rest as non-partitioned space, all done in DiskUtility from Mac OS X. After these steps, the Windows 8 installer finally kicks in and installs the Windows 8 without a hitch. If you wanna know more about hybrid partitions, this is a
good address, which I think has already been shared by the author on this thread.
[Update 29/08] NVidia card
works without poking any PCI register with latest Nvidia beta drivers 306.02 for Windows 8 64 bit
To note though, Windows 8 does not see my Nvidia card (and using the Beta drivers from Nvidia for Windows 8 x64 does not help), and was not recognizing a lot of peripherals like the Wifi card. After manually installing the drivers distributed with bootcam, I still have issues with the Audio card, the Nvidia card, brightness levels, "special" keys on the keyboard, and keyboard backlight. After installing the Intel drivers for the Intel chipset (distributed with bootcamp), Windows does not detect my external USB 3.0 SSD anymore (no worries with USB sticks though!).
[Update 29/08] Found this
nice post on another board, supposed to make the trackpad and brightness work, I'll try this tomorrow.
Something important is to de-activate the Windows 8 fast boot if you're planing to boot Windows from rEFInd, otherwise Windows will refuse to boot and will start a Recovery of the system (which solves the issue at the cost of "unblessing" the rEFInd boot manager, just re-install it in Mac OS X if this happens to you to solve the issue).
Scientific Linux 6.3
For the Scientific Linux 6.3, I only miss the keyboard backlighting and brightness levels.
[EDIT]: I forgot to say that before running the liveDVD install, I've booted the System Rescue CD to modify the partition table (resize the windows so it does not take the whole place, create a few partitions for Linux like /, /home, swap and 2 NTFS partitions that I'll be using as temporary exchange partition and a Data partition for the Windows 8). You can use gparted from the liveCD to do so in a graphical environment.
For the installation from the liveDVD Scientific Linux, you'll need the option
noapic. When the install is finished, impossible to boot it so I have, here again, used the liveCD System Rescue CD to chroot in the SL6.3 rootfs. From the chroot, you can add the
elrepo repo to yum then install kernel-ml (3.5.2 as of writing this post), then copy the vmlinux and initrd from /boot to the EFI partition, and finally add a refind_linux.conf file containing the kernel comand line (for details on refind_linux.conf, see
this link from the official rEFInd website) that you can copy from the grub configuration file. You'll also need to add the options
rdblacklist=nouveau and
noapic to boot the kernel without a panic (in console to start with).
At this stage, it is important to modify the
inittab to boot in runlevel 3, until we've installed the Nvidia drivers. After this step, it should be possible to boot the SL6.3 in EFI with a 2880x1800 framebuffer
The Wifi drivers are working at this stage, but are missing the firmware for the Broadcom chipset. I've extracted it with
fwcut (howto
here) and you can download them directly from
this link. You then just need to untar them in
/lib/firmware/ and reboot. You Wifi card is now fully working. You can now download the latest Nvidia drivers from the Nvidia website (304.37 as of today). Once those are installed, you'll need this line:
Option "UseDPLib" "off"
in your
xorg.conf in the 'Section "Screen"' block. You can now modify your inittab to boot in runlevel 5. X should start without any issue with full graphic acceleration on the 650M
For the bluetooth, I've modified the kernel-ml SRPM spec file from elrepo to include
this patch. It seems the applesmc driver for the sensors is not compatible with this Mac Book Pro version yet. A workaround is to apply
this other patch. It does not fix the driver but prevents it from taking too much time at the kernel boot.
After reboting on your custom kernel, no major issue except screen brightness and keyboard backlighting. I'll try to fix those later on. See
this thread for details specific to Linux on the Retina (can also be useful to backport things from Linux support in Windows 7/8 I guess, like this PCI poking madness).
[EDIT] Forgot to say that at each update of your kernel, the Nvidia installer will need to be re-run, and you'll need to copy again your vmlinuz/initrd file to your EFI partition.
Nvidia Card Windows 8
[Update 29/08] NVidia card
works without poking any PCI register with latest Nvidia beta drivers 306.02 for Windows 8 64 bit

I leave this paragraph as the method using lspci and the memory ranges of the PCI device can help figuring it out the address of the proper PCI Bridge for MBP non-retina.
I've tried to understand the instructions in the post
459 but the pictures are not available anymore and it then becomes very hard to understand them (especially to find the address of the PCI bridge to which the Nvidia card is attached). If anyone has managed this step, that'd be nice to share the manoevre
From what I understand, we first need to find the address of the Nvidia card (00 01 00 00 on my Mac Book Pro Retina 15") by typing the command
lspci -i -b in an EFI shell (you can use the Grub EFI shell given in post
459 to install it on your EFI partition).
Once we've identified this address, we need to know the PCI Bridge to which it is attached. If I understand correctly on the instructions, we need to re-run the command
pci -i -b on every PCI Bridge we see. It seems to me there is an error here as
pci -i -b does not accept any argument. We can however use the -s argument to do so:
pci -i -b -s address (e.g.
pci -i -b -s 00 00 01 00), which will return loads of information about the PCI Bridge, but nothing I could link to the VGA card.
[Update 28/08] As
mark1234 kindly explained, the proper command to use on the PCI Bridge is
pci -i XX XX XX -b and not
pci -i -b -s XX XX XX XX.
I then thought that I could use the command
lspci -v from the SL6.3 and see if I could find more information.
To do so, you first need to look for a line containing something like "VGA compatible controller" from the NVidia card (i.e. not the Intel!) and to take note of the addresses used by the card. Something like this on my MBPr:
01:00.0 VGA compatible controller: NVIDIA Corporation Device 0fd5 (rev a1) (prog-if 00 [VGA controller)
Memory at c0000000 (32-bit, non-prefetchable) [size 16M]
Memory at 90000000 (64-bit, prefetchable) [size=256M]
Memory at a0000000 (64-bit, prefetchable) [size=32M]
When we've got those addresses (in bold/black), we need to find the bridge which gives access to this memory with the command:
lspci -v | grep -i bridge
and look for the Bridge that contains the lines:
00:01.0 PCI bridge: Intel Corporation 3rd Gen Core processor PCI Express Root Port (rev 09) (prog-if 0 [Normal decode])
Memory behind bridge: c0000000-c10fffff
Prefetchable memory behind bridge: 0000000090000000-00000000a1ffffff
Of course, you'll adapt those addresses with those from your card. The bridge covering the addresses used by the NVidia card (in bold/black) must be the one we need to enable with the EFI command
mm in a EFI script (EFI Shell reference
here, the mm command is described page 92).
In bold/green are the respective address of the Nvidia card and the PCI Bridge (01:00.0 = 01 00 00 for the Nvidia card, and 00:01.0 = 00 01 00 for the PCI Bridge). So finally, with the two next EFI commands, I should be able to see the Nvidia card on Windows 8:
mm 0001003E 8 -PCI
mm 01000004 7 -PCI
Unfortunately, after trying those two commands on my EFI Shell and then booting Windows 8 does not help, and I still can't see the Nvidia card (neither the beta drivers from Nvidia). So if someone could tell me what's wrong in what I'm doing, that'd be great. In the meantime, I will verify that the register address 3E and 04 are correct, so as the values 8 and 7 as I haven't had the chance yet to look at the PCI spec.
One last note, I see on the
lspci -v output on my SL6.3 that the mode fast-devsel is enabled, maybe something to add with the
mm commands.
Any help would be greatly appreciated. Also if you know a way to make the Audio card work, don't hesitate to share, even if instructions are messy, I'll happily add another detailed post on how to do it once I get it working.
Windows 7 easier trick ?
I just wanted to share something that I haven't tried until the end, but that may work to install Windows 7 without having to slipstream the installer from Windows 8, so it might be worth trying. On my try with booting Windows 7 in EFI mode on the Retina MBP, it would crash when loading the driver for the SSD at the stage "Windows is loading files". If you have a Linux already installed on your Retina, you can install VMWare Workstation 9.0 and create a VM that gives full access to your SSD (/dev/sda) to your guest. Booting Windows 7 in EFI in this VM does not show the issue, and the installer is happy to kick in

I haven't tried finishing the install of the Windows 7 after this step as my iso for Windows 8 had just finished donwloading...
To boot your guest in EFI mode, you'll need to edit the VMWare vmx file and add:
firmware = "efi"
The procedure to add a raw scsi disk to VMware is I believed well documented on the web so I'll skip this. When you start your VM, rEFInd should show up and let you chose the EFI installer from the Windows 7 installation DVD. Please let me if you tried until the end

If you try this, the partition table needs to be full GPT, exactly like an install on the host directly.
Cheers,
Quentin Casasnovas