create a linux clone disk


How to clone a linux disk with dd

Back to the list of ebpg administration tips


  1. Do not do this if you have an older system with a RAID mirror drive, since the RAID drive is already a clone.
    RAID is an overly complicated way of making a clone, and it does not protect you from disasters of the stupid sort. On the newer ebpg systems you can make a proper clone and save the original disk somewhere safely offline.

  2. Purchase a blank solid-state disk of the exact same size as the system disk. If you have a two-disk system then you should buy two more of the same size. (There is no reason to use two disks for an ebpg, but sometimes Raith does that.)

  3. Change the boot order of the console computer. Every computer has a different way of choosing the boot order. Here is the one for our HP Z8
    console computer:

    After power-on, press F10 to get to the setup menu.
    Advanced -> Boot options
    USB storage boot (make sure this is checked)
    Advanced -> Boot options -> UEFI Boot order
    put USB as the first choice
    save

  4. Plug in a USB boot drive, such as the one from Raith, or make your own. (see below for making your own.) Unplug the backup drive and the archive drive, if you have those. (You should have a backup drive. Don't get lazy about that.)

  5. Boot from the USB drive. This is a Linux installation drive, but you DO NOT want to install Linux. Instead choose troubleshooting then rescue a Red Hat Enterprise Linux system or whatever it wants to "rescue" - it doesn't really matter. Then choose 3 to skip to a shell. Do not "install". Do not "continue".

  6. List the devices with

    parted -l

    (That's a lower-case "L", for "list".) You should see at least two drives. Chances are that /dev/sda has a boot partition. That's the 'source'. And chances are that /dev/sdb is the blank disk. That's the 'destination'. The USB drive is probably /dev/sdc, and 'parted' may be confused about the partitions. You can choose "i" to ignore it.


  7. Use 'dd' to clone the drive:

    dd if=/dev/sda of=/dev/sdb bs=10MB

    "if=" specifies the original disk, and "of=" specifies the blank disk. The output of "parted" should have told you which one has the boot track, and which one is unformatted. dd will copy the disk bit-by-bit with no thought at all about partitioning or formatting. The destination will simply have the same structure as the source.

    It will take about 4 hours to clone a 1 TB drive, and you will not see any status updates. It's really primitive. Congratulations: you have now used one of the oldest unix commands ever. It's older than you.


  8. Remove the system drive and replace it with the clone. Put the original drive somewhere safe. Boot with the clone. If it does not work, then this process has obviously failed.





Making your own boot USB stick


Buy a blank USB storage stick. 32 GB is large enough.

Download a Linux "ISO" file. It does not have to be Red Hat Enterprise Linux. Any distribution will have "dd", since it is an ancient, primitive command. Ubuntu has very nice step-by-step instructions for making a usb boot stick, at Ubuntu.com

Alternatively, you can create the boot stick with an ISO file and the Windows program "rufus", which can be found at rufus.ie

When you boot from this, remember that you want to use it in "troubleshooting" or "rescue" mode, by running a simple Linux shell.



Back to the list of ebpg administration tips