Repair Windows Boot Errors

repair-windows-boot-errors

Not being able to boot into Windows can be frustrating and can often lead to the dreaded re-installation of Windows. This doesn’t have to be the case, with some boot troubles easily fixed using tools provided on your installation media.

Disclaimer: Before undertaking any of the steps below create a backup of your files. This can be done by booting from a bootable USB stick (Windows Installation Media or Live Linux Distro) and transferring files to an External Drive. I am not  responsible for data lost undertaking these repairs. If you are unable to access your hard drive using bootable media you might have a dead hard drive.

I have used these steps to troubleshoot the following errors:

  • INACCESSIBLE_BOOT_DEVICE Blue Screen
  • Blinking White Cursor
  • Stuck on Windows 10 Spinning Wheel
  • Booting to Recovery Mode

CHKDSK

Often overlooked, your boot troubles could be something as simple as a errors within the file system or files in bad sectors that are required upon boot.

To run chkdsk (check disk) you will need to boot up from a bootable Windows Installation DVD or USB stick and choose the Command Prompt from recovery options.

At the command prompt run the following command:

  • chkdsk /r

the /r switch fixes errors on the disk and locates bad sectors and attempts to recovery information in those sectors.

CMOS Settings

Sometimes boot issues can be caused by incorrect CMOS settings. With most machines you can access CMOS by pressing DEL when powering up. If this doesn’t work you might need to press ESC first to pause ‘fast boot’. You will then be displayed a menu with the key you need to press to access CMOS (also referred to as BIOS).

Once in CMOS check that SATA mode is set correctly, i.e. IDE, AHCI, or RAID. Be sure to save changes upon exit.

A flat CMOS battery will reset CMOS settings to default. If the settings where changed from default before installing Windows (i.e. from IDE to AHCI), and CMOS is reset, Windows will fail to boot.

A user inadvertently holding the power button in for an extended period of time (or a sticky power button) can also cause CMOS to be reset.

If you are unsure what setting you need, try swapping from the default to IDE or AHCI.

Bootrec

Bootrec is a tool found on Windows Installation Media. To use this tool you will need to boot up from a bootable Windows Installation DVD or USB stick and choose the Command Prompt from recovery options.

At the command prompt run the following commands:

  • bootrec /FixMbr
  • bootrec /FixBoot
  • bootrec /RebuildBcd

bootrec /FixMbr writes a new master boot record to the system partition.

bootrec /FixBoot writes a new boot sector the the drive.

bootrec /RebuildBcd searches available hard drives for installations of Windows and adds them to the boot configuration data. If you have multiple hard drives containing Windows installations these will be added to BCD.

If no installations are found using bootrec /RebuildBcd I have found running the command bootsect /nt60 all /mbr followed by a reboot (returning to a command prompt) and then running bootrec /RebuildBcd will allow Windows Installation to be added to BCD.

bootsect /nt60 all /mbr applies the master boot code compatible with BOOTMGR. BOOTMGR is used by Windows Vista, Windows 7, Windows 8, and Windows 10.

Windows XP uses NTLDR which requires the switch /nt52 rather than /nt60.

Also if you are still using Window XP it might be time to upgrade!

Diskpart

Diskpart can be found on Windows Installation Media. To use this boot up from a bootable Windows DVD or USB and choose the Command Prompt from recovery options.

Steps for Diskpart will differ from machine to machine, but I usually find Disk 0 is the main hard drive, and the largest partition (Possibly Partition 1) is the Windows Installation partition.

At the command prompt run the following commands, taking into account your differing Disk and Partition numbers:

  • Diskpart
    Opens the Diskpart Utility
  • List Disk
    This allows you to view the number of a disk
  • Select Disk #
    Replace # with the number of the disk shown above, possibly ‘0’
  • List Partition
    This allows you to view partition numbers
  • Select Partition #
    Replace # with the number of the partition shown above, possibly ‘1’
  • Active
    This marks the partition as an active system partition.  
  • Exit
    Quits Diskpart Utility
  • Bootrec /RebuildBcd
    Searches available hard drives for installations of Windows and adds them to the boot configuration data.

For some machines I have also had to run Extend after running Active in the steps above. Extend is used to extend a freshly created partition, so I am not sure 100% while this has been successful for me.

I hope this post is able to help someone out!