How to install Kali Linux dual boot on macOS

Since the release of Kali Linux 1.0.8, Kali Linux supports adding EFI. This additional feature simplifies the process of installing and running Potassium on various Apple MacBook Air, Pro and Retina models. Modeling the device will determine the level of success when users experience with newer devices. REFInd preinstallation can also increase the success rate on older devices. This tutorial will show you dual OSX booting with Kali Linux using rEFInd and encryption options

Since the release of Kali Linux 1.0.8, Kali Linux supports adding EFI. This additional feature simplifies the process of installing and running Potassium on various Apple MacBook Air, Pro and Retina models.

Modeling the device will determine the level of success when users experience with newer devices. REFInd preinstallation can also increase the success rate on older devices.

This tutorial will show you dual OSX booting with Kali Linux using rEFInd and Kali Linux partitioning options.

Requires installation of Kali Linux

By using rEFInd third-party software (a branch of rEFIt), we can open the boot menu used in Apple's OSX. This is perfect for dual booting. It also has the advantage of helping older devices boot from USB. When Kali Linux is installed, rEFInd can be customized to hide or delete completely.

Prerequisite installation conditions

  1. Minimum disk capacity of 20 GB for Kali Linux installation.
  2. Minimum RAM is 1 GB but it is best to use 2 GB or more.
  3. Older devices (end of 2012), may require a blank DVD. USB boot may not work if rEFInd is not preinstalled.
  4. For newer devices, you will need a blank DVD or USB drive.
  5. OSX 10.7 or higher

Prepare for installation

  1. Download Kali Linux.
  2. Burn Kali Linux ISO image to a DVD disc or copy the image to a USB drive.
  3. Back up all important information on the device to external storage media.

Prepare OSX (Install rEFInd)

1. At the time of 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 

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

 osx: ~ mbp $ unzip -q refind.zip 
osx: ~ mbp $ cd refind-bin - * /
osx: 0.8.3 refind-bin mbp $ sudo bash install.sh

CẢNH BÁO: Impro thực sử dụng câu lệnh sudo có thể được chuyển đến dữ liệu loss
hoặc gỡ bỏ tập tin hệ thống trọng. Please double-check your
gõ khi dùng sudo. Loại "man sudo" để biết thêm thông tin.

Hãy tiếp tục, nhập mật khẩu của bạn, hoặc kiểu Ctrl-C to abort.

Password:
Installing rEFInd on OS X .
Đang cài đặt rEFInd để đặt phân vùng trong //
Copied rEFInd binary tập tin

Sao bản tập tin cấu hình khi refind.conf; edit tập tin này để configure
rEFInd.

CẢNH BÁO: If bạn có Advanced Format đĩa, * DO NOT * thử kiểm tra các
trạng thái thông báo với thông báo --info ', vì này được biết để gây ra bị hỏng
on some systems !!

Cài đặt đã được thực hiện successfully.

osx: refind-bin-0.8.3 mbp $

Kali Linux partitioning process

1. Before installing Kali Linux, there should be space on the hard drive. By booting into the live Kali version, users can change the partition size as desired. To do this, turn on the device and immediately press and hold the Option key until you see the rEFInd boot menu.

How to install Kali Linux dual boot on macOS Picture 1How to install Kali Linux dual boot on macOS Picture 1

2. When the boot menu appears, insert the installation media you selected. If everything works as expected, you will see two volumes:

  1. EFI - EFIBOOTsyslinux.efi from 61 MiB FAT
  2. Windows - Legacy OS from FAT

Although Kali Linux is based on Debian, Apple / rEFInd will still detect it as Windows. Select the Windows volume to continue.

  1. If you are using a DVD, you may need to refresh the menu by pressing ESC once.
  2. If you still see only one drive (EFI), the installed media is not supported on your device. You can install rEFInd and try again.
  3. If you select EFI volume , the boot process will hang at this point and you will not be able to continue.

How to install Kali Linux dual boot on macOS Picture 2How to install Kali Linux dual boot on macOS Picture 2

3. You will be greeted with Kali boot screen. Select Live and you will boot into Kali Linux's default desktop.

How to install Kali Linux dual boot on macOS Picture 3How to install Kali Linux dual boot on macOS Picture 3

