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 trying to install Linux Mint alongside Windows 8 on my laptop, but the install disc did not recognize Windows, so I'll have to do a custom install, which is something I've never done, and I want to back up my Win install in case I screw up and I can't fix it with the boot-repair CD.

On my HDD first I have three hidden Windows partitions, the 2nd one being the boot partition, the C: partition which has Windows and important stuff that I want to back up, then the D: partition which is very large with media files and I don't care much for it, and then some empty space where I would put Linux at the end.

I want to backup the HDD using dd. I don't have enough space to back up the entire drive, but I can backup everything except the D: partition and the unallocated space. If I screw up the HDD during the Linux install, will I be able to restore the Win install from the dd backup? I don't mind if I lose data on the non-backed up partition. (Will the backup work if that partition gets corrupted in the meantime?)

share|improve this question
If you have Windows 8 preinstalled then you have gpt partitioning. You can only use dd with gpt if you copy entire drive as gpt has internal data in partition tables & partitions that you cannot separate. And dd not the best way to backup Windows. I have seen suggestions for Macrium and Drive Image XML. The issue with using anything other than Something Else is that entire hard drive may be overwritten. – oldfred Aug 3 '14 at 17:55
Why is dd not the best way? I'm wary of using non-command line software for this kind of stuff. – Zekoslaw Aug 3 '14 at 18:10 See post #12 on some of the issues with gpt GUIDs. And the disadvantage of dd is that it copies all blank space. You can use gzip to compress so you can do a full image. But then that would only restore entire drive to as is now. – oldfred Aug 3 '14 at 18:35
That seems fine by me, I would just keep an image on an external HDD in case the Linux installation fails, and delete it if everything works well. There wouldn't be any duplicate drives in existence. dd | gzip seems to be working well so far – Zekoslaw Aug 3 '14 at 23:16
up vote 1 down vote accepted

You can try:

sudo dd conv=sync,noerror bs=8k if=/dev/sda6 of=/home/backup-file

Then you can copy backup-file to external drive and later use it to get your saved data.

When later you want do that you would need to mount it, so run:

sudo losetup /dev/loop1 /home/backup-file

sudo mount /dev/loop1 /mnt/backup

If you have not much data to backup with low dispersion over the drives/partitions, if it's all rather in one or a few folders then wouldn't it be easier to save those folders/files straight to the external disk?

You can read more on all of these popular threads.

share|improve this answer
Thanks, that's a really thorough answer :) I've done this, but forgot to add conv=sync,noerror, and dd finished without errors. That means it went well, right? The reason I want to make an image of the drive is that I have a lot of specific programs installed and it would take less time to restore the image than to reinstall all those programs. – Zekoslaw Aug 4 '14 at 21:46
should be ok, noerror means continue after read errors so if didn't put it and have no errors, that's even better, means the drive is ok. – Ruslan Gerasimov Aug 4 '14 at 22:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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