Hard drive cloning or imaging is great way to supplement automated nightly backups of user data. With cloning or imaging you can capture the entire hard disk in one step. This makes disaster recovery much faster than file based backups where you’d have to reload the OS (Operating System), all the programs, and manually reconfigure all settings from scratch. A clone or image of a hard drive can easily save you a days work and a lot of headaches should a disaster occur. If you’re planning to do any serious hardware or software upgrades you’ll want to have a clone or image for when something goes wrong. Remember, Murphy is watching and he always strikes at the most inopportune time!
So, you know you need this capability, but what software should you use? There are a lot of fine programs out there to handle this task, but in this article I’m going focus on free and open source programs that work on both Windows and Linux-based PCs. If you’ve not already seen it, please review my earlier post on UNetbootin and PartedMagic before proceeding.
Preliminary – Create PartedMagic USB flash drive using UNetbootin:
Step 1. Download and install UNetbootin. If you are using Windows use the link above for the download. Installation is simply a matter of double clicking the installer file and following the prompts. If you are using Ubuntu Linux, simply open a terminal and type:
sudo apt-get install unetbootin
Step 2. Insert the blank USB flash drive. Even a cheap 1 GB model will suffice for this task.
Step 3. Start Unetbootin. Configure the settings as shown below. The drive setting may differ slightly depending on your hardware configuration. Click OK and UNetbootin will download the latest version of PartedMagic and create the bootable USB flash drive. When the process is completed UNetbootin will prompt you to reboot the machine and select USB boot. Only choose reboot if you are planning to do maintenance on the machine you are working on. If you are going to do maintenance on a different machine you will click Exit and then safely remove (i.e. unmount or eject) the USB flash drive.
Clone the hard drive
Step 1. Install the backup hard drive. I assume you know how to open up the computer and make the necessary power and data connections to the second drive. If you’re using IDE drives be sure to take care of the master/slave jumpers or one or more of your drives may not be recognised at boot. If you’re not confident that you can successfully install a second internal hard drive you can use one of these handy USB 2.0 to SATA/IDE hard drive adapter kits to simplify the setup.
Step 2. Insert the PartedMagic USB Flash Drive into an available USB 2.0 slot.
Step 3. Configure BIOS to boot the USB Flash Drive. You usually hit “Delete” or “F2” at startup to enter BIOS but your computer may be different. There are lots of different BIOS systems out there so I can’t possibly detail every possible configuration. If you get stuck consult your computer manual or use your friend Google to find out how to set the system to boot the USB flash drive containing PartedMagic. Once you’ve got it configured to boot the PartedMagic USB flash drive you will be prompted with some startup options. Choose the default “Run from RAM” or just wait a few seconds and let it start automatically.
Step 4. Get familiar with PartedMagic. Once PartedMagic is up and running you will have a full Linux-based GUI for managing various disk related tasks. Take some time to look around and get comfortable with the environment. You’ll see that it has a lot more capabilities than I can cover in this brief article. When you’re ready, start Ghost for Linux (G4L) as shown below:
Step 5. After you have agreed to the G4L license terms you will be presented with this screen. Highlight the option Click ‘n’ Clone and hit OK.
Step 6. You will be presented with the screen shown below. Choose option A: Select source to identify the drive you want to clone and click OK.
Step 7. Identify the source drive. The drives are listed according to their device name in Linux (sda = 1st hard drive, sdb = 2nd hard drive, etc.). In my case sda is a 320 GB SATA drive. If you have a lot of hard drives in your system you may want to start up the PartitionEditor from the desktop to get some hints as to which drive has been assigned which name. After you are confident in your choice click OK to continue.
Step 8. Now select option B: Select Target and click OK to continue.
Step 9. Now you will specify the target drive. You must select a drive that is larger than the source drive! My target is sdb, a 1 TB SATA drive. Once you are confident in your choice click OK to continue.
Step 10. Now simply click option C: Click & Clone and you’re on your way!
Step 11. The program will ask for confirmation of your choices. You must be sure because you risk the possibility of losing all or most of the data on the target drive if you are wrong. There is NO undo button here so be 100% certain before you click Yes!
Once the clone process has started you are presented a progress screen like this:
Step 12. When the process is finished you can close the G4L window. If this is the first time you’ve used G4L you may want to use the PartitionEditor to confirm that all partitions on the source disk were duplicated on the target disk. My source disk contained an encrypted Ubuntu installation and was duplicated properly as shown below. If you want to be 110% sure it worked you should replace your existing drive with the clone drive and confirm that the machine still boots and runs as expected.
Congratulations! You’ve now got a clone of your existing hard drive. You can now shutdown the computer and remove the clone drive. Put it somewhere safe! If you have a hardware failure, get a virus or find that your OS upgrade doesn’t go quite as planned you’ll be able to recover quickly and get on with your work.
In this article
- Linux and Open Source
- Microsoft Windows
- PC Hardware
- computer maintenance
- Ghost for Linux
- USB Hard Drive
- boot the usb flash
- boot the usb flash drive
- choice click ok to continue
- click amp
- click ok
- click ok to continue
- confident in your choice
- confident in your choice click
- flash drive
- g4l click amp
- g4l select target
- hard drive
- partedmagic usb
- partedmagic usb flash
- partedmagic usb flash drive
- select target
- source drive
- target drive
- usb flash
- usb flash drive