Difference between revisions of "Cloning a hard disk"

From HaFrWiki
Jump to: navigation, search
m (Unix dd)
m (Unix dd)
 
Line 36: Line 36:
 
<br>
 
<br>
 
To clone hard disk A to Hard disk C, simple do:
 
To clone hard disk A to Hard disk C, simple do:
     $ dd if=/dev/sda of=/dev/sdc
+
     $ sudo dd if=/dev/sda of=/dev/sdc
It might be necessary to use sudo,
+
For a large disk the command may take some time
 
| width="550" |  [[File:Ubuntu-fdisk.png|thumb}550px|center|Ubuntu fdisk -l]]
 
| width="550" |  [[File:Ubuntu-fdisk.png|thumb}550px|center|Ubuntu fdisk -l]]
 
|}
 
|}

Latest revision as of 12:46, 4 March 2014


Cloning hard disk drives is a common maintenance task. Several options are available to perform clone options. The most simple way is to boot Ubuntu from an USB-Drive and use native UNIX commands.

Ubuntu Live

The Ubuntu side has a complete tutorial how to create an Ubuntu Live USB on Windows [1] which is based on the USB installer provided at pendrivelinux.com [2][3] and a basic iso-Ubuntu distribution [4].

Unix dd

Unix dd has the functionality to clone one hard disk to another. To see what hard disk are available use the fdisk utility on linux.

$ sudo fidsk -l

The result will be something like:

Partition Information fdisk

In total there are 3 disk found:

  • sda
  • sdb
  • sdc



2 Small hard disks, sda and sdb.

  • The first hard disk sda has 2 partitions,
    • sda1
    • sda2

and a total size of 1.073 MB.

The second hard disk sdb has 1 partition with a total size of 136.4 GB.

The third hard disk sdc is completely unformatted,

Cloning using DD
To clone hard disk A to Hard disk C, simple do:

   $ sudo dd if=/dev/sda of=/dev/sdc

For a large disk the command may take some time

Ubuntu fdisk -l

See also

top

Reference

top

  1. Ubuntu, Create an usb stick on Windows.
  2. pendrivelinux.com, Homewebsite
  3. pendrivelinux.com, Download universal usb-installer
  4. Ubuntu, Download Ubuntu Desktop,