# Windows 7 will not boot up! Tried all BootRec CMDs, Repair, DISKPART and CHKDSK /R



## Raener (Oct 25, 2010)

_This was all typed on a slightly unresponsive laptop keyboard. Forgive the spelling errors, I tried to correct them as much as possible. This post was written as I was conducting the diagnosis' and tests in a notepad file._* 

My Setup*

Windows 7 x64 bit
C:\ is my partition for my OS.
Custom built PC.


------------------------------------------------------------------


*Summary of problem*

I was using the PC, quite a big load on the RAM 4-5 GB out of a total of 6 GB was being used.

Internet bandwidth was completely utilised, Chrome open with many tabs, ripping flac from a CD, testing films I've downloaded and downloading foobar2000 all at the same time.

All of a sudden both screens go black. I wait a while. I press ctrl+shift+esc, the primary screen flickers to my desktop for a couple milliseconds and then back to black. I then tried a load of other shortcut like ctrl+alt+del, win+L, Win+D etc. Nothing. I hit the power button (set to sleep) in the hope that It'll go t sleep and I'll be able to boot up roughly where I left off. On boot up, BSOD then dumps memory to disk. On a fresh boot I now had a flashing underscore post checking nvram message that did nothing.

The commands below aren't in the exact order that I did them as I've started this text file a couple hours after fiddling about trying to figure out what's going on. I did do a /fixmbr and /fixboot (Can't recall if /fixboot went smoothly at his stage as it doesn't execute as it should later on) and rebooted. This was done using a XP recovery disc (I don't know why I didn't use the Windows 7 one) or it could have been my Vista disc (likely not as if remember correctly it doesn't have recovery console on it). 

After using the older OS disc to issue commands I had the same problem but now with a underscore and some 5 random symbols that meant nothing to me.

I then have an error on reboot that overclocking has failed, please enter setup to re-configure your system. I chose the option to reset it to default values.

Now on reboot, "Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key".

Recovery consoles bootrec /fixboot gives element not found with a popup saying bootec.exe - corrupt file. c:\My Shortcuts\Drives is corrupt and unreadable. Please run chkdsk utility. It then find the Windows installation and asks it to be added to the boot list. I choose yes and it said element not found.

It's very strange to me that a folder I made My Shortcuts\Drives (.ink shortcut files to all my hard drives) is giving this problem. Preventing me from doing /fixboot it seems.

For some reason now my PC hangs at "Initializing USB controllers .. Done." for a few minutes till it follows through and continues.


------------------------------------------------------------------

*
GParted*

I've tried GParted, the OS drive already has a boot flag on it. 

It did have a caution symbol next to the drive mentioning things such as:

Cluster accounting failed at 1613545 (to 1734814). Extra cluster in $bitmap.

Attribute list for file 41609 is corrupt.

File record segment 41932 is an orphan.

Chkdsk cannot run because the volume is in use by another process, dismount?


------------------------------------------------------------------

*Windows 7 Recovery Disc*

I then use the Windows 7 recovery disc from here on doing the following:



```
c:\>bootrec /fixmbr

The operation completed successfully.


c:\>bootrec /fixboot


c:\>bootrec /scanos

Scanning all disks for Windows installations.

Please wait, since this may take a while...

Successfully scanned Windows installations.
Total identified Window installations: 1
[1] C:\Windows
The operation completed successfully.


bootrec /rebuildbcd


BootRec.exe - Corrupt File

The file or directory is corrupt and unreadable please run the chkdsk utility.


c:\boot>bcd

The directory is invalid.


del bcd


c:\>bootrec /rebuildbcd

BootRec.exe - Corrupt File
The file or directory is corrupt and unreadable please run the chkdsk utility

Successfully scanned Windows installations.
Total identified Window installations: 1
[1] C:\Windows
Add installation to boot list? Yes<Y>/No<N>/All<A>: Y
Element not found.


c:\>bcdboot c:\windows

Failure when attempting to copy boot files.


c:\>Diskpart

Diskpart> list disk

    Disk #    Status        Size           Free
    Disk 0    Online        931 GB    519 GB
    Disk 1    Online        931 GB    221 GB
    Disk 2    Online        139 GB    1024 KB
    Disk 3    Online        139 GB    1024 KB
    Disk 4    No Media       0 B        0 B
    Disk 5    No Media       0 B        0 B

Diskpart> select disk 2

Disk 2 is now the selected disk.

Diskpart> list partition

    Partition #    Type        Size    Offset
    Partition 1    Primary        40 GB    31 KB
    Partition 0    Extended    99 GB    40 GB
    Partition 2    Extended    99 GB    40 GB

Diskpart> select partition 1

Partition 1 is now the selected partition.

Diskpart> active

Diskpart marked the current partition as active.


C:\>chkdsk /r

All tests completed successfully, no bad sectors etc.
```
------------------------------------------------------------------