4. We can use GParted to minimize the existing OSX partition ( HFS + ) and install Potassium in an empty partition. You can find GParted in the Kali menu by navigating to: Applications -> System Tools -> GParted Partition Editor.

How to install Kali Linux dual boot on macOS Picture 4How to install Kali Linux dual boot on macOS Picture 4

5. When GParted is open, select your OSX partition. Depending on your system, it will usually be the second partition with larger capacity. In the example below, 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 (at least 20 GB) for Kali installation.

How to install Kali Linux dual boot on macOS Picture 5How to install Kali Linux dual boot on macOS Picture 5

Procedures for installing Kali Linux

1. To start installing Kali Linux, repeat steps 1 and 2 above to boot into Kali Linux's boot screen. When you can see the boot screen, select 'Live', 'Graphical Install' or '(Text-Mode) Install' to start the setup. In this tutorial, we have selected 'Graphical Install'.

How to install Kali Linux dual boot on macOS Picture 6How to install Kali Linux dual boot on macOS Picture 6

2. Select your preferred language and then select your country location. You will also be prompted to configure your keyboard using the appropriate keyboard diagram.

How to install Kali Linux dual boot on macOS Picture 7How to install Kali Linux dual boot on macOS Picture 7

3. The installer will copy the image to your hard disk, probe the network interface, and then prompt you to enter the server name and domain name for the system. In the example below, we entered ' potassium ' as the server name.

  1. If the setting detects multiple NICs, it may prompt you to choose which device to install.
  2. If the NIC is selected as 802.11 , it will require entering wireless network information, before prompting the server name.
  3. If there is no DHCP service running on the network, it will ask you to enter network information manually after searching for the network interface.
  4. If Kali Linux fails to detect the NIC, you need to select drivers for it when prompted or create a customized Kali Linux ISO with them first.

How to install Kali Linux dual boot on macOS Picture 8How to install Kali Linux dual boot on macOS Picture 8

4. Enter a strong password for the root account.

How to install Kali Linux dual boot on macOS Picture 9How to install Kali Linux dual boot on macOS Picture 9

5. Next, set the time zone.

How to install Kali Linux dual boot on macOS Picture 10How to install Kali Linux dual boot on macOS Picture 10

6. The installer will now explore the drive and provide five options. In the following example, we are using a backup partition that we have performed in live mode, so we chose ' Guided - use the largest continuous free space '.

Experienced users can use the 'Manual' option for more detailed configuration options. This option will also allow you to set up encrypted LVM, so Kali Linux will be completely encrypted. The screen will then prompt you to enter a password. You will have to enter the same password every time you start Kali Linux.

Kali will automatically wipe the hard drive before requesting a password. This may take some time (about a few hours) depending on the size and speed of the hard drive. If you want to risk it, you can ignore it.

How to install Kali Linux dual boot on macOS Picture 11How to install Kali Linux dual boot on macOS Picture 11

7. The next stage is to select the partition structure you want to use. We will continue and use the default option (put everything on a partition). It will then show the overview. If you agree with what the machine suggests, click the Continue button.

How to install Kali Linux dual boot on macOS Picture 12How to install Kali Linux dual boot on macOS Picture 12

8. Next, you will have the last chance to review the drive configuration before the installer makes irreversible changes. After you click Continue , the installer will work and the installation will be almost complete.

How to install Kali Linux dual boot on macOS Picture 13How to install Kali Linux dual boot on macOS Picture 13

9. This screen configures Internet network mirror usage. Kali can use online central repository to distribute applications that store updated packages and allow additional programs to be installed more easily. If 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 the Kali repository until you change your sources.

How to install Kali Linux dual boot on macOS Picture 14How to install Kali Linux dual boot on macOS Picture 14

10. Next, install the GRUB boot loader.

How to install Kali Linux dual boot on macOS Picture 15How to install Kali Linux dual boot on macOS Picture 15

11. Finally, click ' Continue ' to finish installing Kali Linux. You should restart the computer at this stage.

Once completed, repeat the first 2 steps again to boot into 'Live mode' again.

How to install Kali Linux dual boot on macOS Picture 16How to install Kali Linux dual boot on macOS Picture 16

