Use DD to Clone Linux Hard Drive

Use DD to Clone Linux Hard Drive


DD can be used a number of ways. It can be used both online and offline, although usually offline, this is a brief walkthrough of using in on an online system. MAKE A BACKUP of HOME, ROOT, VAR, ETC, all you other important directories before proceeding, 10 seconds of backup can save hours on a reload, this part is all YOUR responsibility

this additionally will not work on a heavily used system, or a system with DATABASES. If you are in that scenario, you should shutdown, boot a liveCD and then run the commands so the filesystem is not active


65GB Primary Hard Drive (sda)

95Gb Secondary i want to make primary (sdb)

login as root

umount -l all mount points to save time

do fdisk -l to list all hard drives

here’s my two hard drives, SDA and SDB

here’s the basic command MAKE SURE YOU HAVE THE RIGHT DRIVES IN THE RIGHT ORDER, otherwise you will overwrite your primary drive with a blank drive, and have nothing. 🙂 –AGAIN, NOT RESPONSIBLE IF YOU DO THIS!!!!!! ITS ALL ON YOU!!!!

this may take a while, and won’t give any output (unless you have errors on the drive, or it cannot read/write)

you may notice that your CPU usage is high during this time

final output

66GB Copied

now i’m going to shutdown

from here i’m going to remove the SDA hard drive from the system, and leave ONLY SDB

BAM! booted up with Zero Errors, let’s double check the boot log to be sure

looks good, all greens!

That’s it! You have successfully DD’d Linux


To get a hosted Linux Server visit today!