Link to home
Create AccountLog in
Avatar of aintgot1
aintgot1

asked on

Can't Repair Windows 7

Greetings,

I'm having a problem trying to repair Windows 7 Home Premium. I've tried the  
bootrec /fixmbr, bootrec /fixboot and bootrec /rebuildbcd options with no luck. I'm at this point when the laptop boots now.

File: \Boot\BCD
Status: 0XC0000098
Info: The Windows Boot Configuration Data File does not contain a valid OS entry


When I try the repair option, it does not find an OS. When I removed the HD and connected it to another computer, I can see all the files and there are files in the Windows folder. The system partition is marked active also. My guess is that the boot manager can't find the boot files and I'm not sure how to correct this.


Thanks,
Mike
ASKER CERTIFIED SOLUTION
Avatar of aadih
aadih
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of n2fc
Hi,

EBCD is the answer since you are missing the bootmanager. In this link is described step by step what to do.
Have you run scandisk yet?  That's one of the first things to do.
Of course, you need to get into a command line to run it and may need to boot from a CD to do so.
Try this.

1)Set the attributes and rename the old bcd
Attrib –r –h –s C:\Boot\BCD
Ren C:\Boot\BCD    BCDOLD

2)  Create new BCD
Bcdboot.exe C:\Windows /s C:

Regards,
TonyP
Run this command in Winre

bcdedit

take a screenshot from your cell phone and upload it here.

Also make sure the hard drive boot mode option in bios is correct..like ahci, raid, legacy etc.




Ded9
Usually when the installed OS can't be found, the drivers for the disk controller are missing. If you booted to those tools you tried by using installation media, for example the Windows DVD, you will have to add the driver before you start the repairs. Just unpack the driver files to a USB stick and the load it. After that chances are that the installation is seen.

Another option to try if the above doesn't help is to check the settings in your BIOS and change your controller's mode from AHCI, SATA, RAID or similar to something like compatibility or IDE mode, as then no drivers are needed.
Avatar of aintgot1
aintgot1

ASKER

Try this.

1)Set the attributes and rename the old bcd
Attrib –r –h –s C:\Boot\BCD
Ren C:\Boot\BCD    BCDOLD

2)  Create new BCD
Bcdboot.exe C:\Windows /s C:
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tried that and got a Failure to copy boot files.

Thanks,
Mike
See: http://h30434.www3.hp.com/t5/Other-Desktop-PC-Questions/The-Windows-Boot-Configuration-Data-File-does-not-contain-a/td-p/308368

You need to do a startup repair...

More info here:
http://www.bleepingcomputer.com/tutorials/tutorial148.html
(Although above refers to Vista, WIN7 operates the same way)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tried that many times, the problem is it does not find an OS to attach to.

Thanks,
Mike
Save your data and files.  And reinstall the OS.
   ~~~~~~~~~~~~~~~~~~~~~~
Not an option at this point. I will save that as a last resort when all other options are exhausted.

Thanks,
Mike
Make sure the right partition is set as active parition...parition that has folders like windows, program files etc...is the correct partition. Can also check the disk size.

http://www.sevenforums.com/tutorials/197157-partition-mark-inactive.html

Method 2
http://www.sevenforums.com/tutorials/71432-partition-mark-active.html



Ded9
Make sure the right partition is set as active parition...parition that has folders like windows, program files etc...is the correct partition. Can also check the disk size.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If I mark the partition where Windows resides, I get the "Boot Manager is Missing".
If I mark the 200MB System partition active, I get:

File: \Boot\BCD
Status: 0XC0000098
Info: The Windows Boot Configuration Data File does not contain a valid OS entry

Thanks,
Mike
Run bootrec /rebuild on the parition that holds windows folder.

Then try the active partition step.

Post results of bcdedit




Ded9
Did you look at the EBCD link above?
Run bootrec /rebuild on the parition that holds windows folder.
    ~~~~~~~~~~~~~~~~~~~~~~~~~
How do you run that command on that specific partition?
I have run bootrec /rebuildbcd many times with no results.

Thanks,
Mike
< Not an option at this point. I will save that as a last resort when all other options are exhausted. >

Of course, Mike.
Correction

Run bootrec /rebuildbcd on the parition that holds windows folder.

let says you are on C drive and D drive holds windows then type D: . You will get D:/> now type bootrec /rebuildbcd

Then try the active partition step.

Post results of bcdedit




Ded9
Run bootrec /rebuildbcd on the parition that holds windows folder.

