Cant see windows in the grub menu

Asked by noam

Greetings,

I have recently installed Ubuntu in addition to my windows XP on another physical hard drive.
The problem is that I can't see windows XP in the grub menu, so whenever I want to go to my old OS I have to change the booted hard drive from the BIOS.

Is there an easier way of switching between OS's?
Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Marc Stewart (marc.stewart) said :
#1

Start Ubuntu with both drives attached, and check that the Windows one is recognised by finding it in Places. So long as it's recognised you can try refreshing the GRUB menu by opening a terminal (System > Accessories > Terminal) and typing:
sudo update-grub
This should make GRUB search again for other OSes, and hopefully find Windows XP.

Alternatively, there are ways of using Windows' boot loader to choose which OS you want to use.

Revision history for this message
noam (noam555) said :
#2

i have written sudo update-grub and saw that now both files /boot/grub/menu.lst and /boot/grub/menu.lst~ are the same size, but still I can't see any windows OS in that list.
Any other options?

Revision history for this message
Marc Stewart (marc.stewart) said :
#3

menu.lst, huh? That sounds like your Ubuntu isn't so recent—Ubuntu 9.10 and up use GRUB2 which doesn't rely on menu.lst.
In that case you'll need to edit menu.lst manually.
Open the file by going to a terminal or pressing Alt+F2 and typing:
gksudo gedit /boot/grub/menu.lst

Everything relevant to Ubuntu are between two important lines:
### BEGIN AUTOMAGIC KERNELS LIST
and
### END AUTOMAGIC KERNELS LIST

DO NOT CHANGE ANYTHING IN THAT SECTION. You'll need to add a few lines for Windows either above or below that section, above for Windows booting by default, below for Ubuntu booting as the default OS.

The lines to add look like this:
title Windows XP
root (hd0,0)
chainloader +1

But you may need to change the middle bit. Look at the entries for Ubuntu. If the root line for them has (hd1,something) then it's fine. If the lines for Ubuntu have root (hd0,something) then you'll probably need to use:

title Windows XP
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1,0)
chainloader +1

instead.

That should then add WIndows to the GRUB menu, and boot into it if selected, assuming Windows was installed, as is typical, to the first partition of the hard drive.

Save the file, and reboot.

If it still doesn't work then you might need to fix the Windows loader by choosing the recovery option (R) from the Windows installation disc and typing:
fixmbr
at the command prompt, then reinstalling GRUB so you can use Ubuntu again by following the instructions here:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

Revision history for this message
noam (noam555) said :
#4

Actually I am using ubuntu 9.10 the only reason Im using the menu.lst was because I tried to look for a solution on google and that's what I've got.

I don't have any root lines for the Ubuntu entries. they look like something like this:

title Ubuntu 9.10, kernel 2.6.31-20-generic
uuid 3e4fd397-37c4-4cfc-ad56-54efcd710041
kernel /boot/vmlinuz-2.6.31-20-generic root=UUID=3e4fd397-37c4-4cfc-ad56-54efcd710041 ro quiet splash
initrd /boot/initrd.img-2.6.31-20-generic
quiet

title Ubuntu 9.10, kernel 2.6.31-20-generic (recovery mode)
uuid 3e4fd397-37c4-4cfc-ad56-54efcd710041
kernel /boot/vmlinuz-2.6.31-20-generic root=UUID=3e4fd397-37c4-4cfc-ad56-54efcd710041 ro single
initrd /boot/initrd.img-2.6.31-20-generic

title Ubuntu 9.10, memtest86+
uuid 3e4fd397-37c4-4cfc-ad56-54efcd710041
kernel /boot/memtest86+.bin
quiet

Revision history for this message
subliminalfix (subliminalfix) said :
#5

great tips marc, you can run VirtualBox, QEMU or VMWare so you would have them both up simutaniously

or perhaps this may help https://help.ubuntu.com/community/GrubHowto/ChangeDefaultOS

hope those help

Can you help with this problem?

Provide an answer of your own, or ask noam for more information if necessary.

To post a message you must log in.