Open-source disk imaging and cloning tool for bare-metal backup, mass deployment, and disaster recovery.

Table of Contents#

  1. Overview
  2. Editions and Downloads
  3. Booting Clonezilla Live
  4. MBR vs GPT Considerations
  5. Creating a Disk Image (Interactive)
  6. Restoring a Disk Image (Interactive)
  7. Device-to-Device Cloning
  8. Command-Line Usage
  9. Clonezilla SE and DRBL Setup
  10. Backup Verification
  11. Advanced Features
  12. Troubleshooting
  13. See Also
  14. Sources

1. Overview#

Clonezilla is a partition and disk imaging/cloning tool similar to commercial products like Norton Ghost or Acronis True Image. It clones only the used blocks of a filesystem, making images smaller and faster to create than raw disk copies. Clonezilla supports a wide range of filesystems including ext2/3/4, XFS, Btrfs, NTFS, FAT, HFS+, and more.

Key features:

  • Block-level imaging - clones only used blocks, reducing image size and time
  • Filesystem awareness - supports ext2/3/4, XFS, Btrfs, NTFS, FAT12/16/32, HFS+, UFS, VMFS, and others
  • Flexible storage - images can be saved to local disks, SSH/SFTP servers, Samba shares, NFS, or WebDAV
  • Multicast deployment - Clonezilla SE can image dozens of machines simultaneously via PXE/DRBL
  • Encryption and compression - supports image encryption and multiple compression levels
  • MBR and GPT - handles both legacy BIOS and UEFI partition schemes

2. Editions and Downloads#

EditionUse CasePXE Support
Clonezilla LiveSingle-machine backup and restoreNo (boot from USB/CD)
Clonezilla SE (Server Edition)Mass deployment to many machinesYes (via DRBL)

Download from clonezilla.org/downloads.php. Available as ISO (for CD/DVD) or zip (for USB).

Creating a Bootable USB#

# Using dd (replace <device> with your USB device, e.g., /dev/sdb)
sudo dd if=clonezilla-live-<version>.iso of=/dev/<device> bs=4M status=progress
sync

Alternatively, use tools like Ventoy, Rufus (Windows), or Etcher.

3. Booting Clonezilla Live#

  1. Insert the bootable USB or CD/DVD.
  2. Boot the target machine and select the Clonezilla media from the boot menu (often F12, F2, or Esc at POST).
  3. Select a language, keyboard layout, and then Start Clonezilla.
  4. Choose the operation mode: device-image or device-device.

4. MBR vs GPT Considerations#

Understanding the partition table type is critical before imaging or restoring.

AspectMBR (Master Boot Record)GPT (GUID Partition Table)
Max disk size2 TB9.4 ZB (effectively unlimited)
Max partitions4 primary (or 3 primary + 1 extended)128 (default)
Boot modeLegacy BIOSUEFI (can also work with BIOS via protective MBR)
Partition IDByte codes (e.g., 0x83 for Linux)GUIDs (e.g., 0FC63DAF-... for Linux filesystem)

Important notes:

  • When restoring an image, the target disk's partition table type should match the source. Clonezilla preserves the partition table in the image.
  • Restoring a GPT image to a smaller disk may fail if partitions exceed the target size. Use -k1 (proportional resize) to handle size differences.
  • UEFI systems require an EFI System Partition (ESP) with a FAT32 filesystem and GPT layout.
  • To check partition table type before imaging: sudo fdisk -l /dev/<device> or sudo parted /dev/<device> print.

5. Creating a Disk Image (Interactive)#

  1. Boot Clonezilla Live and select Start Clonezilla.
  2. Choose device-image.
  3. Select the image repository location (local disk, SSH server, Samba share, NFS, etc.).
  4. Choose Beginner or Expert mode.
  5. Select savedisk (full disk) or saveparts (specific partitions).
  6. Name the image and select the source disk/partitions.
  7. Choose compression level and whether to check/repair the filesystem before imaging.
  8. Confirm and wait for the process to complete.

6. Restoring a Disk Image (Interactive)#

  1. Boot Clonezilla Live and select Start Clonezilla.
  2. Choose device-image.
  3. Connect to the image repository.
  4. Choose Beginner or Expert mode.
  5. Select restoredisk or restoreparts.
  6. Select the image and the target disk/partition.
  7. Confirm the operation (target will be overwritten).

7. Device-to-Device Cloning#

  1. Boot Clonezilla Live and select device-device mode.
  2. Choose Beginner or Expert mode.
  3. Select disk_to_local_disk or part_to_local_part.
  4. Choose the source and target devices.
  5. Confirm and start the cloning process.

For cloning to a smaller disk, use Expert mode and enable -k1 (proportional partition resizing) or -k2 (use partition table from image, skip geometry check).

8. Command-Line Usage#

