Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Since I updated grub to grub 2 I no longer get the option to boot to Windows (which is unfortunately sometimes necessary for proprietary MSIE browser plugins I need to use for work).

Relevant /boot/grub/menu.lst portion:


# This is a divider, added to separate the menu items below from the Debian
# ones.
title           Other operating systems:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title           Windows NT/2000/XP
root            (hd0,0)
chainloader     +1

This however does not appear anymore. I do have some entries in /boot/grub/grub.cfg with entries like these:

menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod ext2
        set root='(hd1,msdos1)'
        search --no-floppy --fs-uuid --set e638c434-4884-412f-a141-2c194f881fae
        echo    'Loading Linux 2.6.32-5-amd64 ...'
        linux   /boot/vmlinuz-2.6.32-5-amd64 root=UUID=e638c434-4884-412f-a141-2c194f881fae ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.32-5-amd64

Do I have to alter that file? If so, what is the correct syntax for a Windows boot? If not, what could be the problem?

share|improve this question
up vote 4 down vote accepted

This is based on for Ubuntu but it should be valid for Debian's grub2-package too:

/boot/grub/grub.cfg is overwritten each time you run /usr/sbin/update-grub2 or when it's called after a kernel update. grub2 should have auto-detected the windows installation via /etc/grub.d/30_os-prober and added it to the boot menu. Howewer custom entries should be made in /etc/grub.d/40_custom


You could try to add the Windows Loader manually by adding the following to /etc/grub.d/40_custom:

menuentry "Windows on /dev/hda1" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set YOURUUID
chainloader +1

"YOURUUID" is the UUID of your Windows partition. You can get it by doing a ls -l /dev/disk/by-uuid/ | grep hda1. After editing the file do a "sudo update-grub2" to generate a new grub.cfg.

It depends on os-prober, which may not be installed, in which case do a:

sudo apt-get install os-prober

... and run sudo update-grub2 again.

share|improve this answer
update-grub2 indeed creates a new configutaion file, /etc/grub.d/30_os-orober is there, but elas, no Windows entry as of yet, so it seems it cannot detect it for some reason. Could it be a hd is blacklisted somewhere? (/grasping at straws). – Wrikken Sep 28 '10 at 15:23
I don't know if there cold be a blacklisted hd. I'm still not really experienced with grub2. What output do you get from "sudo os-prober"? – agporwfnz29 Sep 28 '10 at 16:04
Aha, that was it, although I had a /etc/grub.d/30_os-prober, it depended on the (quite obviously named) os-prober executable which wasn't on the system (and for some reason grub fails to provide even a simple error report about that). A simple install of that package and rerunning update-grub2 did the trick, it's in grub.cfg now, my thanks! – Wrikken Sep 28 '10 at 16:55

Wrikken's solution also worked for me. I'm regurgitating it in easy to follow directions.

Step 1

sudo apt-get install os-prober

This can be tested with:

sudo os-prober

Which, for me, gives the output:

/dev/sda1:Microsoft Windows XP Professional:Windows:chain

Step 2

sudo update-grub2
share|improve this answer
Ack., see my comment @ the 28th of september, this was indeed what solved it. – Wrikken Jan 3 '11 at 18:25
Maybe you can copy and paste my answer as your own (and then I can remove mine)? I believe it is better if the solution is part of the answer instead of in the comments. – John Jan 4 '11 at 14:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.