You are here:Home»KB»PC»Windows Family»Windows 8»How to Fix the Automatic Repair / Boot Loop in Windows 8
Tuesday, 14 July 2015 17:20

How to Fix the Automatic Repair / Boot Loop in Windows 8

Written by

This has got to be one of the most annoying issues with Windows 8, and also one of the most unfixed issues. Below i will show you what i did to fix my issues and then expand on what i think the causes are etc..

There is UEFI (EFI) and non-UEFI versions of boot loader. I think this is the difference between secure and non-secure booting.

What I did to fix the Boot Loop?

Listed in order.

Stage 1

When you get this issue it always loads the choice screen where you can try to load windows again or try to repair your Windows installation. This menu never gives you any indication of what the error is, it just keeps looping.

startup repair menu

In this Repair menu i tried all of the following options, non of which worked to reapir the boot loop.

  1. Safe Mode - I followed the instructions to load safe mode and also the other restricted types of startup (accessed via the Advanced Tools)
  2. system restore - would not run because it could not find any system restore points
  3. chkdsk c: /r - this did not find any issues
  4. sfc /scannow - did not run
  5. bcdedit - options, add here copy, backup, rebuild - this could not find any windows installations and c:\boot did not exist

Stage 2

I now followed the instructions from this webpage with a few modifications because i relised that i was using a UEFI and that this might cause other issues. However the things i tried above are valid for Windows 8.

http://woshub.com/how-to-repair-uefi-bootloader-in-windows-8/
The matter is that the BCD loader configuration in Windows 8 installed in UEFI mode is stored on a separate hidden EFI volume (100 MB in size on FAT32 file system). Bcdedit can not see it and, therefore, manage the loader configuration on it.
NB: my bcdedit could see the BCD i think it was because the appropriate partition had a drive letter

My Modifications

  • My partition with the EFI folder on was J: and already had the drive letter assigned
  • My J: partition was 500mb

The commands i actually ran from the Windows 8 Boot Disk (DVD):

  1. cd /d j:\efi\microsoft\boot\   (/D : change the current DRIVE in addition to changing folder.)
  2. bcdboot C:\Windows /l en-us /s j: /f ALL

from here on i get the following error screen which actually shows you an error

recovery your pc needs to be repaired

The operating system couldn’t be loaded because a critical system driver is missing or contains errors.
File: \windows\system32\drivers\mfehidk.sys
Error code: 0x000000d

The file mentioned above, Mfehidk.sys is a system process that runs in the computer background and maintains the host intrusion detection system for McAfee Antivirus. Mfehidk.sys will not be the cause of everyones boot loop or the faulting file shown.

http://h20565.www2.hp.com/hpsc/doc/public/display?sp4ts.oid=4132189&docId=mmr_kc-0110048&docLocale=en_US - says what Mfehidk.sys is for.

Stage 3

The boot loop has now gone but I could no longer use the 'Auto Repair Menu' on the hard disk so i had to revert to using a Windows 8 Boot Disk with Dart Utilities.

When the disk had loaded i navigated to the Advanced Tools via the Troubleshooting menu and ran the following (you will be prompted to login)

  1. Startup Repair - once this had completed it says it could not repair the startup and gave me the option of shutting down or reloading the utlities. One other piece of information it gave was the location to its Logfile.
    C:\windows\System32\Logfiles\Srt\SrtTrail.txt
    I rebooted the PC and Windows still did not load and went to the same blue screen with the error message on it.
  2. SFC via Dart - This application ran and completed successfully but without finding any errors or corrupt files. Obviously windows did not load.

Logfile

So i decided i would go and have a look at this file and what the logfiles say. You can read the SRT log to see what issues are hyappening.

  1. boot of the windows DVD
  2. open the file explorer
  3. navigate to and open
    C:\windows\System32\Logfiles\Srt\SrtTrail.txt
  4. read the log file and see if this tells you what is causing the startup error.
    {insert my log file here}
  5. In my log file i was drawn to the lines

    Root cause found: 
    ---------------------------
    Boot critical file c:\windows\system32\drivers\mfehidk.sys is corrupt.
    
    Repair action: File repair
    Result: Failed. Error code =  0x2
    Time taken = 2781 ms
    
    Repair action: System files integrity check and repair
    Result: Failed. Error code =  0x490
    Time taken = 870141 ms
  6. i then navigated to this file on the disk because i know that windows was now loading because it shows c:\windows\ as part of the file path and the logfile probably is right that this file is the cause.
  7. when i examined the file i found the file to be 0 Bytes and no wonder that windows see the file as corrupt. Because this file is not a windows system file this is why it is not fixed with SFC. There were also other similiarly named files that were most likely part of mcafee anti-virus.
  8. I created a temp folder and moved all the 0 Byte files into that folder.
  9. I now rebooted the computer
  10. Windows now loads, Fixed

Stage 4

Just as a followup, when windows loaded it prompted me with a  system restore error. This could of been caused by some of the work i did or that my client had been messing before the failure, even though he told me he had not. I just cancelled the notification and all was well.

system restore warning

Causes of the boot loop

The cause for this boot loop was undoubtably the 0 Byte files that windows was trying to load as drivers, and inparticular because it was a low level antivirus file, this was why the loop happened so quickly.

even though i tried loading windows without low level malwaredrivers i think this file was either not a low level antivirus file or when it is parsed because it is 0 Bytes long caused a hard crash of the kerenl which always flaggs the last boot as dirty, hence the loop.

The files could of been made 0 Bytes by anti-virus cleaning the file because it thinks it is a virus or perhaps when Mcaffe updated itself it did not correctely delete these files.

What should you do?

above was a worked example of what i did to fix the boot loop but here is the order of things you should do. Try rebooting your PC after each section to see if that fixed your computer.

  1. boot of a windows DVD and examine the log file to see if you can fix any identified issues
    C:\windows\System32\Logfiles\Srt\SrtTrail.txt
  2. check the following folder for 0 Byte size files and remove them.
    C:\windows\System32\drivers\
  3. Run the 'Startup Repair' tool from the windows boot disk
  4. Run system restore from either the windows boot disk or the onboard 'Automatic repair menu'
  5. Check the harddrive for issues
    • chkdsk c: /r
    • SMART
    • full surface scan
  6. Try all the fixes bcdedit from
  7. Try the EFI repairs from - How to repair UEFI Bootloader in Windows 8 | Windows OS Hub

You should have a working PC by now, if not try going through them again to see if you have missed anything. After this the next step is to back all your stuff up and perfomr a refresh, reset or fresh install of windows.

Links

Read 2831 times Last modified on Friday, 17 July 2015 20:05