Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 was trying to dual boot my windows machine with ubuntu 10.04. While I was making swap space, something bad happened and my system automatically restarted. Now it shows, "Error loading operating system". Please help me in recovering my windows partition. Its very urgent. Now ubuntu is also not installed and i dont know what happened to windows.

share|improve this question


I strongly suggest you make an image of the whole disk before doing anything on it, as any change can only make it worse.

There are many things that could have gone wrong, but take a look at the procedures outlined here:

Basically, start using Live CD and try to recover. If you did not do any damage (like replacing Windows partition with your swap partition or something similar), this should be OK.

Be very careful about what you are doing - a small typo can ruin everything, even if there's a chance for you to fully recover.

share|improve this answer
Say if I have made swap space over windows, will I be able to recover my data using testDIsk. Please provide me some way to recover my data. Its really very important – user38934 Nov 20 '10 at 18:27
Unfortunately, if you overwrote your Windows partition, the chances of data recovery are probably very slim. But let's not jump to conclusions - if you used the usual OS installation and followed the instructions, you probably did not. I am more keen to suspect you just did not have the boot loader installed as the installation crashed in the meantime. Boot the Live CD, open the terminal and do fdisk -l - if you see any of the partitions listed as HPFS/NTFS or similar, you are probably good, especially if you also see Linux swap and such. – Nov 20 '10 at 18:37
From LiveCD, fdisk -l shows nothing. – user38934 Nov 20 '10 at 18:52
Try sudo fdisk -l – Nov 20 '10 at 18:55
Ya I think I have lost all data, fdisk is showing only two partions now: one as /dev/sda1 "Linux Swap / Solaris" and other one as /dev/sda2 "Compaq diagnostics" – user38934 Nov 20 '10 at 19:10

How were you making swap space? Was this part of the Ubuntu install process or were you trying some other way?

If the Windows install is important to keep you could try booting from a Windows CD and using the repair/recovery process.

share|improve this answer
I was trying to make swap space by myself but within ubuntu installation. I specified some 1500 MB for swap space and then it was showing progress bar for resizing partition. – user38934 Nov 20 '10 at 18:29
If Ubuntu resized your Windows partition, this is bad. – harrymc Nov 20 '10 at 18:41

I do hope that you have not by mistake allocated the swap partition on top of Windows.

Use Paragon Partition Manager 11 Free Edition to have a look at your partition table and let us know what you see. If there are any interesting screens, you might even take photos of them with a digital camera and post them here. With this utility you can also manipulate partitions, but that is for when we decide what to manipulate.

As general comment: You can use a boot CD such as GParted Live to have a look at your partitions. It contains TestDisk which is designed to help recover lost partitions and/or make non-booting disks bootable again.

Have a try and let us know how it goes. (Just be careful not to destroy the disk further.)

share|improve this answer
Say if I have made swap space over windows, will I be able to recover my data using testDIsk. Please provide me some way to recover my data. Its really very important – user38934 Nov 20 '10 at 18:28
Try first Partition Manager 11 Free Edition (link above) to see the partitions table, and we can then advice you more. – harrymc Nov 20 '10 at 18:44

Your Master Boot Record (MBR) may be damaged. Here are some potentially helpful links for fixing this type of problem:

  1. Windows XP wont boot - MBR problem?
  2. How to fix MBR in Windows XP and Vista

Google searching for "Error loading operating system" mbr and fix mbr xp may also bear fruit. Best of luck.

share|improve this answer

Sounds like you overwrote the Windows partition with swap. If you're lucky, you only overwrote the boot sector - if so use a Windows XP CD and select the "repair installation option".

If not, you may be able to find some data using several available tools, such as Test Disk:

share|improve this answer

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.