I had windows vista and ubuntu 9.04 on my machine. Ubuntu has installed grub boot menu and it automatically detected windows vista installation and added it to the grub boot menu.
 
Now i installed windows seven and looks like it screwed up the grub boot loader. When i boot all i see in Windows Seven and Windows Vista from the boot menu (this is not grub boot menu). It is the windows boot menu. Now I can't even access or boot to my ubuntu.
 
How to fix this so that i can get my ubuntu back?

1 answers, votes, 7601 views
win7's picture
asked by win7
2 years 17 weeks ago



1 Answers

  • i am having the same problem here. every time a new windows version released they just overwrite other boot loaders. but never have these kind of problems with ubuntu. for example grub boot loader detects other operating systems and gives a decent menu to boot from. microsoft should follow this. - mahi 2 years 16 weeks ago
  • Answer
    Best Answer

    You have to reinstall grub boot loader to fix this. Reinstalling grub can be done in 4 easy steps.
    Please follow these steps to reinstall grub boot loader
     

    • Boot your machine using Ubuntu Live CD
    • After the machine is booted and ready, Open a terminal window
    • Type sudo grub
    • Now type find /boot/grub/stage1
      • You will get some output like (hd0,4). Yours might be different. But make sure you enter it same as it appears in the next step. For ex if your output is (hd0,2), enter root (hd0,2) in the next step 
    • Enter root (hd0,4)
    • Enter setup (hd0)
    • Enter quit

    Reboot the machine, Now your machine should boot using grub boot loader.
    Have fun with ubuntu.
    NOTE: While you enter grub> setup (hd0) your output might look like the following:-

    setup (hd0)
     Checking if "/boot/grub/stage1" exists... yes
     Checking if "/boot/grub/stage2" exists... yes
     Checking if "/boot/grub/e2fs_stage1_5" exists... yes
     Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  17 sectors are embedded.
    succeeded
     Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,4)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
    Done.

     

    linuxrocks's picture
    answer by Linux Rocks
    2 years 16 weeks ago
  • If it says "command not found", just install grub using
    sudo apt-get install grub and follow the instructions as mentioned above

    - Visitor 16 weeks 2 days ago
  • this command def doesn't work any longer.  I get the same error message "command not found" even with root permission.
     

    - Visitor 1 year 19 weeks ago
  • yeah this def doesn't work any longer.  it says command not found even with root permission.

    - Visitor 1 year 19 weeks ago
  • I followed the instructions, it comes back with
    sudo: grub: command not found
    ubuntu@ubuntu:~$

    - Visitor 1 year 26 weeks ago
  •  I hav Asus K40in  and i installed it in but it dosn;t work

    - Visitor 1 year 36 weeks ago
  • Exactly what i was looking for, thanks much!!

    - Visitor 2 years 14 weeks ago
  • Ubuntu 11.04 released!

    Ubuntu 11.04 code named natty narwhal is released download ubuntu 11.04

    Read ubuntu 11.10 reviews and share yours now!!

    View in your own language!

    Stay Connected

    Ubun2.com on Facebook Ubun2.com on Twitter RSS Feeds

    Poll

    Favorite desktop environment?: