Restore Linux from a Windows Partition
If you are new to Linux, two things are probably true: you kept a Windows partition on your main computer and you will crash your Linux partition at some point. It happens. Everyone understands you need the Windows partition for work, games or just peace of mind, and every Linux user does something he’s not quite sure how to do and gets it wrong. That’s why every experienced Linux user you talk to tells you to backup your installation before experimenting with it.
Backing up sounds like a great idea. However, no one told you where to backup the installation. All the instructions for restoring the partition are for restoring from another Linux partition or from a Live CD. If you don’t have one of those, you’re stuck even if you did do the backup. That’s OK. You can use your Windows partition to restore Linux with qt4-fsarchiver and Wubi.
Of course, you will need a proper backup of your Linux installation first. As is always the case with computers, you need to prepare for the problem long before the problem arises. Go to http://sourceforge.net/projects/qt4-fsarchiver/files/source/ and install qt4-fsarchiver for Debian, Ubuntu, Linux Mint or Suse. Do it now. You can come back to this article later. (Yes, I know. You’re still here.)
Extract the tarball and check the readme file. You will need to install a long list of libs. Copy and paste the list into the command line to install them. Next, build qt4-fsarchiver from the source code by running qmake && make && sudo make install.
You will need to start the program from the command line as the root user with sudo qt4-fsarchive. It will open a graphical user interface. Select the Linux partition you want to backup in the Existing Partitions field. Choose a backup directory. Ideally, choose a directory on a different partition for the backup. If you don’t, move the backup file as soon as you’re done creating it. When you’ve choosen your locations, click Save Partition:
Now, you have a backup and you are free to experiment with your Linux installation. If you do something wrong and crash your system, boot into Windows. Download Wubi, the Ubuntu Windows installer, from http://www.ubuntu.com/download/ubuntu/windows-installer. Run the executable file and install a minimal Ubuntu installation inside your Windows partition. When you reboot into your Windows partition, you have the option to boot into Ubuntu. Do so and install qt4-fsarchiver in Ubuntu. When you run it this time, select “restore partition with fsarchiver.” Select the archive file and your Linux partition. Click Partition restore:
In a few minutes, your Linux partition will be restored exactly as it was before for you to try your experiment again. Just be more careful this time.

