That Kali Linux 1.0.8 or later supports EFI makes it much easier to install Kali Linux on Macbook Pro, Air or iMac.
- At least available 10Gb for installing Kali Linux.
- A mac with minimum 1Gb of Ram.
- At for Macs before 2012, we better use CD/DVD because USB booting may not work before installing rEFInd.
- At for 2012 Macs or later, just need an USB (4GB at least)
- OS X 10.7 - 10.11
- Download Kali linux: http://docs.kali.org/introduction/download-official-kali-linux-images
- Extract the Kali Linux.ISO into bootable USB or DVD.
Install rEFInd into OS X
At this time, the newest version rEFInd is 0.8.7.
- Open Terminal to download and install rEFInd in OS X.
curl -s -L http://sourceforge.net/projects/refind/files/0.8.7/refind-bin-0.8.7.zip -o refind.zip
- After downloading rEFInd, extract and run shell script to install with sudo.
osx:~ mbp$ [B]unzip -q refind.zip[/B]
osx:~ mbp$ [B]cd refind-bin-*[/B]/
osx:refind-bin-0.8.3 mbp$ [B]sudo bash install.sh[/B]
[I]WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type “man sudo” for more information.[/I]
[I]To proceed, enter your password, or type Ctrl-C to abort.[/I]
[B]Password: ( Enter password then hit Enter to install. Be noticed that the password is not visible during typing)[/B]
[I]Installing rEFInd on OS X…
Installing rEFInd to the partition mounted at //
Copied rEFInd binary files
Copying sample configuration file as refind.conf; edit this file to configure
[I]WARNING: If you have an Advanced Format disk, DO NOT attempt to check the
bless status with ‘bless --info’, since this is known to cause disk corruption
on some systems!![/I]
[I]Installation has completed successfully[/I].
I, Prepare the partition to install Kali Linux
Reboot your Mac, hold Option to access rEFInd boot option.
And then we should see the 2 following volumes:
EFI – EFI\BOOT\syslinux.efi from 61 MiB FAT volume
Windows – Legacy OS from FAT volume
II, Installing Process
Step 1: Choose the Kali Linux boot logo which looks like a windows os
Be noticed that:
- If you insert the DVD yet, the DVD does not appear. Just hit the ESC the reload the boot menu.
- If you see only EFI, your Mac must be too old to be supported. Try to install the latest rEFInd.
- If after choosing EFI, the process gets stuck, just force restart by holding the power button to start again this step.
Step 2: From the Kali OS boot screen, choose Live.
Step 3: Use GParted to generate a partition to install Kali base on OSX (HFS+) Partition: Applications -> System Tools -> GParted Partition Editor to run GParted.
Step 4: From GParted, choose Macintosh. Depends on your HDDs, the position of Macintoshses are different. Like the following image, we have EFI (/dev/sda1), OS X (/dev/sda2), và System Recovery (/dev/sda3). Right mouse on Macintosh, choose Resize/Move. Make it at least 10Gb for installing.
III, Start Installing Kali Linux
Step 5: Just re-do the Step 1 and Step 2 above, but chose Graphical Install (or (Text-Mode) Install) instead of Live. The following instruction, I do with Graphical Install.
Select the Language, Country then continues. Then leave hostname as kali.
Create the root password
Then select the Clock
Step 6: USE Guided – use the largest continuous free space, Kali then formats the volume.
Next, choose All Files in one…
Next, choose **Finish partition… **
Next, choose install GRUB bootloader.
Step 7: Restart your Mac, re-do the Step 1 and Step 2 (choose Live Mode).
Step 8: Open Command Line to install gdisk (need internet)
apt-get install gdisk
We now switch from MBR to Hydrid boot to use boot GRUB. Use the following code.
[email protected]:~# [B]gdisk /dev/sda[/B]Partition table scan: MBR: protective BSD: not present APM: not present GPT: present[/I]
[I]GPT fdisk (gdisk) version 0.8.7
[I]Found valid GPT with protective MBR; using GPT.[/I]
Command (? for help):[B] p[/B]
[I]Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 1B3DB3D4-ECFD-47A1-9435-F2FF318C2F55
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 8-sector boundaries
Total free space is 245 sectors (122.5 KiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 548413439 261.3 GiB AF00 Macintosh
3 975503592 976773127 619.9 MiB AB00 Recovery HD
4 548413440 548415487 1024.0 KiB EF02
5 548415488 958138367 195.4 GiB 0700
6 958138368 975503359 8.3 GiB 8200[/I]
Command (? for help): [B]r[/B]
Recovery/transformation command (? for help): [B]h[/B]
[I]WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 5[/I]
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): [B]y[/B]
[I]Creating entry for GPT partition #5 (MBR partition #2)
Enter an MBR hex code (default 07): 83[/I]
Set the bootable flag? (Y/N): [B]y[/B]
Unused partition space(s) found. Use one to protect more partitions? (Y/N): [B]n[/B]
Recovery/transformation command (? for help): [B]w[/B]
[I]Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
Do you want to proceed? (Y/N):[B] y[/B]
[I]OK; writing new GUID partition table (GPT) to /dev/sda.
The operation has completed su
Turn Off the Mac and take of the USB. After Turn the Mac ON then hold the Option key, we are able to choose Mac OS X or Kali Linux to boot.