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

Here is what happened:

  • Don't have enough space on my Windows partition
  • Delete the stock "recovery" partition to make space
  • Enlarge the Win partition
  • Software messes up the Windows boot
  • Go under Ubuntu to fix the problem
  • Try to fix the Win7 MBR with ms-sys -7
  • Upgrade to Natty at the same time
  • Flush the old GRUB, in the process, put a new one
  • grub-mkconfig doesn't detect Windows
  • Make up a Windows booting entry
  • Try booting Windows
  • Receive error "Invalid partition table"

Now I don't have any OS CD/DVD (Windows, Linux), so I have to work with what I have.

Here is my Boot Info Script

My Windows partition is on /dev/sda1, but probably messed up in some way, and my GRUB script says this:

menuentry "Windows 7 (loader)"{
    set root=(hd0,1)
    chainloader +1

How do I make Windows 7 boot again?

share|improve this question
So I went and fixed my Windows partition (so "Invalid partition table" isn't an issue anymore), I have only yet to figure out how to boot it. (I think) I have GRUB on the MBR, so that's not the problem, but the Windows7 bootloader is gone (to which I would have to use bootrec /fixboot under Win). The question really is: Can a bad Windows 7 boot sector/loader (not MBR) be fixed using Linux? (such as having the equivalent of fixboot in a Linux application) – jonallard Jun 23 '11 at 17:52

Go download one of the Windows 7 ISO images and burn it to DVD.

Then you need to boot to the recovery console, and use the BCDEdit Command: (not specifically your problem, but tells about how to fix boot problems)

What happened is when you deleted the partition, you threw off the boot information stored in the BCD store (same function as the old boot.ini)

share|improve this answer
I don't have any DVDs and I don't think I can burn a DVD. I'm looking for a way to do it without the recovery CD or Windows CD. Also, I didn't delete the partition, but resized it. – jonallard Jun 23 '11 at 3:01
@jonallard What you are describing, you will never solve without a DVD. You need a tool you just do not have: BCDEdit. Get a friend to burn it for you if you have to. – KCotreau Jun 23 '11 at 3:29
"Invalid partition table" has nothing to do with the BCD store. – JdeBP Jun 23 '11 at 12:39
@JdeBP I agree, but he ALSO changed where the BCD tries to boot from when he deleted that utility partition FIRST, which led to him going further, and then making it worse. I should have addressed that too in my answer, but I am not wrong with regards to him needing BCDEdit. – KCotreau Jun 23 '11 at 14:08
Xe probably didn't change the BCD mapping. (BCD is Boot Configuration Data. It isn't an active entity. It is MS Boot Manager that boots.) Xe probably deleted it outright. That "stock recovery partition" was probably, in addition to being the tool for recovering from this very situation, a Windows 7 System Reserved partition, which is actually the Windows 7 boot volume. But finding that out requires fixboot first, to discover whether MS Boot Manager was on that or the now remaining volume. – JdeBP Jun 23 '11 at 14:24

"Invalid partition table" has nothing to do with the BCD store. It's an error from MBR bootstrap code that indicates that the MBR partition table information has undefined status bytes for one or more primary partitions. It's actually quite hard to get and still have something that everything else considers to be a valid partition table, as here.

Looking at the information you supplied, it becomes apparent that for some reason you have MBR bootstrap code in the VBR of your first primary partition. Naturally, that MBR code cannot find an embedded partition table. (It just finds some scrambled data from the real VBR that you overwrote.) You probably overwrote the VBR with that ms-sys command.

It's fixboot in the Windows recovery environment that you should be looking at, not fixmbr. Of course, you've just deleted your recovery environment. …

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.