*Startup Repair:*

I've tried the Startup Repair twice now. Both times taking a very long time. Not sure why. Near 2 hours at least each time.

It says it's repaired a few things but on reboot things seem the same.


```
Startup Repair diagnosis and repair log

Number of repair attempts: 1


Session details:

System Disk = \Device\Harddisk0
Windows directory = 
AutoChk Run = 0
Number of root causes = 1


Test Performed:

Name: System disk test
Result: Completed successfully. Error code = 0x0
Time taken = 15 ms


Test Performed:

Name: Disk failure diagnosis
Result: Completed successfully. Error code = 0x0
Time taken = 78 ms


Test Performed:

Name: Disk metadata test
Result: Completed successfully. Error code = 0x0
Time taken = 0 ms


Root cause found:

The partition table does not have a valid System Partition.

Repair action: Partition table repair.
Result: Completed successfully. Error code = 0x0
Time taken = 6273565 ms
```
On reboot still taking ages on boot as it hangs on the initialising of USB controllers. Standard messages and then following with back to "Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key" again...


------------------------------------------------------------------


*What should I do?*

I don't know why my OS disk and the other identical disk in terms of model number are showing in the list disk part as having only 1024 KB left in space. I didn't notice it being like that the first time I ran diskpart.

I'd really love to not to reinstall my OS after just reinstalling it in the last month intentionally. The weird thing was I was looking at the create a system restore point today, and seeing as I have none, I can't use that option.

I hear that in one case, someone moved their sata cable to another port and it fixed the problem for them. I don't think this would help my situation though as it was working before there. Though I have been giving my PC a firm tap on the side to stop the fan 

from whirring in the past two days. Likely not the culprit.

Another suggestion I read was reinstalling the OS over the current one (ignore the windows.old message) and quit the installation 

after the install gets past copying system files, restart, boot into windows 7 Recovery CD and do a system restore, which I don't have anyhow. This sound risky and a last resort option. I'd only try this as someone said that the solution worked for them. I likely won't.

Someone also talked about resetting their MBR through bootrec (boosect.exe /nt60 all /force) I have not tried that though. As I'm afraid I won't be able to rebuild it.

I don't what other possibilities there are to try.

Any help is highly appreciated! ray:


----------



## visseroth (Oct 25, 2010)

OK, it sounds like you are corrupting data somehow. If I was the one working on that machine I would pull the HD, plug it into another machine, download and execute hddscan and check the smart status of the drive.
Second I would download and burn memtest to a CD and run a memory test on your machine.

Now if there are any errors with memtest you need to shut the machine off, pull a stick of ram and see if the error persists, if it does then keep at it tell you find the culprit.

With hddscan if anything is yellow or red your HD is shot. It's time to put in a new hard drive and reload your operating system.

If everything comes back clean then load your Win7 disk and go to the command console and you can re-write your MBR with the command "bootrec /fixmbr". I would also execute the command "chkdsk /f /r". If any of them ask if you want to dismount the partition or hard drive in use say yes.


----------



## Raener (Oct 25, 2010)

I'll check the HDD out later today along with the RAM. My best guess is the HDD is fine as I just got this back as a new replacement for the old one. But you never know.

I've already used my Windows 7 disc and issued all those commands you suggested.

Thanks :smile:


----------



## visseroth (Oct 25, 2010)

And if all the the above doesn't work then try swapping out the power supply. I have seen power supplies do strange STRANGE things.


----------



## jenae (Jun 17, 2008)

Hi, you are in a bit of a mess, first rule is DO not use a XP cd to repair a Vista \Seven boot problem. Most likely you now have traces of XP ntldr or ntdetect who knows. This is known as Nuclear Holocaust and comes from the Neo Smart people developers of easy BCD. 