let says you are on C drive and D drive holds windows then type D: . You will get D:/> now type bootrec /rebuildbcd

Then try the active partition step.

Post results of bcdedit
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ok, did that. Running on partition where Windows is and changing that to active gives me Boot Manager is missing. Changing active to system partition gives me original error message.
I was finally able to get the results of the bcdedit. The first picture (CAM00326) is the Windows partition.
The second picture (CAM00327) is the system partition active.
CAM00327.jpg
CAM00326.jpg
Have you run scandisk yet?  That's one of the first things to do.
Of course, you need to get into a command line to run it and may need to boot from a CD to do so.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running CHKDSK returned no errors. That was one of the first things I tried.

Thanks,
Mike
Looks like you have executed the commands from x drive (might be Cd drive or recovery parition_)

Type C: or D:  to get C:\> or D:\>  then type bcdedit

Check this link for screenshot of the bcdedit output.

http://www.sevenforums.com/tutorials/2676-bcdedit-how-use.html

If possible post screenshot. Run it from C:\> and  D:\>  

If you  ran startup repair then copy log file  to a pen drive and attach it here.

Windows\System32\LogFiles\Srt\SrtTrail.txt

Can refer to this article for more info

http://technet.microsoft.com/en-us/library/dd744291%28v=ws.10%29.aspx




Ded9
Type C: or D:  to get C:\> or D:\>  then type bcdedit or any ohter commands

~~~~~~~~~~~~~~~~~~~~~~~~~~
Ok, this is from the E partition where the Windows folder is.
CAM00328.jpg
Run bcdedit from C and D. Post screenshots for C and D .

I think its not the E drive. E drive looks like a recovery partition.


If you  ran startup repair then copy log file  to a pen drive and attach it here.

Windows\System32\LogFiles\Srt\SrtTrail.txt

Can refer to this article for more info

http://technet.microsoft.com/en-us/library/dd744291%28v=ws.10%29.aspx



Ded9
Comment edited


Ded9
I'll be back in a about an hour with some more screenshots and that log file.

Thanks,
Mike
Upload the files i will check them later.(6-7hrs)


Ded9
I have uploaded the screenshots for both C, D and E as well. I also attached the log files that were in the Temp folder the is on the C partition. I also attached the same log files that were in the Windows folder where you directed me to get them. I also attached a screenshot of the repair result.

Thanks,
Mike
CAM00330.jpg
CAM00332.jpg
CAM00333.jpg
CAM00334.jpg
CAM00335.jpg
bcdinfo-Temp.txt
bcdinfo-Windows.txt
disklayout-Temp.txt
disklayout-Windows.txt
SrtTrail-Temp.txt
SrtTrail-Windows.txt
Thank you for the log files.

1. C  drive holds your system files -200MB

2. E drive is your boot parition( where windows folder resides)

Bcd setting might differ for certain oem.

Step1 :-Make E drive as active partition

Step 2 :- Go to E:\> and run this command


      cd boot
      attrib bcd -s -h -r
      ren E:\boot\bcd bcd.old
     
      bootrec /scanos

If this command bootrec /scanos is able to locate the windows (os) then execute this command

bootrec /rebuildbcd

run bcdedit and post screenshot.

Reboot system and check



If the issue persist then mark C drive as active partition and reboot.



Ded9
cd boot
      attrib bcd -s -h -r
      ren E:\boot\bcd bcd.old
     
      bootrec /scanos

If this command bootrec /scanos is able to locate the windows (os) then execute this command
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Same results. When I make the system partition active I get the results I originally posted about. If I make the Windows partition active I get the bootmgr is missing.

Thanks,
Mike
Run bcdedit from E drive.... post screenshot

I dont see the boot folder listed under E drive... Try dir or cd boot  from E:\>

Startup log points to this error

The operating system version is incompatible with Startup Repair

You might have sp1 installed ...download windows 7 iso sp1 from internet . Boot from this disk and run startup repair.

http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/i-do-not-have-windows-7-media-but-i-do-have-my/5ce13741-ac25-4969-ae82-2494726aac1c

download the right version 32bit or 64 bit from the above link.

Disconnect all external usb devices...like external hard drive...reboot and check.


If the above does not work then try this step

1. Boot from windows 7 disc..go to command prompt ..C:\> type reagentc /disable(This will disable winre)

2. Make E drive as active partition

Go to E:\> and run this command


      cd boot
      attrib bcd -s -h -r
      ren E:\boot\bcd bcd.old
       bootrec /rebuildbcd



Ded9
If the above does not work then try this step

1. Boot from windows 7 disc..go to command prompt ..C:\> type reagentc /disable(This will disable winre)

2. Make E drive as active partition

Go to E:\> and run this command


      cd boot
      attrib bcd -s -h -r
      ren E:\boot\bcd bcd.old
       bootrec /rebuildbcd




Boot from this disk and run startup repair.


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Whenever I make the Windows partition active I get bootmgr is missing.

Not sure what you mean by startup repair. I have a Windows 7 Home Premium 64 bit with SP1 DVD that I have tried booting from and tried the Repair your Computer option. I aso downloaded the Windows 7 repair disk in both 32 and 64 bit. The owner does not have any software. Is the startup disk any different than the repair disk?

I don't see the Boot directory listed but when I do a cd boot it will go to that directory and a dir will show all the bcd files.
CAM00336.jpg
CAM00337.jpg
CAM00338.jpg
Run these commands from E drive

bcdedit /set {identifier} device partition=E:
bcdedit /set {identifier} osdevice partition=E:

Identifier: Need to make changes and then execute the above command.

Check this image
http://filedb.experts-exchange.com/incoming/2013/07_w28/664562/CAM00336.jpg

The identifier section {d04... you need to add this in the above command execute it.
If hope you have disabled the winre first    "reagentc /disable"

Then run bcdedit and post screenshot.

Restart system and check.



Ded9
If hope you have disabled the winre first    "reagentc /disable"

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This brings an "reagentc is not recognized as an internal or external command"


Thanks,
Mike
You need to boot from windows 7 disc and then run these commands.

If reagentc /disable is not working then try other steps.


Ded9
You need to boot from windows 7 disc and then run these commands.

If reagentc /disable is not working then try other steps.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Booting from Windows 7 disc, same results as other discs.

Don't know any other steps. Cannot run as administrator to run reagentc command.

Been having issues with enter keys on keypad not functioning. Things not going well.
Attached is screenshot running those commands without the reagentc /disable being run.


Thanks,
Mike
CAM00339.jpg
copy the bcd folder from C and E drive to usb ...zip it and upload it here.

If the file size is more than 5 MB then just copy the  bcd.log from both C and E ..zip it then upload here.

Also make sure these files are present in the windows\system32\drivers folder

acpi.sys, msisadrv.sys, pci.sys, volmgr.sys,volsnap.sys, disk.sys

and in system32 folder

hal.dll, ntoskrnl.exe, ntkrnlpa.exe

Ref
http://asher2003.wordpress.com/2010/12/09/how-to-deal-with-boot-bcd-status-0xc0000098-error-on-start-up/



Ded9
If  the user wants the system back.... then you know what needs to be done.(quickfix)



Ded9
All this makes me wonder if this system was not set up at some point to boot from drive "X" which points to OS in drive "Y".
(I don't mean drive X that shows up when you boot from a live CD.  Here, X and Y are just placeholders for real drive letters like C: and E:, etc.)

So, the boot process would be found and controlled on drive "X" which I believe would also be the active partition.
But the OS would be found on drive "Y" and the boot process would point to that....

If this is the case then the restoration process becomes at least a little bit more complicated.  But the advice you've been given is likely the right track:
e.g. see:
http://www.sevenforums.com/general-discussion/210080-how-edit-dual-boot-choice-menu.html
I'm running CHKDSK on the drive now, plus another A/V scan. Can't work with random enter keys working. I've had this laptop for about a week so far. I already mentioned that I may have to re-install. I would like to repair if possible mostly due to Office being on the laptop. The data I can get or I should I already backed up.

If it can't be fixed today, tomorrow I will let the owner the results and see what they want to do.

It will take me a little while to run my stuff, so I will upload those files and give you an update in a little while.


Thanks again,
Mike
tOkay, I cannot believe I don't see this suggestion yet! =-O
When youyto repair the bootloader and it KEEPS failing for no apparent reason, then a lot of the time it is an INFECTION on the partition itself.
Take the hard drive and hook up externally.
Download and run TDSSKiller with the option TDLFS checkmarked and scan boot sectors. The other ones are not necessary.
I'm willing to bet a rootkit is causing this.
If you find one, remove it and then try booting again.
I'm willing to bet a rootkit is causing this.
If you find one, remove it and then try booting again.
    ~~~~~~~~~~~~~~~~~~~~~~~
Downloaded TDSS Killer. Could not tell it to scan the external drive or it could not find the boot sector on the external drive. I believe the OS is hosed. I checked the size of the Windows folder and it is only 1.52GB in size. The System32 folder is only 124MB in size.


Thanks,
Mike
Ded9,

copy the bcd folder from C and E drive to usb ...zip it and upload it here.
Also make sure these files are present in the windows\system32\drivers folder

acpi.sys, msisadrv.sys, pci.sys, volmgr.sys,volsnap.sys, disk.sys

and in system32 folder

hal.dll, ntoskrnl.exe, ntkrnlpa.exe
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I believe the OS is hosed. I checked the size of the Windows folder and it is only 1.52GB in size. The System32 folder is only 124MB in size.

Thanks,
Mike
You can't tell TDSSKiller to sxan externally, but it will scan all external boot sectors. I have used this many times to fix and issue where the bootloader doesn't work correctly.
You are right though, it sounds like there is not enough files in the Windows folder.
Sorry for bad spelling, I'm on my phone.
There comes a time ...
When what is unpleasant
But unavoidable
Must be accepted.
All this makes me wonder if this system was not set up at some point to boot from drive "X" which points to OS in drive "Y".
(I don't mean drive X that shows up when you boot from a live CD.  Here, X and Y are just placeholders for real drive letters like C: and E:, etc.)

So, the boot process would be found and controlled on drive "X" which I believe would also be the active partition.
But the OS would be found on drive "Y" and the boot process would point to that....
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I believe the OS is hosed. I checked the size of the Windows folder and it is only 1.52GB in size. The System32 folder is only 124MB in size.


Thanks,
Mike
Well, it's toast now. I am unable to use the Enter key on the keypad. All other keys seem to be working but not the Enter key.


Mike
How did THAT happen?
Not sure. It was getting flaky during the latter part of this process. I'm using an external KB now.


Mike
Okay, here's a trick that you can try.

Boot up into a Windows RE on the computer in question.

Go to the command prompt.

Depending on what drive has the Windows files, run the following command, where C:\ is the Windows partition

sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

Also, I did not understand if you did try to scan with TDSSKiller externally.
I cannot think of any other steps. I think its time to rebuild the system.

If possible run startup and repair again with windows 7 disc(vanilla copy) ...then go to

E:Windows\System32\LogFiles\Srt\SrtTrail.txt

Check the file creation date ...make sure its today and then upload it here. After that you can rebuild the system.


Regarding folder size ..i dont think the windows folder is corrupted. Security settings might be corrupted. Ask the user whether he had installed any new antivirus software.


Ded9
Depending on what drive has the Windows files, run the following command, where C:\ is the Windows partition

sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

Also, I did not understand if you did try to scan with TDSSKiller externally.
   ~~~~~~~~~~~~~~~~~~~~~~~~~
I don't think I typed the right command. I don't think it ran the way it should.
Attached is a screenshot of the results.

I ran the TDSS killer when the drive was attached to a usb adapter I did not see it scan the external drive, only the local drive.
CAM00340.jpg
If possible run startup and repair again with windows 7 disc(vanilla copy) ...then go to

E:Windows\System32\LogFiles\Srt\SrtTrail.txt

Check the file creation date ...make sure its today and then upload it here. After that you can rebuild the system.


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Seems strange the Windows folder is only 1.52GB and the Windows folder on one of my pc's is over 7 GB.


Thanks,
Mike
CAM00341.jpg
CAM00342.jpg
You were close.

You didn't put spaces.

sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
You were close.

You didn't put spaces.

sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
   ~~~~~~~~~~~~~~~~~~~~~~~~~
Windows Resource Protection could not start the repair service


Thanks,
Mike
Did you replace C:\ with the drive letter of your Windows partition?
I'll attempt any more suggestions tomorrow evening then if they don't work I will attempt a repair install to see if at least I can save the programs.


Thanks,
Mike
Repair install is not possible if you cannot boot to desktop.... you have to rebuild it from scratch. Backup files to external hard drive



Ded9
Did you replace C:\ with the drive letter of your Windows partition?
~~~~~~~~~~~~~~~~~~
I tried multiple combinations and got the same results.


Thanks,
Mike
Repair install is not possible if you cannot boot to desktop.... you have to rebuild it from scratch.
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

You're correct. I misread the process.


Thanks,
Mike
Switch over to ATA for hard drive in the BIOS, then try to boot just to Safe Mode with Command Prompt.  Let us know if you get a different error number.  Also, if you have it, switch to RAID, IDE, or AHCI, and post results for those (I don't know which one you have it on).
Switch over to ATA for hard drive in the BIOS, then try to boot just to Safe Mode with Command Prompt.  Let us know if you get a different error number.
    ~~~~~~~~~~~~~~~~~~~~~~
Switched over from ACHI to Compatible mode, which is what IBM calls it.
Same results.


Thanks,
Mike
Check to see if there is a regback folder in C:\Windows\system32\config\ folder.

If so, backup the ENTIRE 'config' folder, then copy SAM, SECURITY, SOFTWARE, SYSTEM, and DEFAULT from the 'Regback' folder into the 'config' folder.  Say yes to overwriting the files since you have them backed up.

I'm starting to run out of ideas.  Have you tried to MANUALLY create the bootloader?
https://neosmart.net/wiki/display/EBCD/Recovering+the+Windows+Bootloader+from+the+DVD
I have used the Nuclear Holocaust repair more than a several times and I have brought back a down Windows Installation.
Check to see if there is a regback folder in C:\Windows\system32\config\ folder.

Have you tried to MANUALLY create the bootloader?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'll try those steps tonight. I believe I've tried to create the bootloader but did not use all of those steps suggested in the link you provided. Will try again tonight.


Thanks,
Mike
If so, backup the ENTIRE 'config' folder, then copy SAM, SECURITY, SOFTWARE, SYSTEM, and DEFAULT from the 'Regback' folder into the 'config' folder.  Say yes to overwriting the files since you have them backed up.

I'm starting to run out of ideas.  Have you tried to MANUALLY create the bootloader?
https://neosmart.net/wiki/display/EBCD/Recovering+the+Windows+Bootloader+from+the+DVD
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Got a different result from following the link instructions. Progress?

File: \Windows\system32\winload.exe
Status: 0xc00000f
Info: The selected entry could not be loaded because the application is missing or corrupt


I will try again later this evening.


Thanks,
Mike
Regbackup trick only works in vista...it will not work from win7 onwards.

Neosmart link looks good but is a paid version....not sure it will work.



Ded9
Check and see if the file exists C:\Windows\system32\winload.exe
If it does, find out WHAT version of the file you have.

Then, rename the file to winload.exe.old

Finally, search in the C:\Windows\winsxs folder with the following command...

dir /s winload.exe

This will display any files with the name 'winload.exe'.  Find the latest version of the file, go into the appropriate folder, then copy that file to the C:\Windows\system32 directory.

If this does not work, now that you have it properly recognizing a Windows installation, you might be able to get the
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
command to work in the Windows Recovery environment.

Post back your results.

P.S.  Yes, it is good we are getting a different response :)
Neosmart link looks good but is a paid version....not sure it will work.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
I thought I would try it, maybe use it for future repairs that it might be used on. It didn't work.


Thanks,
Mike
Find the latest version of the file, go into the appropriate folder, then copy that file to the C:\Windows\system32 directory.

If this does not work, now that you have it properly recognizing a Windows installation, you might be able to get the
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
command to work in the Windows Recovery environment.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Will try this after work tonight.


Thanks,
Mike
Check and see if the file exists C:\Windows\system32\winload.exe

Finally, search in the C:\Windows\winsxs folder with the following command...



    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Neither one of those folders exists.
My mistake, winsxs does exits. Copied over the winload.exe from my Win 7 pc. Rebooted and got the error that ntoskrnl.exe was missing. I copied that over and got hal.dll was missing. I did a comparison of what is in my Win 7 pc Windows folder and the laptop in question's folder. There are only folders in the laptop Windows folder, no files. There may be files inside some of the folders, I did not check all of them. The system32 folder on the laptop does not contain any files at all. I think at this point a re-install is the only way to fix this.


Thanks,
Mike
You are probably right, by now that you got to recognize Windows and out some folks there, you can try sfc scannow command we talked about earlier and it might work.
Does sound like everything got wiped.
Is there folders under C:\Users\ ?
Is there folders under C:\Users\ ?
   ~~~~~~~~~~~~~~~~~~
Yes.
I'll try the scannow just to see what happens.


Thanks,
Mike
Scannow option didn't work, got same results ( Windows Resource Protection could not start the repair service)

I ended up doing the system restore. That worked once I had to reset the BIOS back to default.
Downloading updates now. I hope the keypad works correctly now.

Even though this took up quite a bit of my time and everybody who tried to help, it was a good learning experience for me.

I had great advice in troubleshooting but end result was to restore/re-install.


Thanks to everybody who tried to help!
Mike
Sorry to hear this. After all your efforts. :-(