19

I know this question has been asked before but I've tried all the usual fixes and nothing works.

Basically the hard drive had two partitions with Vista and Windows 7. I've deleted the Vista partition to make more room and expanded the Windows 7 partition to fill the drive (using GParted).

I've tried:

  1. Running Startup Repair - it doesn't find any problems.
  2. Setting partition to Active - worked.
  3. bootsect /nt60 c: - worked.
  4. BootRec /FixMbr - worked.
  5. BootRec /FixBoot - worked.
  6. BootRec /ScanOs - I get the message "Total identified Windows installations: 0"
  7. BootRec /RebuildBcd - I get the message "Total identified Windows installations: 0"

BcdEdit shows a Windows Boot Manager and a Windows Boot Loader, both on C: partition.

[Update]

  1. Rename BCD and rerun BootRec /RebuildBcd - worked.
  2. Copy bootmgr from DVD - blocked because the file's already there.

[Update 2]

I found an article here that mentioned some other commands.

  1. C:\chkdsk /f /r - worked.
  2. sfc /scannow /offbootdir=c:\ /offwindir=c:\windows - worked (see here).

What else can I try?

parsley72
  • 1,106

8 Answers8

7

I fixed it by:

  1. Back up the partition to an external drive (using GParted).
  2. Delete the partition.
  3. Reinstall Windows 7 on the (now empty) drive.
  4. Copy the contents of the partition over the fresh install of Windows (using System Rescue CD).

Windows now boots correctly and looks exactly the same as before.

parsley72
  • 1,106
6

I guess that you had Vista on the disk as partition 1 and then Windows 7 as partition 2, then deleted Vista, meaning that Windows 7 is now on partition 1.

Unfortunately, Windows identifies its partitions by their numbers, so that all partition references in the Windows 7 registry are now incorrect and unusable.

I believe that you will have to reinstall Windows 7. A simple Repair Installation should be enough, and will only refresh Windows and not disturb the installed applications.

Or, for the sneaky solution, you could create some small empty space on the disk before the Windows 7 partition and format it as NTFS, in effect recreating a surrogate dummy partition 1 that will restore the Windows 7 partition to its number 2 position on the disk. You might still need to do again Startup Repair.

[EDIT]

You could force Windows to recreate the BCD store partition by booting from the DVD into the Command Prompt option of Repair and entering :

bcdedit /export C:\BCD_Backup
ren c:\boot\bcd bcd.old
bootrec /rebuildbcd

In case of a permissions problem, use the command attrib bcd -s -h -r before the rename. Reboot, and if it doesn't work then do Startup Repair again.

Another desperate solution is to assume that bootmgr got corrupted and boot as above and do :

ren c:\bootmgr deletemelatter
bootrec /rebuildbcd
bootrec /fixboot

If nothing works, just reformat the entire disk and install from scratch. Not every problem can be analyzed or has a solution.

harrymc
  • 498,455
5

Please make sure that the Windows 7 Recovery partition is set as the active!!

I was having trouble because the active partition was set to C:\

3

This is just a clarifying comment on Narkevich's remark (I wanted just to add a comment but seemed to be barred from doing so

The reason you didn't need the /s x: option is that by default, bcd boot changes the bcd on the volume which is currently active. That's almost always what you want. If one specifies /s and a drive letter, then either 1. The drive letter is the active volume, and the command would do the same thing without /s x: as with it ;or 2. The drive letter is different from the current active volume. In this case what actually happens at boot time could only affected if either the bcd on the active disk is corrupt, and or 2. At some later time you change which disk is marked active to the one named after /s.

Cheers

3

Had the same issue and the below fixed it for me, assuming that you already know and started the rescue disk in Command Promt, I used the tool bcdboot.exe to recreate BCD:

bcdboot c:\Windows /l en-gb /s x:

Where x is the drive that has the System label.

1

Windows boot loader identifies partitions by offset in sectors + 4-byte disk signature in MBR. So when you moved your system partition with GParted, two odd things happened:

1) Disk offset of Win7 system partition changed, all references stored in BCD and SYSTEM registry hives are now broken.

2) Win7 system partition now has the same ID as WinVista system partition used to have, so two references now collide: bootloader with old settings tries to boot Win7 as Vista, but fails.

Basically you need to remove BCD registry hive and rebuild it from scratch, and also fix reference to disk C: in Win7's MountedDevices in SYSTEM registry hive.

Using Emergency Boot CD you can delete BCD in the "File Manager", then recreate BCD from scratch and fix MountedDevices in "Mount & Boot Center".

1

Try the fixes listed here: bootmgr is missing fixes

There are a whole number of various fixes. Solution #2 worked for me. Hope this helps others.

1

I want to improve the solution parsley72 gave:

Instead of copying the partition, install windows, then copy back:

You can boot to CD (either System Rescue Disk or windows set up disk) - I use the SRD to fix mine - then, select the Fix your windows option. It does the magic!

I think the reason is that you already have everything on C: (the restored OS, the MBR, etc.), the only thing left is for Windows to find the boot information (something only Windows software can do).

Logical huh?

Jan Doggen
  • 4,657
minh
  • 11