0

I've had to re-image several Macs for our company's employees. The USB stick is currently ready to go, but I would like to copy it to my local drive (Linux) to make a backup.

I've tried this command pv < /dev/sdb1 > /home/username/Documents/ISOs/macOS.iso which does make a bit for bit copy, but I'm unsure if this is the right approach.

1

I'd say it's a viable approach, not very fast I presume, but using just the shell, why not. Although I'm not sure if bitcopy of the first partition will be enough (I tend to believe it will not). I'm used to do these things using dd, e.g.

dd if=/dev/sdb of=/home/user/ISOs/macOS.img bs=512

which will make a bitcopy of the whole device, including MBR, partition layout and all partitions. Trouble is, you'll have to dd it back to a device of the same size (or bigger), but unless that's a problem, it should work.

There are some more sophisticated tools for cloning drives, though. gnome-disks have an option for making a drive image, clonezilla and partimage are others dedicated for this task.

  • There should be no major difference in speed between using dd, pv, or even just cp. dd respects the blocksize, but that's about the only advantage. – dirkt Apr 28 '17 at 6:20
  • Oh, yes, the speed bump comes in only with the other tools, like clonezilla and partimage. Forgot to clarify that. – Jan Stavěl Apr 29 '17 at 11:27

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.