I have a seagate 1tb harddrive. I had partitioned the hard drive into 2 sections. I was planning on using one partition to store files. The second partition, I had planned to make it a bootable usb for linux. I attempted to use dd on Mac Os X 10.12.1. I used the following command:
sudo dd if=kali-linux-light-2016.2-amd64.iso of=/dev/disk2 bs=1m
After executing this, I lost the two partitions (which had data on it). I know the data still remains on the hard drive, but when I plug in the external hard drive, I only have one small partition now for a bootable usb of linux that does not work. Can anyone suggest how I can restore my old partitions, I know the data has not been overwritten yet?
diskutil unmount /dev/disk2
then I attempted to use the dd command, but it said the drive was still in use.diskutil unmountDisk /dev/disk2
and that when I used the commandsudo dd if=kali-linux-light-2016.2-amd64.iso of=/dev/disk2 bs=1m
Now when I plug the hard drive in, it shows that it is only formatted to about 1mb in size. So that's why I assume the data should still be recoverable. Please let me know if I can provide you with any other details.