Sunday, 24 June 2012

Working Mint 13 (based on Unubtu 12.04) on 15" MacBook Pro 9,1 (non-retina TM)

So far, I have succeeded - except I need to hold 'option' to get Mint to boot.

I was trying to get Ubuntu 12.04 installed, but Mint 13 had a better live DVD 'compatibility mode' that allowed linux to boot and run with a GUI.

Just to be clear: I have a 15" MacBoook Pro 9,1. This is a non-retina (TM) MacBook Pro.

According to wikipedia,

  • 15" version is 9,1 and has an Nvidia display
  • 13" version is 9,2 but does not have an Nvidia display
  • 15" retina (TM) version is 10,1 and seems similar in specification to 9,1


This is what I have tried:

ISO-2-USB EFI

1. Downloaded Ubuntu 12.04 desktop AMD64 mac iso

2. Downloaded a magical ISO-2-USB EFI-Booter for Mac 0.01 beta from

Followed instructions on this page:

This is my version:


  1. Format a USB drive with a MBR and FAT32 partition. Elsewhere some suggest a GUID instead of MBR. I used MBR. On linux Disk Utility, FAT32 is FAT.
  2. Make a /efi/boot directory tree on USB drive.
  3. Copy bootX64.efi from “ISO-2-USB EFI-Booter for Mac 0.01 beta” to /efi/boot
  4. Copy Ubuntu iso to /efi/boot/
  5. Rename iso to boot.iso. Check that you have 2 files in /efi/boot
  6. Reboot your Mac, hold down 'alt' key. Eventually you will see your Macs Normal OS, a Recovery, and EFI Boot.
  7. Select EFI Boot and the boot.iso will load.

For me, this works but it gets no further than a loading linux and a ramdisk.

rEFInd

I installed rEFInd (which works fine).
This will help me test various boot methods.
I installed rEFInd in my Mac's esp partition, and copied iso and ext2 drivers so rEFInd can look for EFI programs on CD/DVDs and EXT2 partitions.

rEFInd did not install first time.  I would try this file first, follow the OS-X instructions but instead of ./install.sh I recommend sudo ./install.sh

Boot Ubuntu CD

First Attempt
  1. I burnt a Ubuntu iso (see above) to CD
  2. Rebooted my Mac and inserted CD
  3. rEFInd started and listed bootable OSs. If CD image is not shown, hit ESC key to let rEFInd look again.
  4. Selected live
No good: just got a blank screen with a flashing cursor

Second Attempt
  1. Rebooted my Mac and inserted CD
  2. When I got to the 3 GRUB options, I selected live but modified the command to add these linux kernel boot options (before --): nomodeset nointremap vga=0x361. These hints came from this discussion
  3. Press Fn+F10 to run modified command
I get the Ubuntu splash screen, but it fails to boot with a vesafb error. 
It drops to a shell so linux is running but it seems it can not initialise graphics correctly.


Third Attempt
  1. Rebooted my Mac and inserted CD
  2. When I got to the 3 GRUB options, I selected install this time but modified the command to add these linux kernel boot options: nomodeset nointremap vga=0x361.
  3. Press Fn+F10 to run modified command
I get the Ubuntu splash screen, and the install process ran and completed.
I had to force power off.
On reboot, rEFInd did not run, but Grub did, however Ubuntu would not start - just a blank screen.
I re-blessed rEFInd and it now starts.

Getting closer...

Info

I think these are true - but that does not mean they are true:
  1. If you do not use nomodeset, you will not see anything on screen and linux will not boot. To fix, boot into OS-X (to reset video mode?) and then try linux again.
  2. Ubuntu and Mint installers/live DVDs seem to work by magic. Mint has these linux kernel options as found in /proc/cmdline

    file=/cdrom/preseed/mint.seed boot=casper xforcevesa nomodeset b43.blacklist=yes initrd=/casper/initrd.lz ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll -- BOOT_IMAGE=/casper/vmlinuz

    I think these ones in bold are key, so I will try them now...


Fourth Attempt
  1. Rebooted my Mac and inserted Mint DVD 13
  2. Mint in 'compatibility mode' works
  3. I installed Mint but it complained about not being able to install grub (I suspect) since Mint uses grub-pc for machines with a BIOS. I ignored this message and continued.
  4. After install, refind did not find Mint - not totally unexpected.
  5. Holding 'option' key down while turning my MacBook Pro on, I found that Apple's boot manager did detect a new OS. It labelled it 'Windows'.
  6. I let it boot 'Windows' and (from memory) I got a console screen - no GUI.
  7. I updated grub to include xforcevesa noapic noapci irqpoll options, ran update-grub and restarted.
  8. Success! Now Mint starts fine. Screen brightness is at max.
Now... what works and what does not work...

What works for me

  • Brightness keys (Brightness resumes at max setting after boot)
  • Volume keys
  • Track-pad
  • WiFi
  • Front Right speaker
  • Camera (using VLC)
  • Detects power
  • Mute Key
  • Play/Pause Key
  • Rewind Key
  • Eject Key
  • Nvidia (using nouveau)
  • Shutdown
  • Colours appear more vivid than my MacBook Pro4,1 (which look washed-out in comparison)
  • Forward Key

What does not work

  • Fan!!! (runs hot, but fan does come on, just not soon enough)
  • Keyboard backlight keys - they bring up OSD but nothing changes
  • Front Left is silent (or is same as Front right)
  • Bluetooth (so far)


What I can't test


  • Firewire - module loaded but where is port?

Now to try a few experimental things


  • Kernel 3.5
  • Nvidia 304 (wasn't actually in used)
  • MacTel macfanctld
Results
  • Front Left speaker now works
  • Close lid to sleep (I forgot to test this with 3.2 kernel)
  • Does not wake when lid opened (although white pulsing light goes out when lid is lifted) - had to force power off

Drop Nvidia 304

Results

  • No change since Nvidia was not being used.


Try Linux Kernel 3.6

I used 3.6 RC3 and64 debs from here: 
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.6-rc3-quantal/
Install 4.

Results

  • First think I noticed was that my fans turned on!
  • Brightness Keys no longer change brightness
  • Keyboard back-light keys work!


This is looking more positive.