Results 1 to 20 of 20

Thread: Macbook Pro Kali + Mac OS Dual Boot Install Guide & WiFi Guide

  1. #1
    Join Date
    2015-Apr
    Location
    East Bay Area, CA
    Posts
    2

    Macbook Pro Kali + Mac OS Dual Boot Install Guide & WiFi Guide

    I was excited that I got Kali running on my Macbook Pro after upgrading to Mac os 10.9 so I wrote this guide for all you fellow Macbook Pro users. I hope it is helpful. Below is my specific model Macbook Pro BUT this will more likely than not work for a lot of other Macbook Pro models.

    UPDATE: The latest version of Mac Linux USB Loader should make this guide unnecessary but if it does not work for you refer back to this guide. The latest version can be found here: https://sevenbits.github.io/Mac-Linux-USB-Loader/


    The Guide below shows how to dual boot Kali Linux and Mac OS 10.9.5 with the following hardware and software:

    Macbook Pro 5,3 (Mid 2009)
    Mac OS 10.9.5
    Kali 1.1.0a (Amd64 iso)
    Refind 0.8.7
    Mac Linux USB Loader 3.0.2


    Also tested on:
    Macbook Pro 11,1 (Mid 2014, Late 2013) running Mac OS 10.9.5



    Notes:

    - Wifi guide is at the bottom, it mentions BCM4322 but likely works for a lot of other Broadcom based “Airport” wireless devices.

    - I’ve written this in as simple terms as possible because I’ve noticed a lot of people who try this lack very much experience with this kind of thing. Sorry if it’s a little annoying.

    - The developer of Mac Linux USB Loader has said that in version 3.1 Kali will be fully supported so you likely will no longer need my installation instructions below.

    - It seems to be Mac OS 10.9 that made my Linux Apple laptop life this hard as I was previously able to install Kali no problem when I dual booted it with Mac OS 10.8 and way way back I used to have Backtrack Linux installed on this same laptop dual booting Mac OS 10.6 with no issues.

    - Keeping the above note in mind, if you have Mac OS 10.10 or an older Mac OS (Pre-10.9) the below method may not work for you since I only have 10.9 to test this on and I do not know what else this works on. So if the guide below does not work I would try two things:
    1) DD the Kali iso to a USB drive on it’s own.
    Instructions for this are on the Kali Docs website here: http://docs.kali.org/downloading/kal...ve-usb-install
    If booting that doesn’t work then…
    2) Skip steps 4 and 5 below to try booting the Mac Linux USB Loader created USB drive without replacing the files I mention.
    If neither of those things work then check the Kali forums! There are a lot of methods here for other Macbook Pro's/Apple computers! They simply did not work for my model laptop/firmware version.


    To Install Kali:

    1) First download the Kali ISO appropriate for your hardware, this laptop and all Macbook Pro’s (unless I’m mistaken) are 64-bit so I am using the Amd64 ISO. Then download Mac Linux USB Loader and install it into your Applications folder.
    Download here: https://sevenbits.github.io/Mac-Linux-USB-Loader/


    2) In Mac OS use Disk Utility to format your USB drive as MsDOS/FAT (NOT ExFAT) and under ‘options’ in the ‘partition’ tab choose MBR partition table.


    3) Open Mac Linux USB Loader and follow the instructions from the developer here:
    https://github.com/SevenBits/Mac-Lin...l-Instructions
    a) For ‘Choose Destination’ choose your USB drive that you formatted.
    b) For ‘Choose Enterprise Source’ choose ‘Included With Application’.
    c) Then on the next page for ‘Distribution Family’ select Debian.
    d) Now hit ‘Begin Installation’ and wait.


    4) Once the installation is completed by Mac Linux USB Loader then download the files
    ‘boot.efi’ and ‘bootX64.efi’ from the link below.
    (Do this by clicking each file then clicking ‘View Raw’)
    https://github.com/SevenBits/Mac-Lin...y/EFI%20Loader


    5) Copy both of these files to the ‘boot’ folder on your USB drive, replacing the two files of the same name that are already there. The ‘boot’ folder is located at:
    ‘your_usb_drive/efi/boot’


    6) Now install Refind. Download it from here: http://sourceforge.net/projects/refind/
    a) Extract the file you downloaded and open a Terminal window
    b) Type ‘cd’ with a space after it then drag the folder you extracted into your Terminal window (The line should now look similar to
    ‘NameOfComputer:~ Me$ cd /something/something_else/refind_0.8.7’).
    Now hit enter.
    c) Now type ‘sudo ./install.sh’, hit enter, and let it complete the installation process.


    7) Restart your computer and your Refind loader should come up (If it doesn’t then repeat the Refind install process). It will show an Apple and also a couple of other icons with small USB icons on them. Select the one labeled something like ‘Fallback boot loader’.

    At this point it is important that you have your laptop plugged into the internet via an ethernet cable since the wifi card won’t work until we install a driver in the wifi guide.

    8) Now press ‘1’ to load the Kali ISO and let it load. It will say it is going into blind mode. Then after a short time it will start scrolling through text. If it doesn’t start scrolling within thirty seconds to a minute (indicating it’s loading Kali) then force a shutdown, start the computer again, and repeat the steps because sometimes this has to be done a few times before it will load Kali.


    9) Once Kali boots and you log into it (User: root and Password: toor) go to Applications>System Tools>Install Kali Linux. After you go through a few steps it will throw you two errors: ‘Failed to retrieve pre configuration file’ and ‘An installation step failed’.


    10) It will now take you back to a screen that has a list of installation steps on the left hand side with ‘Abort Installation’ at the bottom of the list. Select from that list ‘Load installer components from CD’ and on the list of packages it shows check the box for ‘load-media’, it’s description should be ‘load installer components from removable media’. Now click ‘Continue’. It will now load some packages with a progress bar.


    11) The installer will then ask if you want to load drivers from removable media, click no then continue. Then it will give you the same two errors from above: ‘Failed to retrieve pre configuration file’ and ‘An installation step failed’. And it will again take you back to a list of installation steps that is now longer than it was before. On that list select ‘Detect network hardware’ (And if you haven’t yet you need to plug your computer into the internet via an ethernet cable). Select ‘eth0’ as your network device and click ‘continue’.


    12) Now continue through the installation process. If you need partitioning help see Kali’s dual boot guide on their Kali Docs website here: http://docs.kali.org/installation/ka...n-mac-hardware
    (If you need to resize your Mac OS partition I would not recommend resizing it with gparted as they say to and instead do it with Disk Utility in Mac OS)


    13) Once the installation is complete boot into Mac OS X and follow steps 6b and 6c above in order to reinstall Refind. This is so that Refind sees your new installation of Kali Linux and installs the ext4 file system driver so it can boot into that installation.


    14) Now simply restart your computer and select the Penguin icon on the Refind menu to boot into your installation of Kali Linux. If your wifi will not connect under Kali follow the steps below.




    How to get the BCM4322 Broadcom wireless (Airport) working:

    (To check what Broadcom card you have in Kali type ‘lspci’ in the Terminal and look through the list of hardware that comes up for a line with ‘802.11a/b/g/n’ at the end of it. Your card model is BCM followed by four to five numbers.)

    See: https://wiki.debian.org/wl#Broadcom_...vices_.28wl.29

    1) Once you are logged into your installation of Kali go into Applications>System Tools>Add/Remove Software. Search Broadcom and uncheck every package EXCEPT the ones that say ‘NetXtreme’ and ‘various drivers’. Click Apply.

    --The rest of this guide is exactly what you would do in the above Debian Wiki link--

    2) Open a Terminal window.
    a) Type ‘apt-get update’ into Terminal and hit enter.
    b) Once the above is done copy ‘apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') broadcom-sta-dkms’ and paste it into the Terminal without the ‘ ’ quotes at the beginning and end of course.
    c) Copy ‘modprobe -r b44 b43 b43legacy ssb brcmsmac’ and paste it into Terminal once the above is done downloading and installing.
    d) And finally type or copy and paste ‘modprobe wl’.


    3) Your wifi should now be working without constantly asking for the password to the network. If not, restart Kali and it should work.

    ^ The one downside of having a working wifi card this way is that you cannot spoof the MAC address, which is fine by me because I have some small portable wifi cards but sorry to those who don’t have other options. I’m told there are complicated workarounds that fix the b43 driver (the spoofable driver) so that it actually works in Kali and thus you wouldn’t need the above ‘wl’ driver (the not spoofable driver).
    Last edited by jinxc; 2015-08-23 at 20:29. Reason: added a note on latest Mac Linux USB Loader

  2. #2
    Thank you jinxc for taking the time to write up your finding =).
    Job well done.
    This is a Kali-Linux support forum - not general IT/infosec help.

    Useful Commands: OS, Networking, Hardware, Wi-Fi
    Troubleshooting: Kali-Linux Installation, Repository, Wi-Fi Cards (Official Docs)
    Hardware: Recommended 802.11 Wireless Cards

    Documentation: http://docs.kali.org/ (Offline PDF version)
    Bugs Reporting & Tool Requests: https://bugs.kali.org/
    Kali Tool List, Versions & Man Pages: https://tools.kali.org/

  3. #3
    Nice write up jinxc.

  4. #4
    Join Date
    2015-Jun
    Posts
    2
    This post got me the furthest so far but im still stuck! I am on step #8: as soon as I hit '1' to load the ISO, it says "alloc magic is broken at 0x87301a40: 207d007d68746170". I have followed it to a T and have restarted the steps yet result in the same issue.

    HELP!

  5. #5
    Hi All,

    I would sincerely like to thank everyone here who has posted their procedures on getting Kali going dual boot with OS X. Just awesome level of effort being thrown into this

    I have been working pretty much non-stop since I received my brand spankin' new MBP (15" 11,5 - Preinstalled w/10.10.3 - LVM/WDE ala FileVault) on Friday. I am by no means a new comer to Unix or Linux, nor to the former incarnations of this distro (Back|Track and its predecessors). Where I am a total newb is Mac and OS X (although my previous experience on FreeBSD is helping dramatically). I simply have never had the budget to go Mac (as I suspect is a common impediment).

    Through a mixture of guides, i.e. - manual installation of rEFInd v0.8.7 (with "bless[ing]" the ESP mount point), combined with jinxc's steps 3 (FYI, the dev instructions are misleading, do not move the app to Applications, unzip it to the same dir as your ISO and run it from there, or the app will complain about the Enterprise sources due to sandboxing limitations) and 4 above (step 4 being absolutely critical to boot success), I have been able to boot into Live Kali - YAY!!!

    Unfortunately, I now have another issue I need to resolve before continuing, but wanted to ask if anyone had any thoughts on this before I go shell out for the lightning bolt ethernet adapter (I seriously wish I had bought stock in Apple in '97 lol). I have rolled my own ISOs for Ubuntu and CentOS in the past, but it has been a seriously long time and my aging mind is having trouble recalling how I got the wl packages going offline. Any thoughts on this? Am I heading down another rabbit hole here? Should I say screw it and throw the money at the adapter to keep some sanity?

    Any comment, suggestions welcome here

    Thanks,

    SnickelFr1tz

  6. #6
    Join Date
    2015-Mar
    Posts
    5
    Hi,

    Will this tutorial work on a new Macbook 12inch (2015) with El Capitain OS?

    Thank

  7. #7
    Join Date
    2015-Dec
    Posts
    1
    Hoe, yes, it work perfectly.

    El Capitan OS, Windows 10, Kali 2.0 = Triple Boot on MacBook Pro (later 2013).

    BR

  8. #8
    Join Date
    2015-Dec
    Posts
    1
    Hi jinxc,
    thank you for this tutorial, but i have an issue with wifi,
    i have macbook 5,3 like you, i installed Kali Linux 1.1.0a, wifi seems to work but the signal is low and connection problems.
    I followed your guide about the wifi (i added deb http://httpredir.debian.org/debian/ jessie main contrib non-free), when i do:
    "modprobe wl" i have:
    FATAL: module wl not found.
    i can tell you that when i did:
    apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') broadcom-sta-dkms
    I had in the final:
    Examining /etc/kernel/header_postinst.d.
    run-parts: executing /etc/kernel/header_postinst.d/dkms 3.16.0-4-amd64
    : Unable to find an initial ram disk that I know how to handle.
    Will not try to make an initrd
    Configurazione di linux-headers-amd64 (3.16+63)...
    Elaborazione dei trigger per libc-bin...

    Have a solution?
    P.s. i have an upgrade 8gb of ram's bank
    Thank you!!

  9. #9
    Join Date
    2016-Jan
    Posts
    1
    Great post! I was able to get Kali up and running with wifi on my 2015 MBP; however, now I am unable to boot into OSX. I press and hold Option to get to rEFIND boot menu but when I select OSX it takes a few mins and then I get a circle with a line through it. Any help would be great!

  10. #10
    Join Date
    2016-Jan
    Posts
    8
    How can I install the Broadcom BCM43 drivers on Kali if I am not connected or can not connect to the internet?
    Thanks

  11. #11
    Join Date
    2013-Jul
    Location
    USA
    Posts
    4
    Thanks, I did it with a dvd.

  12. #12
    Join Date
    2016-Mar
    Posts
    2
    works perfectly for me

  13. #13
    WIFI guide does not work for USB persistence users now !

    You will have to manually install 4.3.0 headers from http://ftp.tku.edu.tw/kali/pool/main/l/linux/

  14. #14
    Join Date
    2016-Aug
    Posts
    1

    Smile Installing Wireless Without Internet

    Quote Originally Posted by Dave74 View Post
    How can I install the Broadcom BCM43 drivers on Kali if I am not connected or can not connect to the internet?
    Thanks
    To install drivers without internet, I did the following:

    1. I used this link to find out what drivers I needed https://help.ubuntu.com/community/Wi...Driver/bcm43xx, luckily for me I could just use the Broadcom Proprietary Driver (bcmwl-kernel-source)
    2. I ran this command to check which Broadcom wireless chipset I had:
      Code:
      lspci -vvnn | grep -A 9 Network
    3. That command told me I had a BCM4360 chipset, so I could just use the bcmwl-kernel-source package mentioned in the link above.
    4. I downloaded the latest Ubuntu version of the package (works on debian distros) from here: http://launchpadlibrarian.net/226723...ntu8_amd64.deb
    5. Install the package with the following command:
      Code:
      sudo dpkg -i Desktop/bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu8_amd64.deb
    6. When I tried to install it I got the following output:
      Code:
      (Reading database ... 299163 files and directories currently installed.)
      Preparing to unpack .../bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu8_amd64.deb ...
      Removing all DKMS Modules
      Done.
      Unpacking bcmwl-kernel-source (6.30.223.248+bdcom-0ubuntu8) over (6.30.223.248+bdcom-0ubuntu0.2) ...
      Setting up bcmwl-kernel-source (6.30.223.248+bdcom-0ubuntu8) ...
      Loading new bcmwl-6.30.223.248+bdcom DKMS files...
      Building only for 4.3.0-kali1-amd64
      Building for architecture x86_64
      Module build for the currently running kernel was skipped since the
      kernel source for this kernel does not seem to be installed.
      modprobe: FATAL: Module wl not found.
      update-initramfs: deferring update (trigger activated)
      Processing triggers for initramfs-tools (0.120) ...
      update-initramfs: Generating /boot/initrd.img-4.3.0-kali1-amd64
      bradley@kali:~$ sudo modprobe -r b43 ssb wl brcmfmac brcmsmac bcma
      modprobe: FATAL: Module wl not found.
    7. OK, I don't have the kernel source. So let's find out how to get it. I first ran this command to get the kernel release version:
      Code:
      uname -r
      This gave me the output:
      Code:
      4.3.0-kali1-amd64
      This means that we need the linux-headers-4.3.0-kali1-amd64 package, which I downloaded from here: http://http.kali.org/kali/pool/main/...ali4_amd64.deb. You will need a different headers package based on your release kernel.
    8. Once you've downloaded your linux-headers-* debian package, you'll need to go ahead and download it's dependencies before you install it. It's dependencies (for linux-headers-4.3.0-kali1-amd64) were the following:

    9. Once you've got all the packages on your Linux machine you can go ahead and install the dependencies and then the linux-headers package:
      Code:
      sudo dpkg -i Desktop/linux-headers-4.3.0-kali1-common_4.3.3-5kali4_amd64.deb
      sudo dpkg -i Desktop/linux-kbuild-4.3_4.3.1-2kali1_amd64.deb
      sudo dpkg -i Desktop/linux-compiler-gcc-5-x86_4.3.3-5kali4_amd64.deb
      
      sudo dpkg -i Desktop/linux-headers-4.3.0-kali1-amd64_4.3.3-5kali4_amd64.deb
      This should hopefully install successfully, fortunately I didn't have to do any debugging from this point on.
    10. Last but not least, you should be able to install the bcmwl-kernel-source package without issue:
      Code:
      sudo dpkg -i Desktop/bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu8_amd64.deb
    11. To test the driver (and remove the need for a computer restart) use:
      Code:
      sudo modprobe -r b43 ssb wl brcmfmac brcmsmac bcma
      sudo modprobe -v wl
    12. Allow several seconds for the network manager to scan for available networks before attempting a connection. Then click the top right menu (if using gnome) and there should be a wireless icon on the menu!
    13. If you try and connect to your wireless network and it won't accept the password, just restart the machine and everything will be good to go.


    I hope this helps anyone who was struggling without an ethernet connection to install everything with

  15. #15
    Join Date
    2016-Oct
    Posts
    1
    I have MacBook Pro (Retina, 15, mid 2014) and that it worked for me like a charm! Thanks snivels!

  16. #16
    Join Date
    2016-Nov
    Posts
    1
    Quote Originally Posted by snivels View Post
    To install drivers without internet, I did the following:
    ...[*] Once you've got all the packages on your Linux machine you can go ahead and install the dependencies and then the linux-headers package:
    Code:
    sudo dpkg -i Desktop/linux-headers-4.3.0-kali1-common_4.3.3-5kali4_amd64.deb
    sudo dpkg -i Desktop/linux-kbuild-4.3_4.3.1-2kali1_amd64.deb
    sudo dpkg -i Desktop/linux-compiler-gcc-5-x86_4.3.3-5kali4_amd64.deb
    I have Macbook Air 2013 with BCM 4360. So I downloaded wifi drivers for BCM 4360:
    bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu11_amd64.deb

    Kali 'uname -r' is 4.6.0 amd64
    I downloaded all needed packages from http://http.kali.org/kali/pool/main/l/linux/:

    linux-headers-4.6.0-kali1-common_4.6.4-1kali1_amd64.deb
    linux-kbuild-4.6_4.6.4-1kali1_amd64.deb
    linux-compiler-gcc-5-x86_4.6.4-1kali1_amd64.deb
    linux-headers-4.6.0-kali1-amd64_4.6.4-1kali1_amd64.deb


    on step to install compiler i have error:

    Code:
    root@kali:~# sudo dpkg -i '/media/root/Exchange/123/linux-compiler-gcc-5-x86_4.6.4-1kali1_amd64.deb' 
    (Reading database ... 315381 files and directories currently installed.)
    Preparing to unpack .../linux-compiler-gcc-5-x86_4.6.4-1kali1_amd64.deb ...
    Unpacking linux-compiler-gcc-5-x86 (4.6.4-1kali1) over (4.6.4-1kali1) ...
    dpkg: dependency problems prevent configuration of linux-compiler-gcc-5-x86:
     linux-compiler-gcc-5-x86 depends on gcc-5; however:
      Package gcc-5 is not installed.
    
    dpkg: error processing package linux-compiler-gcc-5-x86 (--install):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     linux-compiler-gcc-5-x86
    How to fix that or install gcc 5? Kali now has gcc 6 and i dont know how to resolve...

  17. #17
    Join Date
    2016-Nov
    Posts
    1
    Quote Originally Posted by pirate_tony View Post
    How to fix that or install gcc 5? Kali now has gcc 6 and i dont know how to resolve...
    I've now got wireless working with Kali 4.6 on my 2013 Macbook Air.

    snivels instructions worked great although I also needed extra packages for cpp-5, gcc-5, and dkms, to be installed before the bcmwl-kernel-source. I used the following versions:



    Thanks snivels!

  18. #18
    Join Date
    2016-Dec
    Posts
    1
    Quote Originally Posted by suptt View Post
    Great post! I was able to get Kali up and running with wifi on my 2015 MBP; however, now I am unable to boot into OSX. I press and hold Option to get to rEFIND boot menu but when I select OSX it takes a few mins and then I get a circle with a line through it. Any help would be great!
    I am new to the forum, mainly because this is the first time I've had any problem with Kali. Did you ever solve this issue? If so, how? I have been trying to figure it out for a week. I have tried everything I can think of and everything I have found online is essentially useless. The actual guide for dual booting on a mac is outdated. I think it's a mapping issue, but everything I find online about that leads me back to square one. Any help with this? Is there another topic on this issue somewhere? I've tried searching and that just led me to this forum.

  19. #19
    Join Date
    2017-Dec
    Posts
    2
    Im running Kali through the VirtualBox,
    MacBook Pro (Retina, 13-inch, Early 2013)
    3 GHz Intel Core i7
    8 GB 1600 MHz DDR3

    When running Ispci through the terminal I don't get any reference to my wireless adapter, so cannot ascertain which Broadcom if any i need to be installing the drivers for?

  20. #20
    Join Date
    2017-Dec
    Posts
    2
    Quote Originally Posted by judev View Post
    I've now got wireless working with Kali 4.6 on my 2013 Macbook Air.

    snivels instructions worked great although I also needed extra packages for cpp-5, gcc-5, and dkms, to be installed before the bcmwl-kernel-source. I used the following versions:



    Thanks snivels!
    How did you go about installing the extra packages completely new to this

Similar Threads

  1. Replies: 38
    Last Post: 2017-09-07, 21:33
  2. Updated Guide: How to make random MAC address at each boot
    By bluedangerforyou in forum How-To Archive
    Replies: 2
    Last Post: 2017-07-28, 23:51
  3. NetHunter install guide needs updating
    By hatchetaxesaw in forum Installing NetHunter
    Replies: 0
    Last Post: 2015-08-26, 16:25
  4. Replies: 18
    Last Post: 2014-09-26, 23:18
  5. Replies: 3
    Last Post: 2013-10-20, 06:47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •