After my boss unsuccessfully cloned a drive using clonezilla, he asked me to find a piece of software to use it. I'd like to boot into a live distro and use dd. I'm confused by this command. Would anyone be able to explain it?
Warning: This method will erase the destination completely and replace it with the content from your source.
dd if=/dev/sdx of=/dev/sdy
x and y are replaced by the letters of the drives you want as source and destination. The letters can be found by using the lsblk command or sudo fdisk -l
if is the "input file" aka the source drive you want to clone. of is the "output drive", aka the drive you want to set as the destination.
Also be careful you have drive parameters set up correctly. I would format it in gparted before hitting it or the next computer you use the drive with might think it has a 512kb cache or something stupid (this has happened to me more than once with not only drives, but also USB's).
So I could boot into a live distro use sudo fdisk -l w/o the external HDD, and then rerun the command to verify which of the sd(x) is the destination drive?
Theres no param just make sure you format the drive separate instead of letting DD do it. Every time I do it with DD it screws up. Just use GParted or something and do it separately before cloning to that disk.
I've used DD to clone the Windows install on my work laptop to an SSD hoping it would run faster... It really doesn't unfortunately. Now if I can get that install working in a VM we might get somewhere...
In the sense of, if the destination HDD already has a windows system image on it... should I use windows to format the hard drive before I do this? In other words, how do I prepare to do this if there already is data on the drive to write to and I want to get rid of it's current contents.
it would be smart to erase it ahead of time to prevent extra data from existing. other than that it copy ALL data from source drive to dest. drive. If the HDD has data on it then it would be overwritten.
I completed this on Saturday and turned the HDD to my boss. I forgot to try to test it by booting from it, but I did verify that the files were written over and they had. Hopefully, my boss tests it soon and lets me know if it worked properly. I'll follow up with results.