Windows 7

Automatic Startup Repair

Windows 7 and later OSes can now attempt to automatically detect and repair many common startup problems without the need for user intervention. In nearly all scenarios where a PC has difficulty booting or starting, you should allow Windows to troubleshoot and fix the problem before moving on with your recovery plan to a more advanced stage. In Windows 8 the OS should initiate startup repair if any of the following issues are present:

  • Windows fails to startup properly twice
  • Windows is restarted unexpectedly twice within two minutes after the startup
  • An error is detected during Secure Boot
  • A BitLocker-related error is detected during startup on a touchonly device

If you have moved to Windows 8 from an earlier OS such as Windows XP, Vista, or Windows 7 and have tried to invoke the Advanced Boot Options by pressing F8, you will have noticed that this option is no longer available.

To allow a user to see the Advanced Boot Options, you will need to run the following command:

BCDEdit /set {bootmgr} displaybootmenu yes

You can then reboot the system and enter the Recovery Environment as shown previously, or wait for the command-line option, which allows you to press F8 and boot into the Startup Settings without requiring you to use the Windows DVD, and offers the tools. Notice that you can use either the number keys or function keys F1 to F9 to select an option.

Byy default the system will allow 30 seconds to decide if users wish to enter the boot recovery options during startup. This setting can be set to a lower number (such as 10) by changing the setting within the Startup and Recovery setting dialog box found in System Properties.

Last Known Good Configuration

Although this feature has been part of Windows for many years, most users either have not seen the feature or perhaps have misunderstood it.

If the user is unable to sign in to the system for whatever reason, Windows provides a little-known startup option called "Last Known Good Configuration", which will replace the current system Registry configuration (HKLM\SYSTEM\ CurrentControlSet) with a saved version of the Registry in which the boot process had been successful.

A successful boot relates to the success criteria of each of the following actions:

  • Startup of auto-start services
  • Load of device drivers
  • User account sign in

Last Known Good Configuration should only use this feature if the problem relates to the current signed-in session and the user reported no incidents in the previous login.

The Registry stores information within the HKEY_LOCAL_MACHINE\SYSTEM Hive to indicate whether the system successfully started at the last startup. This information is located in the following subkeys:

  • \CurrentControlSet (which acts as a pointer to the ControlSetxxx subkey, where xxx represents a number, such as 001, shown below in the Current value)
  • \Select (which contains the following entries: Default, Current, Failed, and LastKnownGood)

During normal Windows startup, the Windows Boot Loader uses the control set given in the \Select\Default value, and if no errors are encountered then the values for the subkeys Default, Current, and LastKnownGood will all contain the same ControlSet subkey, such as ControlSet001.

If the startup process encounters issues and the user fails to sign in to a user account, the subkey for the Failed entry is updated to point to the failed configuration definition so that this is not used again.

In practice most troubleshooting issues relating to the startup process are attributable to corrupt, faulty, or incorrect drivers or loading service configurations and their interdependencies.

Last Known Good Configuration has been deprecated in Windows 8 and later in favor of the new Recovery Environment.

Roll Back Driver

If an incompatible or corrupted device driver has been installed on the PC, it is very likely to be responsible for any stability issues that may arise following the installation.

If you can sign in to Windows, you should be able to use a feature called Roll Back Driver, which will allow you to replace the updated driver with the previously installed driver, effectively rolling back the driver. In most cases this will resolve the problem. Roll Back Driver is an option found on the Properties tab of the device within Device Manager, and was first introduced with Windows XP.

If the system is very unstable and will not allow normal booting into Windows, you can boot using Safe Mode, which is a version of Windows that loads a minimal set of essential drivers. Once in Safe Mode you should be able to either roll back the driver, or delete it and reinstall a working driver and then reboot.

To boot into Safe Mode, use the same process as indicated before to boot to the same menu that we saw for the Last Known Good Configuration (in Windows 7), then select to boot the PC in Safe Mode. If you are using Windows 8, boot to the Advanced Startup Settings and select Enable Safe Mode.

Many of these driver issues have been mitigated over recent years for a number of reasons, including a stable and consistent kernel model introduced with Windows Vista, and also the increased shift toward 64-bit computing, which requires all drivers to be digitally signed.

[Previous] [Content]

In this tutorial:

  1. Troubleshooting a Corrupted Registry
  2. Resolving Registry Corruption
  3. Automatic Startup Repair