11

What does cloning a hard drive mean? Is it just simply copying over all the "CONTENT" of the hard drive EXCLUDING the operating system, drivers, all the installed programs? or is it copying the ENTIRE hard drive BIT for BIT? Is the cloned hard drive bootable?

I have an external USB hard drive and trying to make a exact copy of my computer system by cloning, so that I can connect the cloned hard drive to another machine and boot into it, or install the cloned disk on another computer system and boot into it. Is this possible? Or am I going about this totally wrong?

What is ghosting a hard drive?

  • 2
    Like a biological clone, the intention is that the copy is complete, fully functional and capable of action independant of the original. – Mokubai Jun 28 '17 at 18:56
  • 1
    It is important not note that, while, as explained below, "cloning" is technically taken to mean making an exact copy, complete with OS, etc, it is apt to be used "casually" to simply mean copying off some large subset of the files. You need to establish what is actually meant in the real-life context. – Daniel R Hicks Jun 29 '17 at 1:42
  • also note that booting from USB drive is going to be slower than booting from normal SATA drive – jena Jun 29 '17 at 12:31
  • All the answers are great. I had hard time choosing one. Even though gronostaj is very thorough in his answer, I ended up choosing ianc1215, because he did provide simple explanation and answer with list of software that are available to do this with. I finally cloned my whole hardrive using Macrium Reflect Software Free Version and when you restore the cloned hardrive you get EVERYTHING back not just your files but drivers, operating system and all the programs you've installed. It is an exact copy of my old hardrive. Awesome. Thank you for all the replies. – ThN Jun 30 '17 at 12:54
  • 1
    Cloning a system HD and boot on another machine will work as you expect only if the PC has the same hardware. – giammin Jul 5 '17 at 18:06
8

Cloning a hard drive means to make a duplicate copy of the original source data. This duplicate copy can be either bit for bit which will duplicate EVERYTHING on the disk. Another option is to clone individual partitions, this can be useful if you only want to copy specific data such as an OS or data partition.

If I make a clone of my computer's hard disk it will be an exact duplicate (of the data that is included. To clone a hard disk you need special software.

Some examples of cloning software:

  • Clonezilla, a Linux based cloning utility
  • Acronis True Image
  • Norton Ghost

Once a drive is cloned you can use it as a bootable device (assuming you copied the bootloader data).

By the sound of it what you are trying to do is not a clone but instead what is called a sync. You want to have data reside on one computer. Then using a portable medium you want to take data to another computer for use. Yet you want both locations to remain identical.

Does that sound accurate?

  • 2
    The default operation mode of Clonezilla which you mentioned in the first place is to not clone bit for bit, so that kinda undermines your definition. – gronostaj Jun 28 '17 at 18:55
  • 1
    @gronostaj Sorry about that I mispoke and did not catch my own error. Let me correct that. – ianc1215 Jun 28 '17 at 19:00
  • I strongly advise against both Acronis and Norton solutions. Acronis once was a good option, but since 2010, it is buggy and unreliable. Norton Ghost in outdated and outmoded. It does not support new hardware and new configurations. Also, both of these are costly. There excellent free solutions out there, like Veeam Agent for Windows Free edition. – user477799 Jun 29 '17 at 5:49
  • 3
    and dd for *NIX – OrangeDog Jun 29 '17 at 10:08
  • @ianc1215 I used Macrium Reflect Software Free Version. It did the job. Thanks. – ThN Jun 30 '17 at 12:56
15

Cloning a hard drive is the process of making an effective copy of the hard drive on another one. It doesn't necessarily mean that both drives are identical bit for bit, although that's an option.

Most of the time cloning means that the target drive is partitioned in a similar fashion, partitions are formatted with identical file systems and all data is copied over to analogous partitions on the target drive. Extra information that's not stored in files, such as MBR, VBRs, data hidden in partition tables are usually cloned too. (This data would be omitted in regular file system-level copy and target drive wouldn't be bootable.)

Making a bit for bit copy would count as cloning, but it's the slowest and least flexible way of doing that. It works only if target drive isn't smaller (any space surplus is wasted) and some gibberish is copied too (removed files, unused space etc.). This may be desired though, eg. when making a safe copy during recovery of a failed hard drive or in forensics.

The usually preferred way of cloning is to replicate source partitioning and copy files with consideration of file systems. If the cloning program understands how file system stores files, it can recreate a new one (possibly on a partition of different size) and copy only meaningful data. Even if both partitions have identical size, this process will most of the time result in partitions that aren't bit for bit identical, but contain exactly the same data nonetheless.

Booting a properly cloned hard drive in the same PC is possible. Using it in another machine is a different story. OS may be already configured for specific hardware configuration of original machine and may fail to boot. Linuxes don't have much problems booting after transplantation most of the time. Modern versions of Windows are quite good at this and will usually boot if hard disk controllers in both machines are similar and work in identical modes (ie. IDE/AHCI/RAID). Keep in mind that some software licenses don't allow transplantation or tie software to one specific machine - for example OEM versions of Windows do this.

