11

I have a bootable USB for OSX El Capitan that I got from a friend. I need to make a copy of that on my USB. How do I clone that or make it into an ISO and clone the ISO into my USB in Mac?

2
13

You can use the standard UNIX utility dd. Plug in the flash drive you want to clone, open Terminal by searching in Spotlight (Command + Space) or by going to Applications → Utilities folder. Now type the following and hit enter:

dmesg | tail -n 10

Check what drive shows up. I'll use sd2 for this example (could be ada1, sda1, etc. in your case). Now execute:

sudo dd if=/dev/sd2 of=usb.img bs=4096

Unplug the flash drive when it's finished. Plug in the blank one and execute:

sudo dd if=usb.img of=/dev/sd2 bs=4096

to clone to the blank USB flash drive. It's good practice to verify that the second USB drive was assigned the same device name.

1
  • 2
    if you get the error Resource busy when writing the image file to usb device, then you'll have to unmount the disk by using diskutility or in terminal using diskutil unmount /dev/diskX – Madamadam Dec 21 '20 at 19:01
8

You should be able to use Disk Utility included with your Mac. Connect both USB drives to your Mac. Then do the following.

  1. Click on the Restore tab
  2. Drag the source USB drive over to where it says Source
  3. Drag the destination USB drive over to where it says Destination
  4. Click the Restore button
1
  • Looks like the UI of Disk Utility had changed since this answer was published – Gonen Apr 14 at 17:31
4

You can use the standard UNIX utility dd. Plug in the flash drive you want to clone, open Terminal by searching in Spotlight (Command + Space) or by going to Applications → Utilities folder. Now type the following and hit enter:

diskutil list

This command will list all the connected internal and external disks. Look for the entry corresponding to your USB drive (it would be labeled as (external, physical)) and note the path of the file representing it. The path would be of the form /dev/disk_x_ where _x_ would be an integer. In my case, the path for the file representing the external USB disk was /dev/disk2. Now run the following command in Terminal.

sudo dd if=/dev/disk2 of=usb.img bs=4096

Here, if means input file, which is the path of the file representing the USB drive. of represents output file (image file) which would be created on your internal hard drive (specifically in the current directory).

Unplug the flash drive when it's finished. Plug in the blank one, determine the path of the filename corresponding to it as explained above (by running diskutil list) and execute:

sudo dd if=usb.img of=/dev/sd2 bs=4096

Again, the input file (if) is changed to the image file that we created in the last step and the output file (of) is changed to the path of the file representing the USB disk.

It would be good to verify that the second USB drive was assigned the same device name and check that the copy is identical to the original disk.

3
  • Will this work if the source and target USB sticks are different sizes? – Calab Nov 20 '20 at 0:29
  • @Calab Yes. Make sure that the target has enough free space. – Nimesh Neema Nov 20 '20 at 5:15
  • 1
    if you get the error Resource busy when writing the image file to usb device, then you'll have to unmount the disk by using diskutility or in terminal using diskutil unmount /dev/diskX – Madamadam Dec 21 '20 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.