Cloning a Hard Drive

There are so many occasions in the retro-gaming world where IT knowledge is a major help, but none more commonly then with hard drive cloning!  Whether it’s backing up your streaming rig, cloning your Raspberry Pi solution, or even just making sure your main PC has a solid backup, learning how to properly “image” your drive will be a major help and potential timesaver.  Here’s detailed instructions on how to begin:

Clonezilla Disk Imaging

This guide shows how to back up and restore computer images using Clonezilla, via either a network connection, or a USB drive. Please note that Clonezilla has many options and steps, but most just require the default setting. I won’t screenshot every step, as most just require hitting “enter”.
Windows 10 warning! If you’re using Windows 10 with UEFI boot options (most Windows 10 is UEFI), then an Ubuntu-based version of Clonezilla is required. All instructions are the same for both versions:

1)  Create a Clonezilla boot device

If necessary, you can just burn a CD with the ISO file for use in older machines. I recommend creating a bootable USB device the LinuxLive USB Creator:

a. Start by deleting all delete all partitions from the USB drive. I prefer using diskpart and “clean” via DOS, but use whatever method is easiest for you.
b. Format the USB drive FAT32
c. Download the latest clonezilla iso and make sure it’s Ubuntu-based, or you’ll get Windows 10 errors!
d. Install LinuxLive
e. Run LinuxLive using all the default options.
f. Eject the USB stick

2)  Boot to Clonezilla

a. Set your PC to boot from a USB device.
Some require a BIOS change, others prompt to hit a key for a selection menu and others might just require you to hit “F12”.
NEXT, HIT ENTER TO THE FOLLOWING PROMPTS:
b. (Default) Clonezilla llive (Default settings, VGA 800×600) – This will take awhile.
c. (Default) en_US.UTF.8 English
d. (Default) Don’t touch keymap
e. (Default) Start_Clonezilla Start Clonezilla
f. (Default) device-image work with disks or partitions using images
g. STOP HERE

3)  Select your image location (source or destination)

a. If your location is a USB drive, select:

i. “local_dev Use local device (E.g.: hard drive, USB drive)”
ii. Insert the USB drive you wish to use for imaging. You can NOT use the same USB drive you booted from!
iii. Hit Enter at the prompt.
iv. It should show the second USB drive listed right above “Update periodically”. Once you see it (should be immediate), press Ctrl-C to stop scanning.
v. Select the USB drive from the list provided and hit Enter.
vi. Hit Tab (or right arrow) to skip the folder selection to hit “<Done>”, then press “Enter” to continue.
vii. (Default) Beginner Beginner mode: Accept the default options

At this screen, you can select if you’re saving or restoring the disk. Skip to step 4 or 5 for backup and restore options (respectively). NOTE: If you can’t see a “restore” option, please scroll to the bottom of this document for an explanation.

b. If your server location is a Windows-based network drive, select:

i. Samba_server Use SAMBA server (Network Neighborhood server)
MAKE SURE TO PLUG IN THE NETWORK CABLE BEFORE PROCEEDING!
ii. (Default) dhcp Use DHCP broadcast
iii. Enter the IP address of the server.
iv. This step selects what kind of server you’re connecting to
1. If it’s an off-domain file share, you should just be able to select “Cancel”
2. If you’re connecting to a domain, type the full name and hit “<Ok>”
v. Enter the username for the domain or share
vi. Enter the path that the image directories are in. Keep in mind that you’ve already selected the server and Linux requires forward slashes in the past. For example if the path is \\SERVER\SHARE\FOLDER, you’d only need to add /SHARE/FOLDER.
vii. (Default) 1.0 SMB protocol 1.0
Other options might be necessary in certain environments, but I’ve had good luck with 1.0.
viii. (Default) auto Use system default
ix. Hit “OK” to enter your user or domain password, then hit “Enter”.
x. Press enter again to continue
xi. (Default) Beginner Beginner mode: Accept the default options

At this screen, you can select if you’re saving or restoring the disk. Skip to step 4 or 5 for backup and restore options (respectively). NOTE: If you can’t see a “restore” option, please scroll to the bottom of this document for an explanation.

4) Create an image of the machine

a. Select: savedisk Save_local_disk_as_an_image
b. Enter a name for the image. Make SURE it ends in “-img”. I always recommend a name, followed by a Year:Month:Day date: Name_2018-11-29-img
c. Select the local disk that you’d like to image. In many cases it will be the only hard drive in the computer.
d. (Default) -sfsck Skip checking/repairing source file system
e. (Default) Yes, check the saved image (if you’re pressed for time, you can skip this, but it’s good to verify the image backup.)
f. (Default) -senc Not to encrypt the image (if the customer demands encryption, just MAKE SURE to record and archive the encryption keys)
g. (Default) -p choose Chose reboot/shutdown/etc when everything is finished
h. Press “Enter” to start the backup
i. Type “Y” and hit enter for every prompt.

ERRORS!

I’ve commonly run into a “dev is scheduled for a check or it was shutdown uncleanly” error when imaging Windows machines.  This can occur even if the PC absolutely was shut down properly and doesn’t have a check scheduled.  The fix is super easy:  Run a check at the next reboot, then boot to Clonezilla before going back to Windows.  Here’s how:

    • Boot into Windows and open a command prompt (type “cmd” in the start menu).
    • Type “chkdsk /f” and hit enter.
    • It’ll prompt you, then tell you Check Disk will run after the next boot.
    • Reboot the machine
    • Wait for chkdsk to run but do NOT let the PC boot back to Windows!!!!!
    • After it finishes, it will reboot once again.  THIS is when you need to select alternate boots and load Clonezilla from a USB stick.
    • As long as Clonezilla is loaded after chkdsk, but before the next Windows boot, it should work just fine.  As a note, this is only an issue when creating images, not restoring.

5) Restore an image of the machine

WARNING, THIS WILL COMPLETELY ERASE THE TARGET MACHINE!!!
a. Select “restoredisk Restore_an_image_to_local_disk
NOTE: If you can’t see a “restore” option, please scroll to the bottom of this document for an explanation.
b. Choose the image file to restore from.
c. Choose the target hard drive.
d. (Default) Yes, check the image before restoring
e. (Default) -p choose Chose reboot/shutdown/etc when everything is finished
f. Press “Enter” to start restore
g. Type “Y” and hit enter for every prompt.

Restore note:
If you’re trying to restore from an image, but don’t see any restore options, then there’s a problem with the image folder. You can try restarting Clonezilla by going to “Exit” and in step “vi” find the subdirectory the image is in (which is why I recommend keeping the image folder on the root of the drive). If you still can’t get restore options to show up, the image folder might be corrupt – The image file itself might not be working, or the folder might not be labeled properly (it needs to end in -img).