Dual Boot Kali on Mac Hardware

Dual Boot Kali on Mac Hardware

Kali Linux Installation Requirements

Since the release of Kali Linux 1.0.8, Kali Linux supports EFI out of the box.

This added feature simplifies the process of getting Kali installed and running on various Apple MacBook Air, Pro, and Retina models.The make/model/year of the device will determine how successful your experience will be, with newer devices having a better chance of working.Pre-installing rEFInd may also increase the odds of success on older devices.This guide will show you to dual-boot OSX with Kali Linux using rEFInd, with the option of encrypting the Kali Linux partition.

By using using the 3rd party software rEFInd (a fork of rEFIt) we are able to open up the boot menu used in Apple’s OSX OS, which is perfect for dual booting.

It also has the advantage of helping older devices boot from USB that would not be able to otherwise. Once Kali Linux has been installed, rEFInd can be customized to be hidden or removed completely.

Installation Prerequisites

>A minimum of 20 GB disk space for the Kali Linux install.

>A minimum of 1 GB RAM. 2 GB or more recommended.

>Devices older than ‘late 2012‘, may require a blank DVD.

>USB booting may not work without rEFInd pre-installed.

>For devices newer than ‘late 2012‘, you’ll need a blank DVD or a USB drive.

>OSX 10.7 or higher

Preparing for the Installation

>Download Kali linux.

>Burn the Kali Linux ISO image to a DVD or copy the image to USB drive.

>Backup any important information on the device to external media.

Preparing OSX (Installing rEFInd)

At the time of this writing, the latest version of rEFInd is 0.8.3.

Boot into OSX and download a local copy.

osx:~ mbp$ curl -s -L http://sourceforge.net/projects/refind/files/0.8.3/refind-bin-0.8.3.zip -o refind.zip

After downloading rEFInd, extract the contents of the zip file and run the install shell script with sudo.

osx:~ mbp$ unzip -q refind.zip

osx:~ mbp$ cd refind-bin-*/

osx:refind-bin-0.8.3 mbp$ sudo bash install.shWARNING:

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.To proceed, enter your password, or type Ctrl-C to abort.


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 configurerEFInd.


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!! Installation has completed successfully.

osx:refind-bin-0.8.3 mbp$

Kali Linux Partitioning Procedure

1)Before we can install Kali Linux, there needs to be room on the hard disk. By booting into a live Kali session, we can resize the partition to our desired size. To do so, power on the device and immediately press and hold theOption key until you see the rEFInd boot menu.

When the boot menu appears, insert your chosen installation medium. If everything works as expected, you will see two volumes:

>EFI – EFI\BOOT\syslinux.efi from 61 MiB FAT volume

>Windows – Legacy OS from FAT volume

Although Kali Linux is based on Debian, Apple/rEFInd detects it as Windows.

Select the Windows volume to continue.

>>If you are using a DVD, you may need to refresh the menu by pressing ESConce the disk if fully spinning.

>>If you still only see one volume (EFI), then the installation medium is not supported for your Apple device. If you haven’t already done so, you may wish to install rEFInd and try again.

>>If you select the EFI volume, the booting will hang at this point and you willnot be able to continue.

>>You should be greeted with the Kali Boot screen. Select Live and you should be booted into the Kali Linux default desktop.

>>We can use GParted to shrink the existing OSX partition (HFS+), allowing us to install Kali in the free space. You can find GParted in the Kali menu by navigating to: Applications -> System Tools -> GParted Partition Editor

>>Once GParted has opened, select your OSX partition. Depending on your system, it will usually be the second, larger partition. In our example, there are three partitions: the EFI upgrade partition (/dev/sda1), OSX (/dev/sda2), and System Recovery (/dev/sda3). Resize your OSX partition and leave enough space (20 GB minimum) for the Kali installation.

Kali Linux Installation Procedure

To start the Kali Linux installation, repeat steps 1 and 2 above to boot to the Kali Linux boot screen. Once you can see the the boot screen, choose ‘Live’, ‘Graphical Install’ or ‘(Text-Mode) Install’ to begin the setup. In this guide, we chose ‘Graphical Install’.

Select your preferred language and then your country location. You’ll also be prompted to configure your keyboard with the appropriate keymap.

The installer will copy the image to your hard disk, probe your network interfaces, and then prompt you to enter a hostname then domain name for your system.

In the example below, we’ve entered ‘kali’ as our hostname.If the setup detected multiple NICs, it may prompt you which one to use for installation.

If the chosen NIC is 802.11 based, it will ask for wireless network information to collect, before prompting for a hostname.If there isn’t a DHCP service running on the network, it will ask you to manually enter the network information after probing for network interfaces.

If Kali Linux doesn’t detect your NIC, you either need to include the drivers for it when prompted, or generate a custom Kali Linux ISO with them pre-included.

>Enter a robust password for the root account.

The installer will now probe your disks and offer you five choices. In our example, we’re using the spare partition that we made during live mode, so we select ‘Guided – use the largest continuous free space’.Experienced users can use the ‘Manual’ option for more granular configuration options. This option will also allow you to set up encrypted LVM, so Kali Linux would be fully encrypted. The screen afterwards will prompt you for the password. You will have to enter the same password every time you start up Kali Linux.

Kali will automatically securely wipe the hard disk before asking for the password. This may take ‘a while’ (hours) depending on size and speed of the drive. If you wish to risk it, you can skip it.

The next stage is to select the partition structure you want to use. We will go ahead and use the default option and have everything on one partition. Afterwards it will display an overview. If you agree to what it suggests, press the continue button.

Next, you’ll have one last chance to review your disk configuration before the installer makes irreversible changes. After you click Continue, the installer will go to work and you’ll have an almost finished installation.

This screen configures the use of our Internet network mirrors. Kali can use our online central repository to distribute applications to keep packages up-to-date and allow for additional programs to be installed more easily. Should you need to enter any appropriate proxy information, the next screen will allow you to enter the required details.

If you select ‘NO’ in this screen, you will NOT be able to install packages from Kali repositories until you alter your sources.

rEFInd Configuration

If you wish, you can alter rEFInd in various ways now, including:

The default OS selection (by default it is OSX)Timeout value (by default it is 20 seconds)Direct boot into the default OS (Note, by pressing Options during boot, you will have a one time boot menu)Remove rEFInd, enabling the use of the traditional Apple menu (booting to OSX and Kali Linux will still work)

If you wish to make any of these alterations, boot into OSX, and alter the following file:

osx:~ mbp$ sudo nano /EFI/refind/refind.conf

The timeout value controls how long you have to select an OS from the boot menu. By setting it to ‘-1’, it will boot directly into the default OS.

The ‘default_selection’ value sets the default selection on startup. OSX will be at position ‘1’ and Kali will be at ‘2’. In this example, we will use OSX as the default.

If we combine the two alterations and save our changes, the next time we reboot, it will appear that nothing has changed from before installing Kali Linux. However, if we hold down the ‘Options’ key for the Apple boot menu, we will see the following:EFI Boot – OSXWindows – Kali LinuxRecovery HD – OSX’s Recovery Partition

Using Apple’s boot menu, the value names cannot be altered. If you wish to customize these values, you will need to use rEFInd.

Recommended For You

About the Author: usama

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *