I was wondering how I create a bootable usb kali linux drive for mac. And when I create one, is the usb drive a temporary os, like every time you plug it in it switches to kali linux and when you unplug it it switches back to OS X ? Or is the kali linux permanently on the computer/laptop
Luckily for you, OS X is similar to Linux due to them both running UNIX so it will make this process a lot quicker.
Before I proceed into writing the steps onto putting Kali on a USB drive - I will answer your questions.
Is the usb drive a temporary os?
Technically, yes, because it's a live USB. Meaning that everytime you plug this into a computer and boot from USB it can run the operating system from the computer instantly but nothing is saved, everytime you exit the live boot everything resets to how it was in the first place.
Every time you plug it in it switches to kali linux and when you unplug it it switches back to OS X? Or is the kali linux permanently on the computer/laptop
Kali won't physically nor permanently be installed to your main hard drive where the Mac OS X sits unless you intentionally install Kali Linux onto that drive meaning it will overwrite everything and install if you so please to do so. When you remove the USB after shut down, assuming you haven't installed Kali Linux onto the hard drive and just booted live, you will boot back into the normal OS as per normal. However, you can create something called
Live USB with Persistence which enables the capability of data preservation like any other OS. The Kali website describes it as such:
When running Kali Linux “Live” from the USB drive, even across different systems. The persistent data is stored in its own partition on the USB drive
Essentially acting as a hard drive, just on a USB. But again, you have to intentionally set that up. See here for more information about that.
Hopefully I answered your questions, so let's proceed to putting Kali onto a USB:
1) - Download the relative Kali Linux image on their site here: https://www.kali.org/downloads/ - save it somewhere easily accessible without a lot of files to avoid any confusion when we place the Kali ISO image onto the USB. Ideally, put it into it's own folder.
2) - Have a USB drive ready, minimum 4GB but I highly recommend an 8GB+ USB but 4GB should be fine.
3) - On your Mac, open Terminal by searching for it or by pressing
CMD + SPACE and typing
enter. The terminal should now be open.
4) - In your Terminal, type
diskutil list, don't have your USB plugged in yet to again, avoid confusion. The output should look similar to this:
/dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: Apple_partition_scheme *74.5 Gi disk0 1: Apple_partition_map 31.5 Ki disk0s1 2: Apple_HFS Macintosh HD 74.4 Gi disk0s3 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: CD_partition_scheme *718.1 Mi disk1 1: Apple_partition_scheme 625.3 Mi disk1s1 2: Apple_partition_map 31.5 Ki disk1s1s1 3: Apple_HFS Dungeon Siege Disc 2 625.0 Mi disk1s1s2
/dev/disk(disknumber) may or may not be different for you. Just remember that these are your drives you don't want to touch since they are for your main OS which is OS X.
5) - Plug in your usb device, then this time again type
diskutil list. If you feel it is too cluttered in the terminal type
clear to clear it then run through the step again.
6) - You'll find that an extra disk is listed and that is your USB Drive, it should have the volume name for the drive listed there too so it will be easily recognisable.
7) - After you have recognised which disk is listed under the USB type this into the terminal
diskutil unmount /dev/disk(USB number) without the brackets. NOTICE: This next step will erase your USB drive so make sure there is nothing on it that you want or need or it's a fresh drive.
8) - After it is unmounted, I assume it's safe to proceed, type:
sudo dd if=/location/to/kali.iso of=/dev/disk(USB number) bs=1m
sudo dd if=~/Desktop/Linux_Folder/kali-linux-2016.2-amd64.iso of=/dev/disk6 bs=1m
After it is initiated, nothing will print on the terminal but this is good because it's writing the ISO file of Kali into the USB successfully. This can take up to an hour depending on write speeds and other variables but be VERY patient with this just incase.
After it is done, you will recieve an output like this in the terminal:
2911+1 records in 2911+1 records out 3053371392 bytes transferred in 2151.132182 secs (1419425 bytes/sec)
This is good, it means that the ISO was successfully placed onto the USB drive.
9) - Restart your Mac and when you see the Apple logo on the boot screen, hold the
ALT key straight away and it will take you to a boot menu. The icon should be orange with a USB icon on top of it. It's easy to single out, if you have trouble with that you can unplug then plug it in on the boot screen and it will pop up for you so you know which one it is. Click it, and it should boot in no problem.
Note: This won't work with old Mac models, such as mid 2007 since they don't support
legacy boot. Had a lot of issues with it when I owned one. If you have a mid 2012 Macbook Pro onwards, they are fine to use.
A Bootable USB device doesn't work that way. It would normally boot independent of your other OS and most times copied into RAM but some allow writing data for persistent boots, I.E to allow you to customize it by installing extra software on it.
You will have to:
- Download the .iso image from kali.org
- Mount the .iso by double-clicking
- Copy the files inside .iso to usb
- Reboot, and then the computer should boot from usb
- Use the live mode so your os x is left untouched