Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a new Linux user. I've reinstalled my Wubi from scratch at least ten times the last few weeks because while getting the system up and running (drivers, resolution, etc.) I've broken something (X, grub, unknowns) and I can't get it back to work. Especially for a newbie like me, it's easier (and much faster) to just reinstall the whole shebang than try to troubleshoot several layers of failed "fixing" attempts.

Coming from Windows, I expect that there is some "disk image" utility that I can run to make a snapshot of my Linux install (and of the boot partition!!) before I meddle with stuff. Then, after I've foobar'ed my machine, I would somehow restore my machine back to that working snapshot.

What's the Linux equivalent of Windows disk imagers like Acronis True Image or Norton Ghost?

Note: I found a similar question here.

share|improve this question
Torben, under the Wubi folder (usually C:\UBUNTU, but may be some other drive & folder), you'll find not only the loopback disk images created for your Ubuntu install, but also some other important files (like the Wubi loader). Sorry if it's a guess, but I think it's an educated one. ;-) Maybe ('cause I really have never tried - sorry - but wouldn't hurt if you try it - I would) if you backup that folder while the system is in a good state, you can take Wubi back by replacing the good state over the non-functional one. – Charles Roberto Canato Jan 3 '11 at 20:34
Please post this as an answer, because it sounds like a good way, specifically for Wubi installations! After my last fubar I installed a "real" Ubuntu, not Wubi, so this little trick will go into my drawer for next time I find myself in that spot. – Torben Gundtofte-Bruun Jan 3 '11 at 20:47
You can just copy the files and the master boot record (…) and you'll be fine. – con-f-use Aug 16 '12 at 11:45
What do you mean? Can you please explan. I need thoes packages and files also. – BigSack Aug 16 '12 at 11:46

11 Answers 11

up vote 54 down vote accepted

It's Clonezilla Live:

The tutorial for Clonezilla can be found here.

share|improve this answer
+1 Safer way of doing it. dd is little dangerous to use. – Bhargav Nanekalva Jun 6 '14 at 11:04

dd is the low level utility that you can use to accomplish this task, it essentially a low level byte-for-byte copy utility. If you want the "UNIX" way of accomplishing this, then read on.

All references to the file system and hard disks are located locally on the virtual /dev/ filesystem. There are a multitude of "nodes" in /dev/ that are interfaces to almost all the devices on your computer. For example, /dev/hda or /dev/sda would refer to the first hard drive in your system (hda vs sda depends on the hard drive), and /dev/hda1 would refer to the first partition on your hardrive.

The most straight forward way to make a raw image of your partitions is to use dd to dump the entire partition to a single file (remember the OS access the partitions /dev/sda1 through a file interface). Make sure you are on a larger partition or on a secondary drive and perform the following command
dd if=/dev/hda1 of=./part1.image to backup(repeat for different partitions)
dd if=./part1.image of=/dev/hda1 to restore

You can use the exact same command to backup the entire hard disk (replace hda1 with hda). You can then use any compression program (gunzip, zip, bzip) to compress the file for storage. You can use this same technique to make rote copies of entire partitions to make clones of your computer.

There is one limitation though, when restoring the backup, the partition needs to be the same size (or bigger) as the partition you took the image from, so this limits your options in case of a restore. However, you can always expand the partition after you've restored the backup using gparted or parted. The picture gets even muddier when you are trying to restore entire disk copies, however, if you are restoring the backup to the same exact hardrive you don't need to worry about this at all.

However, if you want a "friendlier" utility ala norton ghost then this suggestion might not be for you.

share|improve this answer
I almost expected there to be a built-in tool for this, but I also expected that tool to be ... not-so-noob-friendly :-) This is probably a good solution, once I get more Linux experience. – Torben Gundtofte-Bruun Jan 3 '11 at 20:56
Also check out ddrescue. Maybe with SystemRescueCd. – webwurst Jan 25 '13 at 9:30
Will dd work if I need to take a snapshot of a virtual machine and install it on another virtual machine? What if some files (like /etc/hostname) have to be different on both machines? – Thomas Jan 29 '13 at 15:20
@Thomas for virual machine images you better use corresponding VM Manager built-in functionality e.g. Export image in Virtual Box. – tommyk Aug 19 '13 at 12:07
Does the restoring hdd has to be of same size? What if I make image of a 80gb disk and dump it on a 100gb one? – Bibhas Sep 18 '13 at 14:27

The "dump" and "restore" backup utilities in the Ubuntu repositories provide you with the ability to backup and recover an entire system's "system state".

The "dump" and "restore" utilities can be installed from the repositories using:

sudo apt-get install dump

Below are links to the Man pages:

In your case, you could backup the system to a portable drive:

dump -0uan -f my_file /

For recovery you would need to:

  1. Boot from your Ubuntu live CD/DVD/USB.

  2. Install the dump utility.

  3. Mount your hard drive.

  4. Restore (i.e. restore -r -f my_file /my_mount).

Note: If you are restoring to a new disk you will need to install your bootloader (GRUB).

More information can be found at Move linux to another hard drive (dump, restore, backup)

