I had been having an issue with my dual boot computer (Ubuntu 10.10 and Windows 7) where every time I wanted to boot up into Windows I got a dark screen with a blinking cursor. I knew that the master boot record had been corrupted somehow and had to fix this. I resisted the urge of having to re-install Windows as I knew what was wrong, but just didn’t know how to fix it. After a short search, google once more came to the rescue. With the Windows 7 DVD, you can boot up into repair mode, choose a command prompt and type in the following command:
bootrec /fixMBR bootrec /fixBoot bootrec /rebuildBCD bootrec /scanOS
The last command gave me a result that ‘0’ installations of Windows were found, this was not correct however. Afterwards, I rebooted the machine and I was able to get into windows! The only problem now was that my Grub menu was not showing up so that I could choose either Ubuntu or Windows. To fix this, I followed the steps on the link below (I had to use the installation CD for Ubuntu 10.10 to fix the issue).
I choose sdb as my drive, as this was my secondary drive where both Linux and Windows are installed. The only other thing I had to do afterwards was to remove the extra Windows 7 loader menu that showed up, so I typed in the following code:
sudo chmod +w /boot/grub/grub.cfg
I then removed the extra Windows 7 entry by using my favorite editor vim
sudo vim /boot/grub/grub.cfg
I saved my changes and then rebooted the machine and all of the OS entries I wanted were listed!
Note: After modifying the grub.cfg file, there are instructions to run
However, if I do this … I still get the duplicate Windows 7 entry in the Grub boot menu.