I am using a MacBook macOS Mojave 10.14.5. I can list the device with diskutil list, but it isn't mounted. I perform the dd command below. The output states input/output error, which doesn't give a lot of information.

sudo dd if=~/Downloads/ubuntu-18.04.2-desktop-amd64.dmg of=/dev/rdisk2s2 
dd: /dev/rdisk2s2: Input/output error
1+0 records in
0+0 records out
0 bytes transferred in 80.936791 secs (0 bytes/sec)

Anyone know how I can resolve this issue?

  • Can you write a few blocks of zero? dd if=/dev/zero of=/dev/disk2s2 bs=4096 count=8 and why are you writing to the raw disk instead of the disk itself or using disk utility app to restore the image with help? – bmike Jul 28 '19 at 16:48
  • With the target disk attached to the Mac, what it the full output of diskutil list in Terminal? Add it to the question. – user3439894 Jul 28 '19 at 17:05

For a bootable flash drive, follow the Ubuntu help:

  • This will be easier since there is the Etcher app you download to avoid the direct use of the dd command.


While I recommend using the Ubuntu ISO image with Etcher, my comments on the use of the dd command follow. You seem to be following the instructions from the link below. You got the wrong device name, /dev/rdisk2s2. You need the disk name not the partition name. You should remove all external drives except your flash drive. This will make it easier to identify the flash drive and reduce the risk from using the dd command. Try the instructions again from the beginning.


| improve this answer | |
  • Good call using etcher. Much better than my recommendation to use Disk Utility since they both try to get around the risk of someone using dd at the command line to destroy the wrong disk. – bmike Jul 28 '19 at 18:59
  • Thanks historystamp. I had some other URLs but yours are more current. – stackQA Jul 29 '19 at 6:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .