Saturday, August 14, 2010

Grub not listing Windows (7) installation.

(This works for me on Debian, but probably works on similar systems as well.)

If your grub menu does not list an OS partition which you know is installed, try running update-grub.  If it still isn't listed, try installing os-prober (apt-get install os-prober). This is a program designed to locate non-linux OSes.  Run sudo os-prober.  Hopefully, it will detect the Windows installation you want it to, and it will print out a line indicating the device name and detected OS.  If it doesn't, I can't really help you, but your next step would be to somehow get os-prober to detect the installation.  Assuming you have os-prober detecting the OS as you want it too, try running update-grub again.  It will print out a line indicating that it has detected the installation.  When you reboot, the option should appear on the grub menu.

If os-prober is detecting the OS, but update-grub isn't, look for the file /etc/grub.d/30_os-prober (or something similar), that is the problem (either it isn't installed there, or it is misconfigured).

This really should be the first step you take if it isn't detecting a windows install properly.  No need to do Wndows MBR recovery or any sort of custom grub.d configuration.

EDIT: I found that there can also be issues detecting the install if the Windows 7 bootmgr is corrupted (don't ask me how that happened).  If you start up the windows recovery environment (you can download a recovery CD iso easily if you google) and then recover the boot manager, os-prober will now detect the install.  Just run update-grub to add it to the startup menu.

No comments:

Post a Comment