I bought a new laptop with Windows installed on it. I'm going to wipe all partitions and install Ubuntu.
One day I'll probably sell that laptop, so it'll be nice to recover it to the manufacturer state. I want to backup recovery partition, save it to some file and keep that in cloud. One day I'll restore it and reinstall Windows from the recovery partition.
What tools should I use to make it painless? I tried some Windows tools with my current laptop when I first bought it, but after 3 years I'm unable to recover the partition. I created the backup on Windows, so now I don't want to make the same mistake twice.
Here's the VeryEasyWay™ to do this:
I Would do this:
Change to ROOT mode from a Live CD/USB Preferrably, if not it will still work from a dual-booted Linux install. Open a terminal and type:
Then, find out which partition is your Windows via this command:
Mine shows this:
So in my case,
/dev/sda1
is the recovery bootloader (windows). They vary in size, mine was 100M but I have seen others for example if the image was installed with MDT then they are bigger.Next Disk Dump Backup the
/dev/sda1
partition to a file, and store it anywhere you want. In this case I saved it in my root folder's home directory:Remember that DD takes a long time to run, so wait until it finishes :)
That's it. To restore it, swap the if= and of= of the above command. :) Enjoy.
To Perform a FULL Backup of the entire Drive you can buy a USB Drive that is larger, and then save it to a
.dd
file in the bigger drive. This way if you break something, you can boot into the Live CD/USB and attach your external drive and restore.Full Backup to external drive:
Boot into Live CD/USB wait for ubuntu to load and then open a terminal
Plug in your external drive which is LARGER then the internal drive, ensure that it is NTFS or EXT3 or higher so that it can hold the large file. This is confirmed via running the command:
Then go ahead and partition it to Ext3 or Ntfs (doesn’t matter, but if you are using windows i recommend ntfs)
Confirm that it is mounted via
BACKUP THE HARD DRIVE to the EXTERNAL HARD DRIVE VIA (Notice the command is different from above):
And... if something goes wrong you can RESTORE THE EXTERNAL HARD DRIVE's
.dd
file to the INTERNAL HARD DRIVE VIA (Notice the command is different from above):This method which images the entire drive works flawlessly to backup any operating system, including any version of Windows. I've used it repeatedly over the years. The only possible downside is that you'll need to restore (and store) the image to a drive of equal (or greater) size due to not using compression. The upside is it takes very little of your time.