Clonezilla 101: creating disk images

I use Clonezilla, a live USB Linux environment, to back up my devices. It’s a great way to make full disk images from your desktop or laptop, and Clonezilla will also clone a disk from one device to another, both offline and over the network.

I’m making a tutorial video about Clonezilla right now, but I figured it would be a good idea to walk through the basic set-up and usage of the tool in a written form. Some of this might be complex for folks who haven’t done a lot of Linux work before, so hopefully this page can cover some of that.

What you need to get started

First, you’ll need a USB stick and the Clonezilla ISO.

You’ll need a USB stick of some kind for flashing the Clonezilla ISO, and I’ll explain more about how to flash the ISO in a bit. Clonezilla doesn’t take up much room, so you can probably get away with anything over a gig. Small drives are hard to come by nowadays, but I haven’t had trouble with a 32GB flash drive.

And yes, I’ve read reports that it appears to work with Ventoy. I’ll talk about Ventoy in some future post, but the long and short of it is that I’m old school, and tend to use (and recommend) classic tools with the best chance of working. Ventoy doesn’t work with every device I’ve tried it on, so I’m hesitant to recommend it for beginners. If you already use Ventoy, give it a shot.

The Clonezilla website has lengthy descriptions of how to make a bootable Clonezilla USB stick, but in my experience: I’ve always just opted for the stable ISO, then flashed it like any other Linux distro. Clonezilla’s download page lists the ISO as for CD/DVD usage, but goes into more practical examples in their documentation.

Second, you’ll need a disk or device you want to copy.

The second thing you’ll need is a disk to be copied, which I’ll call the source disk. I typically just leave the disk to be copied inside the computer, assuming the source computer is working, that is. But you can attach a source disk externally as well, albeit at the expense of whatever bottlenecks USB might cause.

You can even connect two machines remotely using the server functionality. I’ve had luck with this when copying one laptop to another, and these instructions will more-or-less work with the remote options as well.

In my experience, virtually any x86-based machine from the last 20 years will probably be compatible with Clonezilla. And yes, that includes 32-bit systems, VMs, and Intel Macs.

Last thing: a destination disk is needed.

You’ll need a separate destination disk of some kind, and the size of this disk should generally be equal to, or larger than, the source disk.

If you’re just cloning a drive from one physical device to another, without creating an image, just make sure the destination drive is larger than the source, and you can probably skip ahead.

If you’re creating a disk image – which is the mode I use the most – and you’re using an external hard drive for image storage, my recommendation is to format it for ext4 just for maximum compatibility in the Linux world.

That said, I’ve tested external drives formatted to NTFS and exFAT and those seemed to work OK as well. I would caution against FAT32 formatted drives only because large files can generally cause headaches on FAT32, but admittedly I haven’t tried it in a while with Clonezilla. YMMV.

Images can take up less space because they often don’t store empty space, but there’s so many caveats to that statement that frankly, it’s better to just always plan to use a large drive to store your images.

Choosing and flashing a Clonezilla version

While it’s possible to install Clonezilla as a program within a Linux distro, I typically use Clonezilla as a bootable USB stick. Clonezilla can’t make a proper backup from a drive that’s currently in use, so typically it’s just easier to boot Clonezilla into RAM from a USB stick.

To snag the ISO, head to clonezilla.org, and in the sidebar on the left, hit “Download”.

Then, I usually select the “stable” option, which is Debian based, over the “alternative stable” option, which is Ubuntu based. That’s because the Debian-based version has historically worked for older architectures, and even if it didn’t include non-free firmware, for my needs it’s usually worked out just fine. That said, it’s based on Debian Sid, not stable, so I’m guessing it’s doing OK on non-free firmware, and the recent version worked on everything I tested it on.

Then, you select the architecture. Most modern laptops will work with amd64, but if you have a very old laptop, try the i686 version.

Then, for the file type, I always select “ISO”. The “zip” file allegedly lets you copy the files directly to a FAT32 flash drive, but there’s a lot of gotchas in configuring that correctly, and you might run into problems with older machines booting it. The ISO on the other hand should be a much more stable experience, particularly if you have experience flashing boot media.

When you hit Download, it should download an .ISO file, which you should then be able to flash to USB using your preferred method.

If you’re coming from Windows, the program “Rufus” might be a good fit, and Clonezilla makes it look like you can just use Rufus’ defaults.

If you’re coming from a Mac or Linux, you could use dd, or Disks, or BalenaEtcher. System76 makes a good program for Linux called “Popsicle” that handles this really nicely. I especially like that Popsicle has a hash checker right there, perfect for verifying checksums.

If you’re still not sure about flashing ISOs, I made a video about doing so from Windows.

Booting Clonezilla and choosing a mode

I’m going to try not to recreate the Clonezilla step-by-step guide, as it’s very, very verbose and great if you want lengthy descriptions of each option.

Instead, I’m going to approach this part as a helpful guide to folks who might be unfamiliar with tools like this, and provide some reasoning behind the choices I make when using Clonezilla.

To start with, boot up your machine however you normally do it. I’ve been using a lot of Lenovo Think-stuff lately because of a volunteer project, and they appear to use the F12 key. The tradition is to restart the machine and mash that key repeatedly until you get a boot device menu.

