I am trying to make a bootable Kali Linux ISO on my MacBook Pro Mid-2012. When I try to use this command: sudo dd if=/Users/jordanbaron/Desktop/kali-linux-2016.2-amd64.iso of=/dev/sdb2 of=/dev/disk1 bs=512 conv=noerror,sync
I get this error: dd: of: illegal argument combination or already set
Is there anyway that I could fix it? The flashdrive I am using is formatted as MS-DOS (FAT) and I am using OS X El Capitan.
2 Answers
It appears you specified the of
parameter twice. For Mac OS you probably don't want /dev/sdb2
(that's more likely a Linux device).
You what to use this syntax:
sudo dd if=kali-linux-2016.2-amd64.iso of=/dev/diskN bs=1m
Where N
in diskN
is the correct number for the external USB drive you're trying to write to.
If it's disk1
then use this command:
sudo dd if=/Users/jordanbaron/Desktop/kali-linux-2016.2-amd64.iso of=/dev/disk1 bs=1m
You do not nor should you, in this case, use conv=noerror,sync
as you do want it to error out if there is an issue, not keep writing. If the whole process doesn't produce an error then all should be good anyway.
The reason for bs=1m
over bs=512
is it will be more efficient and actually take a little less time as it is not having to constantly seek and write 512 bytes at a time, it's doing it 1 megabyte at a time. (You could even use a higher value.)
Note: In order to write to the target disk using dd
the disk must first be unmounted, not ejected. Use diskutil unmount diskN
or diskutil unmountDisk diskN
, where N
in diskN
is the correct number for the external USB drive you're trying to write to. You might also have to use sudo
with the diskutil
commmand if necessary.
Lastly, it doesn't matter how the target device is formatted or partitioned as it is going to be overwritten by the ISO Image and will then appear that size and formatted the filesystem the ISO Image is using. The remaining space on the USB drive will not be immediately accessible, although in some cases it can me made accessible afterwards.
-
-
@Jordan M. Baron, I just tested the command I provided, obviously changing the appropriate information i.e. ISO Image name and location and the
diskN
and it worked as advertised. So without additional information I'm not sure what else I can say other then... 1. Make sure that/dev/diskN
is pointing to the proper device. 2. Make sure that/dev/diskN
is unmounted, but not ejected, before starting thedd
operation. Use,diskutil unmount diskN
to unmountdiskN
but not eject it. Sep 5, 2016 at 13:36