0

I have an external drive with multiple partitions. I want to clone the entire drive. There are not any GUI apps that I can find that will clone the entire volume, so I attempted dd. My command was:

sudo dd if=/dev/disk0 of=/dev/disk2 bs=128m conv=noerror, sync

However, this results is:

 dd: unknown conversion sync

Both noerror and sync are listed under conv in the man page.

I'd appreciate assistance finding the correct dd command to clone an external drive with multiple partitions to another blank drive

2
  • You appear to have a space between "conv=noerror," and "sync" -- is that there in the original command? With the space (and different if and of values, I get the error "dd: unknown conversion", but without the space it works fine. Commented Jun 4, 2018 at 16:52
  • There is a space after the comma noerror,[space] sync.
    – k3vmo
    Commented Jun 4, 2018 at 17:19

1 Answer 1

1

I think the problem is the space between "conv=noerror," and "sync", although I don't get the exact same error you do:

$ dd if=/dev/null of=/dev/null bs=128m conv=noerror, sync    # With space, fails
dd: unknown conversion 
$ dd if=/dev/null of=/dev/null bs=128m conv=noerror,sync    # Without space, works
0+0 records in
0+0 records out
0 bytes transferred in 0.065054 secs (0 bytes/sec)

...but the error message I get is different. Generally, the "unknown conversion" message will list the unknown conversion:

$ dd if=/dev/null of=/dev/null bs=128m conv=noerror,wibble
dd: unknown conversion wibble

I think what's happening is that the shell parses conv=noerror, sync as two arguments, "conv=noerror," and "sync", and then dd parses the first of those as specifying two conversions, "noerror" and "" (since there's nothing after the comma), and then complains that the option "" is unknown.

But that's not the error you're getting; yours actually lists "sync" as the unknown option. The only thing I can think of is that you might have something like a non-breaking space between the "," and "sync". In that case, the shell will treat it as just part of the argument, and pass "conv=noerror,sync" as a single argument; dd will then parse this as two options, and give the error message "dd: unknown option sync":

$ dd if=/dev/null of=/dev/null bs=128m conv=noerror, sync    # That's a nonbreaking space
dd: unknown conversion  sync
                       ^ That's also a nonbreaking space

In any case, remove the space (whatever it is) and it should work.

2
  • I'm baffled because with or without a space - I get the same error: unknown conversion sync. This is on macOS Sierra 10.12.6 - is that what you're running as well?
    – k3vmo
    Commented Jun 5, 2018 at 19:07
  • We think we figured it out. When the volumes from both drives were unmounted - it gave no errors and the lights on the drives went crazy. I'll update you when it completes!
    – k3vmo
    Commented Jun 5, 2018 at 19:32

You must log in to answer this question.

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