Boot with the Seven DVD and go into Recovery Environment select "command prompt"

*NOTE:- the reference here is Vista same for Seven. Just substitute Seven for Vista *

The first order of business is to make sure the MBR and bootsector contain the right references to the Vista bootloader:

Replace x: in the commands below with the letter to your CD drive as detected by the Windows Recovery environment, at the prompt type:- (pressing enter after each line)

bootrec.exe /fixmbr
x:\boot\bootsect.exe /nt60 all /force

Now we get rid of the old BCD registry, and create a new one instead.
Note: We're assuming that the boot drive is drive C: below. If your computer is configured differently, be sure to use the appropriate drive letter here instead.

del C:\boot\bcd
bcdedit /createstore c:\boot\bcd.temp
bcdedit.exe /store c:\boot\bcd.temp /create {bootmgr} /d "Windows Boot Manager"
bcdedit.exe /import c:\boot\bcd.temp
bcdedit.exe /set {bootmgr} device partition=C:
bcdedit.exe /timeout 10
del c:\boot\bcd.temp

Now we have a clean, working Vista bootloader. But we need to add a Vista entry to it:

bcdedit.exe /create /d "Windows Vista" /application osloader
bcdedit.exe should return a message with a GUID for the newly-created entry, something like this:
The entry {c0dfc4fa-cb21-11dc-81bf-005056c00008} was successfully created.

You'll need to use the value that bcdedit.exe returned for you below, along with the drive letter for the drive that Windows Vista is installed to:

bcdedit.exe /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} device partition=C:
bcdedit.exe /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} osdevice partition=C:
bcdedit.exe /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} path \Windows\system32\winload.exe
bcdedit.exe /set {c0dfc4fa-cb21-11dc-81bf-005056c00008} systemroot \Windows
And, last of all, tell the Vista bootloader to boot the new entry by default:

bcdedit.exe /displayorder {c0dfc4fa-cb21-11dc-81bf-005056c00008}
bcdedit.exe /default {c0dfc4fa-cb21-11dc-81bf-005056c00008}

Now the Vista bootloader has been nuked and rebuilt from scratch.


----------



## Raener (Oct 25, 2010)

visseroth said:


> Now if there are any errors with memtest you need to shut the machine off, pull a stick of ram and see if the error persists, if it does then keep at it tell you find the culprit.


I'm going to inspect the RAM as I just noticed on this mornings boot after the PC hangs at e." The next line of text that appears is to do with RAM once it unfreezes. And for some reason it was counting up in MBs to the total RAM I own (6 GB) starting at 0-6144k. This may have something to do with selecting the standard long boot instead of quick boot in the BIOS. 

So, I removed a stick of RAM and now it does not hang on "Initializing USB controllers .. Done." anymore. I shutdown the PC and put the RAM back in and it works as it should. Thanks for that! :smile:



visseroth said:


> And if all the the above doesn't work then try swapping out the power supply. I have seen power supplies do strange STRANGE things.


I don't have another PSU at hand unfortunately.

The other problems still remain so I am about to try jenae's suggestion.



jenae said:


> Replace x: in the commands below with the letter to your CD drive as detected by the Windows Recovery environment, at the prompt type:- (pressing enter after each line)
> 
> bootrec.exe /fixmbr
> x:\boot\bootsect.exe /nt60 all /force
> ...


This where I get up to. On the "bcdedit.exe /import c:\boot\bcd.temp" command I receive:

The store import operation as failed.
The requested system device cannot be found.

I'm not sure what to do. Please guide me.

Also, my OS was installed on the C drive yet in the command prompt console it shows up as E. I'm just curious as to why this happens if anyone knows?

Thanks in advance.


----------



## jenae (Jun 17, 2008)

Hi, yes in recovery enviroment the OS may be assigned another drive letter to find what this is run this command :- 


```
bcdedit | find "osdevice"  (inc")
```
Now I think you may have no choice but to do a fresh install, unless someone has another idea.


----------



## i MaRk i (Dec 29, 2009)

Hi-

What OSs do you have installed?

Also, if you only have Windows OSs, then run the following from the recovery counsel:

```
bootrec.exe /FixMbr
```
Regards,

Mark


----------