12. If the gdisk package is not included in ISO Kali Linux, you will first need to install it.

If you have enabled network storage during setup, this can easily be done:

 apt-get update 
apt-get install gdisk

13. Now we will convert the Master Boot Record (MBR) into a hybrid, allowing Apple's EFI to detect and boot with GRUB.

Once completed, power off the device and delete all installation media when prompted.

 root @ potassium: ~ # gdisk / dev / sda 
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
Protective MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? For help): p
Disk / dev / sda: 976773168 sectors, 465.8 GiB
Logs sector size: 512 byte
Disk identifier (GUID): 1B3DB3D4-ECFD-47A1-9435-F2FF318C2F55
Partition table holds up to 128 entries
Sector first usable is 34, thành viên cuối cùng là 976773134
Phầnitions sẽ được sắp xếp trên 8-rãnh ghi rãnh ghi
Total free space is 245 sectors (122.5 KiB)

Số Đầu (rãnh ghi) End (rãnh ghi) Size Code Tên
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

Command (? For help): r

Recovery / transformation command (? For help): h

WARNING! Hybrid MBRs are flaky and dangerous! Nếu bạn quyết định không dùng một,
just hit the Enter key vào dưới đây khi prompt và bảng phân vùng của bạn MB
be untouched.

Loại từ một để 3 số phân vùng GPT, đã phân tách bởi gian, cần phải
added to the hybrid MBR, in sequence: 5
Place EFI GPT (0xEE) first in MBR partition (good for GRUB)? (Y / N): y

Tạo mục nhập cho GPT phân vùng # 5 (MBR partition # 2)
Enter an MBR hex code (default 07): 83
Set the bootable flag? (Y / N): y

Unused partition space (s) tìm thấy. Dùng một để tạo một phân vùng nhiều? (Y / N): n

Recovery / transformation command (? For help): w

Final checks complete. About để ghi GPT dữ liệu. THIS WILL OVERWRITE EXISTING
PARTITIONS !!

Bạn có muốn tiếp tục? (Y / N): y
OK; đang ghi bảng phân vùng GUID (GPT) để / dev / sda.
Hành động đã được thực hiện successfully.
root @ potassium: ~ #

14. At this stage, users can use either Kali Linux and OSX or choose which one you want to use at startup.

How to install Kali Linux dual boot on macOS Picture 17How to install Kali Linux dual boot on macOS Picture 17

Configure rEFInd

If you want, you can change rEFInd in a variety of ways, including:

  1. Select the default operating system (OSX by default)
  2. Timeout value (by default is 20 seconds)
  3. Boot directly into the default operating system (Note, by pressing Options while booting, you will get a one-time boot menu)
  4. Remove rEFInd, allow using traditional Apple menus (boot into OSX and Kali Linux still works)

If you want to make any of these changes, boot into OSX and change the following file:

 osx: ~ mbp $ sudo nano /EFI/refind/refind.conf 
  1. The timeout value controls the time you have to select an operating system from the boot menu. By setting it to ' -1 ', it will boot directly into the default operating system.

How to install Kali Linux dual boot on macOS Picture 18How to install Kali Linux dual boot on macOS Picture 18

  1. The ' default_selection ' value sets the default option at startup. OSX will be in the ' 1 ' position and Kali will be in ' 2 '. In this example, we will use OSX as the default.

How to install Kali Linux dual boot on macOS Picture 19How to install Kali Linux dual boot on macOS Picture 19

  1. If we combine the two changes and save, the next time it reboots, it will appear that nothing has changed like before installing Kali Linux. However, if we hold down the ' Options ' key for Apple's startup menu, the screen will appear as follows:
    1. EFI Boot - OSX
    2. Windows - Kali Linux
    3. HD Recovery - OSX's Recovery Partition

How to install Kali Linux dual boot on macOS Picture 20How to install Kali Linux dual boot on macOS Picture 20

Using Apple's boot menu, the value name cannot be changed. If you want to customize these values, you will need to use rEFInd.

See more:

  1. How to install Kali Linux dual boot Windows
  2. How to create USB Boot Live Kali Linux
  3. How to update Kali Linux and fix errors when updating
4.5 ★ | 2 Vote