From charlesreid1

How it works

What happens when you flash the image onto the SD card?

Running the "dd" utility means you are copying, literally bit-for-bit, the image file onto the SD card. The image you downloaded has two partitions, one boot partition and one file partition. The boot partition is 64 MB, and contains everything the boot loader on the Pi will need to boot into Kali. The second partition is 3 GB and contains the operating system, user files, etc.

If you are on the Mac, and you plug in an SD card flashed with Kali RPi Linux, you will only see the boot partition - the Mac will not mount the filesystem partition. You will only need to edit the partition if you want to modify the contents of the Linux installation (e.g., add a startup service, modify run levels, or change configuration files for software) without turning on the Pi and logging in to it.

On the Mac you can install the MacFUSE bundle, which will allow you to mount ext4 filesystems as though they are native filesystems, in order to mount that partition and modify it from the Mac. If you are on Linux, you will not need any extra software to see the ext4 filesystem partition.

The SD Card from Mac

Here's the SD card on the Mac:

KaliSDMac.png

and the output of diskutil list:

$ diskutil list
[...]
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.9 GB    disk1
   1:             Windows_FAT_32 NO NAME                 64.0 MB    disk1s1
   2:                      Linux                         3.1 GB     disk1s2

I could only see the 64 MB FAT partition from the Mac.

The SD Card from Linux

I rebooted my Mac laptop into Kali to take a look at the SD card again.

The SD card did not show up when plugged directly into the internal SD card slot on the Mac laptop. The SD card worked fine when plugged into an external USB device for reading SD cards.

The parted utility is the Linux version of Mac's "Disk Utility":

$ parted -l 

Model: USB Mass  Storage Device (scsi)
Disk /dev/sdb: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      512B    64.0MB  64.0MB  primary  fat16        lba
 2      64.0MB  3146MB  3082MB  primary  ext4

Now we can see both partitions of the SD card, and even modify the contents of the Linux filesystem. But before we do anything to the SD card, we have to mount it. Make a folder for each of the partitions, and mount them:

$ mkdir usb1
$ mount /dev/sdb1 usb1
$ mkdir usb2
$ mount /dev/sdb2 usb2