Tuesday, December 21, 2010

Restoring Windows 7 Bootloader

One of my student came to my office this afternoon to ask me about restoring Windows bootloader on his friend's laptop. The laptop was dual-booted with Ubuntu and then the disaster came when he removed Ubuntu's partition without restoring the bootloader to Windows first. Since GRUB is unable to detect Linux's partition, it ended with a broken system.

I told him that the command i knew to restore Windows' bootloader is fdisk /mbr. He then inserted Windows 7 installation disk and ran the rescue command prompt, but i couldn't find it on where it supposed to be. I googled a bit and found out that the tool which does the same job has been changed into BootRec (probably Boot Recovery). It has several options, but the parameter i need to do the job is BootRec /FixMbr. After i execute this command, i restarted and voila.... it booted right to Windows 7 again Applause

This command works on Windows Vista/7 and onwards