Looking for a simple way to clone your drive? Once again your Ubuntu Live CD has the tools you need to backup your hard drive safely and for free. It takes some time, but it works just as well as Norton Ghost, but it lets you use applications from the Live CD in the meantime.
In this tutorial, I used a Ubuntu 9.04 Live CD as it already has all the tools required and supports my wireless card out of the box, but as long as you can have Gparted, you will be fine.
Some things you should know:
- This command is safe when used safely, but make sure you understand it well before you do anything stupid.
- Running a file system check (fsck) is highly recommended.
- You might want to try this overnight, as it takes a lot of time and cannot be paused.*
- dd will make a byte by byte copy of your input location to your output location. Unless you output it to a file (like an ISO image), you will have to dedicate your entire output drive to the backup, as it will overwrite any file system previously there.
- Even if you already have a linux partition, use a Live CD it will result in errors in your backup. Altering files while they are being copied will create various problems.
Preparations:
1. Plug your external drive.
2. Boot on your Live CD and open GParted (System>Administration>Partition Editor).

3. Select your external hard drive from the drop-down menu in top right corner.

4. Once you are absolutely certain you’ve selected the right disk, erase every partition on your external hard drive. If you don’t want to dedicate a hard drive to a file, you can also output the command to a file (just like an iso image). In this case, this step is not necessary.

The quickest way to do this is to go to Device>Create partition table and select msdos
5. Find the name of your source and destination. This can be found, once again, using GParted. In the top right menu, find the drives you copy from and to. Make sure you don’t confuse the input source and output source or you are going to be in hot water!

The command
The dd command is a really simple and efficient command. Here’s how it works:
dd if=[input location] of=[output location] conv=sync,noerror
conv=sync,noerror will prevent problems from read errors. You don’t need it, but it sucks to see your backup halt 12 hours in because of a small error on your disk.
The input and output locations can be files, folders, partitions, media, anything. You can, for example, make an ISO image of a CD by setting the input as /dev/cdrom and the output as cdcopy.iso.
6. In our case, we will set the input to the drive to backup and the output to our external drive. Open a terminal and type your command using the locations from #5:
dd if=/dev/sda of=/dev/sdb conv=sync,noerror
(make sure you have the right locations!!!)
7. To restore your backup, simply invert if and of.
*It took me 12 hours to copy a 250GB, 7200rpm laptop drive to a 5400rpm external drive. This is because the dd command copies the hard disk byte by byte.