Open-source disk imaging and cloning tool for bare-metal backup, mass deployment, and disaster recovery.
Table of Contents#
- Overview
- Editions and Downloads
- Booting Clonezilla Live
- MBR vs GPT Considerations
- Creating a Disk Image (Interactive)
- Restoring a Disk Image (Interactive)
- Device-to-Device Cloning
- Command-Line Usage
- Clonezilla SE and DRBL Setup
- Backup Verification
- Advanced Features
- Troubleshooting
- See Also
- 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#
| Edition | Use Case | PXE Support |
|---|---|---|
| Clonezilla Live | Single-machine backup and restore | No (boot from USB/CD) |
| Clonezilla SE (Server Edition) | Mass deployment to many machines | Yes (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
syncAlternatively, use tools like Ventoy, Rufus (Windows), or Etcher.
3. Booting Clonezilla Live#
- Insert the bootable USB or CD/DVD.
- Boot the target machine and select the Clonezilla media from the boot menu (often F12, F2, or Esc at POST).
- Select a language, keyboard layout, and then Start Clonezilla.
- Choose the operation mode:
device-imageordevice-device.
4. MBR vs GPT Considerations#
Understanding the partition table type is critical before imaging or restoring.
| Aspect | MBR (Master Boot Record) | GPT (GUID Partition Table) |
|---|---|---|
| Max disk size | 2 TB | 9.4 ZB (effectively unlimited) |
| Max partitions | 4 primary (or 3 primary + 1 extended) | 128 (default) |
| Boot mode | Legacy BIOS | UEFI (can also work with BIOS via protective MBR) |
| Partition ID | Byte 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>orsudo parted /dev/<device> print.
5. Creating a Disk Image (Interactive)#
- Boot Clonezilla Live and select Start Clonezilla.
- Choose device-image.
- Select the image repository location (local disk, SSH server, Samba share, NFS, etc.).
- Choose Beginner or Expert mode.
- Select savedisk (full disk) or saveparts (specific partitions).
- Name the image and select the source disk/partitions.
- Choose compression level and whether to check/repair the filesystem before imaging.
- Confirm and wait for the process to complete.
6. Restoring a Disk Image (Interactive)#
- Boot Clonezilla Live and select Start Clonezilla.
- Choose device-image.
- Connect to the image repository.
- Choose Beginner or Expert mode.
- Select restoredisk or restoreparts.
- Select the image and the target disk/partition.
- Confirm the operation (target will be overwritten).
7. Device-to-Device Cloning#
- Boot Clonezilla Live and select device-device mode.
- Choose Beginner or Expert mode.
- Select disk_to_local_disk or part_to_local_part.
- Choose the source and target devices.
- 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:
| Flag | Description |
|---|---|
-q2 | Use partclone (default, fastest) |
-c | Client waits for confirmation before starting |
-j2 | Clone hidden data between MBR and first partition |
-z5p | Use zstd parallel compression |
-z1p | Use gzip parallel compression |
-z0 | No compression |
-i 4096 | Split image into 4096 MB chunks |
-sfsck | Skip filesystem check before saving |
-senc | Skip encryption |
-p poweroff | Poweroff after completion (reboot, true for prompt) |
-k1 | Proportional 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 sda9. 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 -iStart 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:
| Parameter | Description |
|---|---|
--clients-to-wait <count> | Number of client machines to wait for before starting |
--max-time-to-wait <seconds> | Maximum seconds to wait for clients |
startdisk | Operate on whole disks |
multicast_restore | Use 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/partsTest Restore#
The safest verification is a test restore to a spare disk or virtual machine. In a VM:
- Create a VM with a disk at least as large as the original.
- Attach the Clonezilla ISO and the image storage.
- 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 sdaCustom 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 restoreImage Conversion#
Convert between formats:
# Convert a savedisk image to a smaller format
ocs-cvtimg-comp -b -z5p <image-name>Troubleshooting#
| Issue | Cause | Solution |
|---|---|---|
| Image restore fails on smaller disk | Partitions exceed target capacity | Use Expert mode with -k1 flag for proportional resize |
| UEFI system won't boot after restore | EFI boot entry not updated | Boot Clonezilla, mount ESP, run efibootmgr to recreate entries |
| Image save fails midway | Insufficient space on repository | Use -i 4096 to split image; check destination free space |
| Cannot find disk in Clonezilla | Hardware RAID or NVMe driver missing | Load appropriate kernel modules; use lsblk to verify device visibility |
| Multicast session never starts | Clients not PXE booting | Verify DHCP/TFTP on DRBL server; check network and BIOS boot order |
| Corrupt image detected | Disk errors during save, bad storage | Re-save the image; run ocs-chkimg to confirm; use -fsck flag |
| GPT image restored to MBR disk | Partition table mismatch | Ensure target uses GPT; use gdisk to convert if needed |