Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

While trying to delete an Ubuntu partition from my hdd I accidentally rebooted my computer. (Note: the partition was originally made from an existing partition using paragon.)

After that when I tried to start the computer I got the GRUB rescue terminal prompt. I wasn't able to do much from that, but I did manage to boot Ubuntu from a USB drive and to run boot-repair.

But now when I try to select Windows 7 from the boot selection menu I get the error 0xc0000225.

Here is the link to the BootInfo summary created by boot-repair: http://paste.ubuntu.com/1032584/

I have a lot of very important data on my hdd and I would really appreciate your help.

The problem was solved with CHKDSK from the Windows 7 recovery CD.

Thank you all for your help.

share|improve this question
    
Are you able to boot into the windows safe mode? –  Ravi Jun 9 '12 at 20:33

5 Answers 5

up vote 2 down vote accepted

If you have the windows 7 CD, you need to boot from it, and choose Startup Repair .

enter image description here

If you don't have your Windows 7 Cd, you can download a Windows 7 Recovery Disc, you can download it. Click the desired architecture:

32-bit (x86)

64-bit (x64)

share|improve this answer
    
I don't have the cd and i was hoping that i can do something from the live usb. I can't download the windws cd because on my usb i have only 4 gb ( and 1 is taken by the linux). Do you know how i can use my hdd for the download? –  N Alex Jun 9 '12 at 21:13
    
Can you use a friend's machine to do that? –  Mitch Jun 9 '12 at 21:22
    
I can, but I was hoping I could use my hdd to download on but I'm not sure how. It wold be easier for me and faster. –  N Alex Jun 9 '12 at 21:25
    
Well, when you go to the site and download the right file, just save it to your hard drive, and then you have to burn it on CD. –  Mitch Jun 9 '12 at 21:41
    
Yes, that's what I am trying to do but it seems that i can't see my hard drive from the live usb. –  N Alex Jun 9 '12 at 21:42

Apparently when you rebooted during the middle of a partition operation ... always a very dangerous thing to do ... you corrupted the partition table in your Master Boot Record (MBR).

The BootInfo summary which was created when you ran boot-repair shows the output below from fdisk starting around line 478 of your pastebin.

omitting empty partition (5)

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xab0f55ce

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda3       105064448  1195399743   545167648    0  Empty
/dev/sda4      1195399761  1250259583    27429911+   f  W95 Ext'd (LBA)
/dev/sda5      1195399763  1250259583    27429910+  83  Linux

While I am not sure what is the precise meaning of the message omitting empty partition (5), this answer on SuperUser which in turn links to this post in the Ubuntu forums where it is claimed that

  • Any time fdisk reports "omitting empty partition (X)", unfortunately that is a sure sign that your partition table is corrupt ...

Notice that sda3 has a partition type (Id) of 0 or Empty. Since sda3 is your Windows 7 NTFS partition, the Id should be 7 or HPFS/NTFS/exFAT the same as it is for sda1.

This may be why you can not boot Windows 7. I think the Windows boot process still relies on the values in the MBR partition table being "correct". I think it just gives up if things don't "look right".

I am not sure what to suggest. The obvious first thing would be to create whatever type of a backup you can before you risk doing something that may increase your drive's corruption rather than repairing it.

After trying to save your data "just in case" you might try using testdisk.

You should be able to boot your Live USB and then install testdisk with
sudo apt-get install testdisk.

I would suggest starting with sudo testdisk -l /dev/sda just to see what it returns. After that perhaps the "TestDisk Step By Step" web page might help?

share|improve this answer
    
Thank you, but firstly i am trying to run chkdsk from windows. In the meantime i was able to get an windows cd. –  N Alex Jun 9 '12 at 23:12
    
@NAlex Your first problem is NOT at the file system level and I'm not sure CHKDSK will do any good at this point. But it's your data ... –  irrational John Jun 9 '12 at 23:20
    
That was the previous advice I received. Now CHKDSK is running for almost an hour, do you think I should stop it? –  N Alex Jun 9 '12 at 23:26
    
@NAlex I don't really know enough to say. I'm somewhat amazed that Windows was happy enough with the current partition table entry to allow CHKDSK to run. Which partition are you running it again? sda3, your main Windows partition? What type of output is CHKDSK producing? Did you boot the Windows DVD to a command prompt? –  irrational John Jun 9 '12 at 23:31
    
I got this screen. i.stack.imgur.com/8vpS8.png Then I have chosen Startup Repair. Windows attempted to repair but wasn't successful, restarted and now is saying something like "Attempting repairs... Repairing disk errors. This might take over an hour to complete". –  N Alex Jun 9 '12 at 23:33

You have just deleted ubuntu drive without removing mbr.

Fix it following - http://helpdeskgeek.com/how-to/fix-mbr-xp-vista/

share|improve this answer

Boot your system with external CD / USB drive which contains Linux (Ubuntu). When the system is ready, plug in the USB drive and copy your required data. Then reboot your system with Windows 7 CD drive. Go to repair, where you will find command prompt. Type /fixmbr.

This will fix your master boot record for Windows 7. Then login in Windows 7, right click on My computer -> Manage -> Disk management. You will find your Linux partition. Simply remove it from there.

Hope it helps you.

share|improve this answer
    
I can't acces my hard disk from my live usb. Do you have any idea how i can acces it? –  N Alex Jun 9 '12 at 21:14
    
In your case '/dev/sda5' is your Linux partition, try to mount it by '# mount /dev/sda5 /mount/mylinux' then try, if it not works then press 'alt + F2' type 'computer' you will find computer icon click on it, it will show what are the drives in your has check whether its showing your Linux partition. Try to open it your Linux partition from there. –  Sunny Yadav Jun 10 '12 at 7:57

Your issue about restoring your Windows 7 partition has already been answered by Microsoft. There are three commands that you need to invoke after you have inserted the Windows 7 boot disk and started the Repair option. Here is the link for your consideration.

share|improve this answer

Your Answer

 
discard

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.