I had Ubuntu 11.10 on my laptop, then I determined to install Windows 7 and keep both of them on my machine (dual boot), then I installed Window 7.

And then Windows 7 was running, but Ubuntu didn't appear in the grub menu.

I then ran Ubuntu from a live usb disk and edited GRUB to make Ubuntu boot:

sudo mount /dev/DEVICENAME_FROM_STEP_ONE /mnt
sudo rm -rf /boot
sudo ln -s /mnt/boot /boot

Now Ubuntu 11.10 is booting automatically when the laptop start, but Windows 7 doesn't appear at all in the grub (there is no grub menu at all).

Now I want to let Windows 7 appear in the grub menu to let me choose (Ubuntu + Windows 7). I've read these commands but it doesn't work with me:

sudo gedit /boot/grub/menu.lst
  • A large text file will open and at the bottom leave a line and add this:

  • (Just a blank text file opened with me -not a large one- i don't know why)

    title windows 7 beta (Loader)
    root (hd0,1)
    chainloader +1

Do not type this line but if that does not work on re-boot try hd0,0 or hd0,2 and so on until it works.

  • The commands don't work because that's for an old version of GRUB. Could you please include the contents of /boot/grub/grub.cfg in your answer? – RobinJ Nov 12 '11 at 14:42
  • that's right RobinJ.. when i updated the grub it worked well.. thanks for your reply – Salahuddin Nov 12 '11 at 14:57

Try running sudo update-grub from a terminal in Ubuntu. That should add Windows to the GRUB menu.

|improve this answer|||||
  • Thanks alot for your help .. i does work with me now..i can switch windows7 and ubuntu 11.10..thanks again – Salahuddin Nov 12 '11 at 14:56
  • @Salahuddin I see your new on AskUbuntu. When an answer solved your problem, it's usual to click the tick icon on the left of the answer so that it becomes green, marking the answer as accepted. :) – RobinJ Nov 12 '11 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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