A little computer and a keyboard next to it. A hand is repeatedly pressing the F12 key.

Your laptop or desktop may use a key other than F12. Try escape, delete, F1, F9, or reading the user manual for your device (if you can find it).

When you boot into Clonezilla, you’ll be presented with lots of options in a wizard-style utility. Choose a language and keyboard option and then hit “start Clonezilla” when prompted.

Then you need to select a Clonezilla mode, and for this I typically use device-image mode.

The Clonezilla mode selector screen, with "device-image" mode selected.

I typically use device-image as I think it offers the most flexibility for my needs, but here’s why I’d choose the others:

  • device-device is great if you’re cloning a drive to another drive on the same machine. But I rarely do this because it’s not going to resize the partitions the way I’d like, and I generally find it’s much easier to simply reinstall my OS or copy my files manually.
  • remote-source and remote-dest are very useful if I’m copying a machine to another machine over the network, or creating a VM from bare metal. I prefer the image-based solution for this though, since the image can also become a backup of a point-in-time configuration, and that’s super helpful. If you do go this “remote” route, keep in mind that Wi-Fi is a pain, so it’s best when doing this to wire the two devices into the network directly.
  • lite-server and lite-client can do larger deployments, and fun stuff like reimage a drive over PXE. If you’re reading this tutorial because you’ve never used Clonezilla before, you almost certainly don’t want to use these options.

The rest of this tutorial is going to assume you used device-image but the general gist of it is going to work for the other modes as well.

Clonezilla is a wizard, and it’s going to explain what it’s doing while it’s doing it. That’s very helpful, and again, I’m not going to share step-by-step screenshots since Clonezilla did that already.

Making an image with device-image mode

After choosing device-image mode, you have to choose where to save the image. Your options here are:

  • local_dev, which uses a local disk. This can be an external USB drive, or another internal drive on your machine. I typically use an external USB SSD.
  • ssh_server, samba_server, and nfs_server connect to a remote storage location using those respective protocols. This is great if you have a NAS. Again, Wi-Fi is a pain, so if you’re choosing this option, I recommend wiring your device into the network.
  • webdav_server and s3_server are great options for sharing over a wider network, but I think they’re more putzy to set up in the wizard. I personally do store images in s3-compatible storage, but I first send them to my local NAS and then back those up to the offsite location.

The other three options, enter_shell, ram_disk, and skip are options I’ve never needed to use, and I don’t think you’d want to either.

After selecting an option, Clonezilla will go through a series of prompts to help you connect your device to your live environment. Typically this is where I plug in the external USB drive or give Clonezilla credentials to access my remote storage.

After this you’ll need to mount a device (and optionally a subdirectory) as the folder /home/partimag, which is where Clonezilla stores your image. In most cases, this is the storage partition you just connected. Just make sure you don’t try to save onto the drive you’re cloning, nor the Clonezilla USB drive.

Then, you’ll be prompted to choose a wizard mode, and I typically choose “beginner” because honestly, the defaults are mostly fine.

When prompted if you want to save a whole disk or just a partition, I typically choose savedisk – the whole disk – because I generally use other tools to save individual files from partitions I care about. If you’re copying an OS from one device to another, you almost certainly want the savedisk option.

Then you name the disk image – which defaults to the current day and time – then choose the source disk to save.

After this you can choose a compression algorithm. Unless you know a reason to choose the alternative, just hit enter and choose the default.

And after this Clonezilla gives you the option to check and repair the file system. I typically say “no” to this with the -sfsck option, because I would prefer Clonezilla not to make changes to my source disk.

Then, Clonezilla will ask if you want to check the saved image for restorability; I usually say “yes” to this because it’s useful to know if the image is going to work OK.

After this, it’ll ask if you want to encrypt the image with a passphrase. Whether-or-not you choose this route depends on your own security needs- I typically encrypt these images, but you might not feel your data requires this level of security.

Lastly, the wizard asks if Clonezilla should shut down the computer when the operation is concluded, or whether it should reboot or return to a menu.

Then the wizard exits, and Clonezilla will give you a few prompts making sure you know what you’re doing. It might be worth it to read this part to make sure it looks like Clonezilla is doing everything you expected before proceeding.

After saying yes to the prompts, Clonezilla will do its thing (this can take some time), and alert you if there are any issues.

Restoring a Clonezilla image

Restoring an image is really much like creating one, just in reverse. Most of the above applies: boot up, mount a device as the image repository, and select the whole-disk mode (or partition mode if that’s what you chose).

Then, walk through the prompts to select your device to reimage. Note that the device you’re reimaging will be wiped clean.

If you’re restoring an OS to a different type of storage media – for instance, “physical to virtual disk” or “SATA to NVMe”, Clonezilla will do some chroot work and modify /etc/fstab to make things bootable. They can also change some /boot partition parameters to make things easier.

That said, there’s always a risk that something goes wrong. My advice is to practice restoring images before your livelihood depends on doing so.

Thanks for reading!

The written version of Veronica Explains is made possible by my Patrons and Ko-Fi members. This website has no ad revenue, and is powered by everyday readers like you. Sustaining membership starts at USD $2/month, and includes perks like a weekly member-only newsletter. Thank you for your support!