Wednesday, April 2, 2014

Tripple boot mac, yet another web page on it.....

At work, they have given me a hand-me-down three year old mac with a broken screen to use as my laptop.  Making the best of things, I wanted to tripple boot it with OSX mavericks, Windows 8.1, and Kali Linux.

I won't get into great detail about the steps I took, as you can find a bazillion other sites to explain most of the process.  I could not find a solution to a few spots, so I will elaborate on those.

1)Installed mavericks, install REFIND  (the newer version of reFIT)
3)Open disk utility, and delete the bootcamp partition, create two MORE partitions.  Format them in exFAT, call them BOOTCAMP and "whatever you want your Linux partition to be called for now."
 4) reboot, booting into windows using a DVD  (I know... but I couldn't get the USB to boot properly)
5) in windows, select the bootcamp partition.  it will say "cannot install here" or some such thing.  FORMAT that partition, then windows will be ok with it and will install.
6) update windows, if you want, or don't.... whatever.
7) after a reboot, make sure OSX still works.  (if REFIND doesnt pop up, you can hold down "option" at the "mac tone" and force it to boot to something other than windows.  Reinstall REFIND to make it work again.)
8) boot the machine again to kali.
9)If you miss the grub menu, it might fail... it did on me.
10) so reboot it again, this time, select "text install"
11) at the point where you want to select the HDD or storage, make sure to do it "manually"
12) find the partition you created for LINUX, and remove it. 
13) then create a partition that is "do not use" at the "beginning of the free space" of 1MB
14) create two more partitions, one that is EXT3 or whatever you like, mount it as "/".  the second one needs to be for SWAP.
15) Finish installing it.
16)  if it boots, you are good, skip to the later point if you windows drive will not boot.
17) when it doesn't boot (mine said "waiting for /dev to populate" forever), catch the grub menu, and do the failsafe option.  If it does still not boot, add "nouveau.modeset=0" at the end of the line that says "ro quiet" .
18) connect it to the Internets, then perform an apt-get update, and upgrade, and dist-upgrade.  This may solve part of your issue.  if not.....
19) install the nvidia drivers:
"apt-get install -y linux-headers-$(uname -r)
apt-get install nvidia-kernel-dkms"
My install took care of uninstalling the "generic" drivers, as listed on other web help pages.
20)  Now that you have a kali install that works, let's boot into windows.
21) if you are staring at an error or a blinking cursor like I was, the boot partion/UFEI is all messed up.
22) Boot to OSX
23) install gdisk (gpt-disk)
24) run sudo gdisk /dev/diskx....   I only had one drive, so it was sudo gdisk /dev/disk0
25) type "b" to back up the partition table
26) now hit "r" and "p".  take note of the partition numbers of the three installs.
27) Enter ‘h’ to recreate your hybrid MBR. Enter each partition number you want (mine were 2 4 6). It will then ask you for a bunch of settings:
Place an EFI partition first: yes/y; For each partition, make bootable: no; For each partition, hex values: AF for OS X, 07 for Windows, 83 for Linux.
28) type "w" to write it.
29) reboot once, just to be sure, go back to OSX
30) if REFIND didn't appear, reinstall that too.
31) enjoy your mac, even though it only runs OSX 30% of the time.

"Your mileage may vary, I only wrote this to remind myself how I did it, so if you read it and do something stupid to your own box I take no responsibility.  This is a private note to myself that I have published publicly."