Home | About | Help Center | Privacy Policy

Try Our "Facebook App"

June 14th, 2007

How to restore Linux Grub


Accidentally if GRUB of your dual-boot system with Linux and Windows was deleted either due to your monthly reinstall of Windows, and now you don’t see the linux bootloader anymore, so you can’t boot into Ubuntu or whatever flavor of linux you prefer.This is the easy way to re-enable Grub.

  1. Boot off the LiveCD
  2. Type in the following commands in a Terminal and, noting that the first command will put you into the grub “prompt”, and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed grub to during installation. If not, then adjust accordingly.
sudo grub
>root (hd0,0)
>setup (hd0)
>exit

Reboot (removing the livecd), and your boot menu should be back.

Only read below if Windows is now missing from the boot menu

If you installed Ubuntu before you installed Windows, then Ubuntu will not have anything in the grub configuration for Windows. This is where you’ll have to do a bit of manual editing to the grub boot menu file.

If you open the file /boot/grub/menu.lst with the following command:

sudo gedit /boot/grub/menu.lst

You’ll see a sample section for Windows, which you’ll want to uncomment and add to the boot menu list in whatever position you want it in. (uncomment by removing the #’s)

# title   Windows XP/Vista
# root   (hd0,0)
# makeactive
# chainloader   +1


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackbackfrom your own site.

Subscribe to our FREE Rss Feed

Hot in Social Media


10 Ways Social Media Can Help Your Business

10 Best Social Media Case Studies

10 Tips To Become Social Without Using Social Media

Top 10 Tips To Enhance Personal Branding

What's Hot

Similar Interesting Posts

Tutorials On

2 Responses to “How to restore Linux Grub”

  1. Hey i bought BSNL 144 Kbps NIC card and am using Ubuntu, will anybody help me to configure NIC card in Ubuntu
    Card name:
    HUAWI
    model no:EC321
    Connection mode:Via Usb

    These are the information i know , they gave us an installation for windows its not good,
    actually i call to bsnl office to configure for Ubuntu But they dont know

    Please Help me:Thank you for comment

    log
    http://www.newseminar.co.cc

  2. hi
    I deleted xp and ubuntu few days back.then now i installed ubuntu 9.04 in 30 gb(hd 04) rest of the drives are in ntfs format.now iam thinking to install windows 7. what happen to grub if i install windows 7.will grub will be deleted

Leave a Reply

CommentLuv Enabled

Additional comments powered by BackType

    Follow @honeytech On Twitter

    @techim #LSD No Love, Low Sex and only Dhokha :(
  • Subscribe For Tips


  • Top Fans Of The Day

  • Sponsors

Hot Tags

google How to Firefox mobile Designs Linux Internet tips open source browser Social free Web design mistakes ubuntu Windows iphone WordPress Plugin blogging Social media