Ghosting is probably just another term for cloning, I suppose it refers to Norton Ghost which was a de facto standard for disk cloning some 15-ish years ago.

  • 3
    "Booting a properly cloned hard drive in the same PC should be possible". It definitely is possible, and is often done for this very reason. Many companies use cloned hard drives to roll out identical installations of an OS on identical PC's. And just today, I cloned a hard drive to use in the same PC, because the original drive showed early signs of failing (the Windows Event Log was full of atapi errors). Lastly, bit-for-bit cloning may also be useful when doing forensic analysis. You can examine the clone without being concerned about potentially damaging evidence. – Charles Burge Jun 29 '17 at 0:27
  • 2
    It works only if target drive is larger - can you explain why? Can't the target drive be exactly equal to the original, and it is possible to access/write to every single bit of the original/target? – user202729 Jun 29 '17 at 2:19
  • In my experience source and target drives can have the same capacity. – eromana Jun 29 '17 at 5:14
  • 2
    Making a bit-for-bit copy (e.g. with dd) is miles faster than formatting the drive and individually copying every file. – OrangeDog Jun 29 '17 at 10:00
  • I don't think this answer sufficiently emphasises the distinction between 'clone' and various versions of 'copy the files to another disk'. I'd expect a clone to be bit-for-bit, or very close to it. If it's not bootable in the same PC, it's not a clone, IMO – peterG Jun 29 '17 at 10:05
7

What is cloning a disk?

Cloning a disk originally meant copying the contents of a disk at sector level, bit by bit, to an identical disk. At sector level, everything including partitioning, boot sectors, file systems, files, metadata and even deleted files gets copied. Cloning was used for mass-producing identical computers, mass-deploying identical configurations to identical computers, or for forensics.

Nowadays, however, people expect a cloning app to do more, e.g. clone to a dissimilar disk, clone to a virtual hard disk, defragment the disk upon cloning, speed up cloning by not bothering with free areas of the disk, or even prepare the clone for use on dissimilar hardware.

What happens if I transfer the clone to another system?

The same thing that happens if you transfer the original to another system.

Unless the other system is identical to the original, you can expect dissimilar hardware components to require new device drivers before they work. Also, some commercial closed-source computer programs might detect this new change and require additional licensing steps in order to work, as an anti-piracy measures. Windows comes with a sysprep utility that solves this problem for Windows only.

What is ghosting?

It is another name for cloning, derived from an app named Ghost, developed in 1995 by Murray Haszard. It is now discontinued; don't bother with it.

  • Ghost still exists. It's a Symantec product now, but it still does the job. – cHao Jun 30 '17 at 16:05
  • @cHao Norton Ghost was discontinued in 2013. Symantec Ghost Solution is still sold but to enterprises only. They won't give it to an individual. And it is awful. – user477799 Jul 1 '17 at 11:51
5

For backup purposes I periodically clone my hard drive.

To clone a drive using the Linux dd command.

1- Make or get a Linux installation disk, the Live CD or USB. What follows is for Linux Mint Mate but any other Linux flavor is just as well.
2- With both he source and target drives plugged in to the computer, boot up from the separate Linux installation media.
3- Open the command prompt console and type:

sudo blkid

This will display a sequence of lines, one for every partition of every drive in the system scope,

/dev/sda1: LABEL="newmate2015" UUID="142698fe-5f97-4ca2-9a4c-3e20df" ... /dev/sda2: ... /dev/sdb1: ...

The number before the colon in /dev/sda<number>: designates the partition number, and the letter before the number /dev/sd<letter><number>: designates the drive.

4- In the dd command line, the variable if= designates the source drive or the input file, and the of= variable designates the target drive or the output file.

5- To verify the correct source and target drive letters, we display the same assignment in a different way. At the command prompt enter:

gnome-disks

6- If all is consistent, at the command prompt type:

dd if=/dev/sd<source-drive-letter> of=/dev/sd<target-drive-letter> conv=noerror,sync bs=4k

With the conv=sync,noerror option dd will not halt the transfer if a bit(s) in a source block can not be read, in that case to keep the transfer source and target drives at the same data position and of the same length, dd will instead write an all zeros block of the correct length.

The bs= argument is the transfer block size, and it also affects the cloning operation transfer bit rate, it can be determined by trial and error, 4k works fine with most HDD, SSD and USB drives, CD drives use 512b block size.

The target drive has to be of the same or larger capacity than the source drive. I use same size drives. Eventually when the target drive bad sector reallocation reserve capacity runs out the dd command will fail.

On my simple computer it takes about 3 hours to clone a 1Tb disk drive

After cloning,

7 Shut down the machine normally.

8 Do Not Attempt to Boot a machine that has 2 drives with the same UUID.

9 Unplug the original source drive from the computer.

10 Boot Up and verify that the cloned drive boots normally.

11 Label or record the the removed drive with the: removed date, user, machine name, location, contents, s/n, etc.

  • 5
    This does not answer any of the OP's question. He never asked how to perform a clone. His questions are: (1) What is cloning? (2) Will a clone work on another PC? and (3) What is Ghosting? – user477799 Jun 29 '17 at 5:45
  • @FleetCommand "and how does one go about doing it", though it is tagged windows-7 – OrangeDog Jun 29 '17 at 10:42
  • @OrangeDog Exactly. – user477799 Jun 29 '17 at 12:40
3

A clone is a direct copy, bit for bit, so that the data stored on the cloned drive is identical to the data on the original drive. From the operating system to the hidden directory files, from your desktop to the device drivers, everything is copied identically. Swap the old drive out for a freshly made clone and there should be no functional difference. You can also use the cloned drive in another PC, and aside from some potential missing drivers due to hardware differences, it should work just like your old system, making it an ideal backup in the event of a damaged PC. The downside to this, however, is that a direct bit-for-bit clone will usually be the only thing on the backup drive.

People usually use a program to clone a drive. I use Acronis.

  • 1
    I strongly advise against Acronis. It once was a good option but now, it is buggy and unreliable. Also, it is very costly. – user477799 Jun 29 '17 at 5:47
  • 1
    @FleetCommand Thanks for the heads up. I'll give Veeam Agent a try next time. – Sergio Dominguez Jun 29 '17 at 21:13

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.