Clonezilla can be run non-interactively for scripting and automation. The main tool is ocs-sr (Opensource Clone System - System Rescue).

Save a Disk Image#

/usr/sbin/ocs-sr -q2 -c -j2 -z5p -i 4096 -sfsck -senc -p poweroff savedisk <image-name> <device>

Key flags:

FlagDescription
-q2Use partclone (default, fastest)
-cClient waits for confirmation before starting
-j2Clone hidden data between MBR and first partition
-z5pUse zstd parallel compression
-z1pUse gzip parallel compression
-z0No compression
-i 4096Split image into 4096 MB chunks
-sfsckSkip filesystem check before saving
-sencSkip encryption
-p poweroffPoweroff after completion (reboot, true for prompt)
-k1Proportional partition resize on restore

Restore a Disk Image#

/usr/sbin/ocs-sr -g auto -e1 auto -e2 -r -j2 -c -p reboot restoredisk <image-name> <device>

Clone Disk to Disk#

/usr/sbin/ocs-onthefly -g auto -e1 auto -e2 -r -j2 -sfsck -k1 -pa poweroff -f <source> -d <target>

Batch Mode (No Prompts)#

/usr/sbin/ocs-sr -batch -q2 -j2 -z5p -p true savedisk my-image sda

9. Clonezilla SE and DRBL Setup#

Clonezilla Server Edition (SE) uses DRBL (Diskless Remote Boot in Linux) for PXE-based mass deployment.

Install DRBL#

# Debian/Ubuntu
sudo apt install drbl

# Configure DRBL (interactive)
sudo drblsrv -i

# Set up DRBL for the network
sudo drblpush -i

Start Clonezilla SE Multicast Session#

sudo drbl-ocs -b -g auto -e1 auto -e2 -r -x -j2 -sc0 -p true \
  --clients-to-wait <count> --max-time-to-wait 300 \
  -l en_US.UTF-8 startdisk multicast_restore <image-name> <device>

Key parameters:

ParameterDescription
--clients-to-wait <count>Number of client machines to wait for before starting
--max-time-to-wait <seconds>Maximum seconds to wait for clients
startdiskOperate on whole disks
multicast_restoreUse multicast mode for simultaneous restore

Network Requirements#

  • DRBL server needs two NICs: one for internet, one for the client network
  • DHCP and TFTP services are configured by drblpush
  • All client machines must support PXE boot
  • A dedicated switch/VLAN for the deployment network is recommended to avoid DHCP conflicts

10. Backup Verification#

Verify Image Integrity#

Clonezilla can check saved images for corruption:

/usr/sbin/ocs-chkimg <image-name>

This verifies all partclone image files in the image directory against their stored checksums.

Verify During Save#

Use Expert mode and enable Check the saved image after saving. This adds time but confirms the image is valid immediately.

Manual Verification#

# Check individual partclone image files
partclone.chkimg -s /path/to/image/<partition>.img.zst

# List image contents
cat /path/to/image/clonezilla-img
cat /path/to/image/dev-fs.list
cat /path/to/image/parts

Test Restore#

The safest verification is a test restore to a spare disk or virtual machine. In a VM:

  1. Create a VM with a disk at least as large as the original.
  2. Attach the Clonezilla ISO and the image storage.
  3. Restore the image and verify the system boots.

11. Advanced Features#

Encryption#

In Expert mode, select the option to encrypt the image. Clonezilla uses ecryptfs for encryption:

# Save with encryption
/usr/sbin/ocs-sr -q2 -j2 -z5p -enc -p true savedisk my-encrypted-image sda

Custom Post-Clone Scripts#

Clonezilla supports running scripts after cloning, useful for hostname changes, driver injection, or configuration:

# Place scripts in the image directory as custom-ocs
# They run automatically after restore

Image Conversion#

Convert between formats:

# Convert a savedisk image to a smaller format
ocs-cvtimg-comp -b -z5p <image-name>

Troubleshooting#

IssueCauseSolution
Image restore fails on smaller diskPartitions exceed target capacityUse Expert mode with -k1 flag for proportional resize
UEFI system won't boot after restoreEFI boot entry not updatedBoot Clonezilla, mount ESP, run efibootmgr to recreate entries
Image save fails midwayInsufficient space on repositoryUse -i 4096 to split image; check destination free space
Cannot find disk in ClonezillaHardware RAID or NVMe driver missingLoad appropriate kernel modules; use lsblk to verify device visibility
Multicast session never startsClients not PXE bootingVerify DHCP/TFTP on DRBL server; check network and BIOS boot order
Corrupt image detectedDisk errors during save, bad storageRe-save the image; run ocs-chkimg to confirm; use -fsck flag
GPT image restored to MBR diskPartition table mismatchEnsure target uses GPT; use gdisk to convert if needed

See Also#

Sources#