Is your Windows 7/Vista system failing to boot correctly? Are you getting stuck at the login screen? Did you mess up the boot sector or MBR while tinkering with hard disk partitions? I am sure that, at some point or the other, we have all faced Windows boot loader related debacles. Today I will share a couple of quick tips to solve such problems. They won’t always work, but they are the basic recovery/repair tools that every Windows user should be aware of.
System File Checker (sfc)
According to Microsoft’s official description, “(SFC) Scans and verifies the versions of all protected system files after you restart your computer”. Given how many times I have managed to mess up winlogon.exe and explorer.exe, I am particularly familiar with the second scenario described above (getting stuck at the login screen). SFC can almost always fix problems caused due to corrupted system files.
Normally SFC can be run from the command prompt. If your system is in an unbootable state, enter Safe Mode (by tapping F8 repeatedly after powering on your system). If Windows fails to boot even into Safe Mode, pop in the Windows installation DVD, select Repair Your Computer option and open Command Prompt. Once cmd is open, type sfc /scannow. After it finishes scanning, restart your system.
SFC is something which is available not only in Vista and 7, but also in older systems like Windows XP. If you don’t want to run SFC manually, you can also use the Startup Repair option offered by the Windows 7 installation disc. This should automatically deploy the sfc tool, among other things. However, it will take more time. Also note that SFC can come in handy if you are experiencing frequent explorer.exe crashes and other system instabilities/performance issues.
Bootsect and Bootrec
As suggested by its name, bootsect modifies and updates the Windows bootsector. It can be used for writing/copying the boot sector to any disc. This tool is present in the /boot subfolder of the Windows 7/Vista recovery disc.
Bootrec is another system tool offered by the Windows recovery environment. It can be used to easily fix your MBR (Master Boot Record). It’s important to note that bootsect can’t be used to repair the MBR. It only updates the boot sector of every eligible partition (in other words partitions which contain Windows installations). Once common usage scenario for bootrec is to remove GRUB after uninstalling (read deleting) Linux. However, bootrec.exe /fixboot can be used to refresh your boot sector.
If you Windows 7 or Windows Vista system is having trouble booting properly, follow the steps given below:
As before, boot from your Windows 7/Vista installation disc. Choose Repair Your Computer and launch Command Prompt.
Type bootrec.exe /fixmbr and hit enter. This will update your MBR.
Type x:\boot\bootsect.exe /nt60 all /force and hit enter. This will apply boot code that is compatible with BOOTMGR on all partitions. Of course, boot code will not be updated in partitions which don’t have any Windows installations (in other words partitions which are not bootable). Don’t forget to replace the x with the appropriate target volume (generally your optical drive).
Now enter bootrec.exe /rebuildbcd. This will scan all partitions for Windows installations. When detected, it will give you the option of selecting the installations you want to add to the bootloader.
Once again, the Startup Repair tool should also be able to take care of the situation in most cases. However, there will be occasions where you will be forced to get your hands dirty. Knowing a little bit about these elementary Windows system repair tools can save you a lot of trouble.