share|improve this answer
How to restore from this if i fail to login to my ubuntu? – BigSack Aug 15 '12 at 6:21
here is the process for recovering, or moving, a system using the dump and restore commands as above.… – Sparky Aug 15 '12 at 6:33
@virtual.stack - the answers would sound much better if you may provide a little how to on taking and restoring backups , using this method :) – atenz Aug 15 '12 at 6:48
@tijybba - Sorry, I have updated the response. Please let me know if this is now clearer. Regards. – Sparky Aug 15 '12 at 7:04
While I am a fan of dump, it is not an image based backup. – psusi Apr 21 '14 at 14:54

We have a GUI available in Ubuntu, called 'Disks' (gnome-disk-utility) and comes default in later Ubuntu.


sudo apt-get install gnome-disk-utility

enter image description here

share|improve this answer
If the live CD is x86 (because the CPU is x86), then creating image fails quickly at around 2GB, where 32-bit signed numbers underflow. I'm trying dd now to see if it has the same bug. – Shahbaz Jan 3 at 17:56

There also Ghost for Linux, but Clonezilla is the better option - it's more up to date. The latest version of Ghost for Linux is listed May 2009, while Clonezilla's latest version was posted in November 2010. One minor limitation of Clonezilla compared to Ghost is that you can't resize the partition on restore, while Norton Ghost can.

You probably won't need it, but Clonezilla also supports multicasting.

share|improve this answer

You can do exactly what you need using CloneZilla

share|improve this answer
Does it clone, my 320gb Hardrive on my 8gb pendrive? – BigSack Aug 16 '12 at 11:49
It should. Since you said that your total installation size is only 500mb. – Mitch Aug 16 '12 at 12:36

I would recommend RemasterSys for this Task.enter image description here

It creates iso for your installtion, Backup user Date with Deja Dup.

share|improve this answer

Using "Dump" and "Restore" is one solution, as indicated by virtual.stack.

However you might be interested in using Clonezilla if you have an external USB hard disk drive or a NAS. You just have to download an ISO image by clicking here (you can access the global download page here), burn it with "Brasero". Boot from Clonezilla Live CD and perform a backup (disk or partition to image) of your main hard disk drive (with your healthy Ubuntu). Please note that you can't backup the partition you have mounted as backup destination (quite logical). If your system is broken, you just have to boot again with Clonezilla Live CD and perform a restore of your system. Don't forget that Clonezilla makes snapshots, so if you have your data ("/home", "/etc", ...) on the same disk/partition as Ubuntu system, you'll get back the one from the backup and loose what has been done since that backup was performed...

You can find a tutorial for Clonezilla Live here : How to Use Clonezilla - Tutorial

You can also use "Back In Time (backintime-gnome)" (available from Ubuntu Software Center) or else (Déjà Dup, ...) alongside to get a backup of your data. You just have to include ("/home", "/etc", "/var", "/usr/local", ...) in the backup profile. Like that you can get back your healthy system with Clonezilla and then your latest data with "Back In Time" or else.

share|improve this answer

If you're using Wubi, why don't you just boot into Windows and copy the root.disk file?

Then restoring is as easy as renaming root.disk to something else, and renaming the copy to root.disk.

share|improve this answer

UPDATE November 2015

The new Remastersys is Pinguy Builder and there is also an app called Systemback which I prefer personally. Here is how you can install it:

sudo add-apt-repository ppa:nemh/systemback

sudo apt-get update

sudo apt-get install systemback

UPDATE 05.01.2015

The link I provide in this and other instructions in step 2 does not work anymore. However, I had downloaded the Remastersys files before the website shut down and they can be installed perfectly through Ubuntu Software Center. !! I am not sure if the files are available in Ubuntu Software Center, but if you have them on your computer, they can be installed through it.

You need a program that can produce an iso file, and this is Remastersys.

This set of instructions helped me install and run successfully remastersys on Ubuntu 14.04.1 32bit and also successfully create and use a bootable flash drive with the custom iso I made.

Note: a flash drive works unless you manually made an upgrade of the kernel for some reason before making an image of the system.

  1. Press Ctrl-Alt-T and run

sudo apt-get install plymouth-x11

  1. Go to this link and download remastersys version for 32bit or 64bit system

IMPORTANT: I downloaded version 3.0.4-1 i386 and it WORKS I checked 3.0.2- version and it doesn't work.

  1. Open Programs and Updates (search in Dash or in the System's parametres)

  2. In Programs and Updates, go to Other tab and press Add...

  3. Copy/paste this

deb precise main

and press OK

  1. Now look for two lines with "" in the list you can find on the Other tab and make sure you check both boxes. Enter a password if you are asked to.

  2. Press Ctrl-Alt-T and run

sudo -i

apt-get install remastersys-gui

  1. To open remastersys-gui, you always need root priveleges. So do it in the terminal (Ctrl-Alt-T)

sudo -i


share|improve this answer

You can use Clonezilla

  • Download Clonezilla live CD
  • Burn the iso file to a CD
  • Once you finish your initial machine reboot and start your Clonezilla Live CD and make a clone from your initial harddisk to others.

Check these screenshots here and be free to ask in details for any ambiguous menu

You can also use Ghost for Linux G4l.

download iso from here then burn to Cd and use it Live CD.

share|improve this answer
i have installed some softwares on one box. I have other blank boxes. I have downloaded Clonezilla and burned it to a CD. I want all the systems on other boxes to be exact clones of the first with all the softwares. How do i proceed in this situation? – prasad.surase Apr 6 '14 at 8:15

protected by Braiam Mar 5 '14 at 23:46

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.