How To Restore Grub in Ubuntu 9.10 Karmic Koala
By on January 18th, 2010

A common problem many users face after installing either Linux or Windows on a system when the other is already present is an override of the default boootloader. Without a bootloader, the system is clueless about where to get boot data from. In such a case, you can try these simple steps to restore your grub menu with all the Operating Systems present in the list.


  • Boot from Ubuntu 9.10 or any Ubuntu 9.10 derivative live CD ( the CD from which you installed Ubuntu).

  • After the boot is complete, press alt+F2 to open a terminal.

  • Enter the command fdisk as
    sudo fdisk -l
    This lists all the partitions as shown.

  • Mount the drive marked as Linux under System ( the last column) using the command
    sudo mount “device” /mnt
    fdisk
    Replace “path” with the corresponding device ID under the Device Boot section. So, for the given screen-shot,
    my command will be
    sudo mount /dev/sda12 /mnt

  • After the mount is successful,  install grub with the command
    sudo grub-install –root-directory=/mnt “path”

  • Unmount the drive with
    sudo unmount /mnt


Now, restart your system. Your grub will be restored with both Windows and Linux in the menu.

Author: Chinmoy Kanjilal Google Profile for Chinmoy Kanjilal
Chinmoy Kanjilal is a FOSS enthusiast and evangelist. He is passionate about Android. Security exploits turn him on and he loves to tinker with computer networks. He rants occasionally at Techarraz.com. You can connect with him on Twitter @ckandroid.

Chinmoy Kanjilal has written and can be contacted at chinmoy@techie-buzz.com.
  • Indian-Art

    I still have the old GRUB (black and white) because I upgraded from 9.04 to 9.10.

    I think the next upgrade will have the colorful and classy 'new' GRUB. I'm looking forward to that.

    • Abhishek

      The 'new' GRUB is not 'colorful' or 'classy' by default. In fact it looks identical to the 'old' GRUB. You need to download the grub2-splashimages package and play around with config files to make it 'colorful' and 'classy'.

      And, by the way, you can still make the 'old' GRUB 'colorful' and 'classy' too. Just download and install grub-splashimages package and tweak around with the config files. You can find step by step instructions at – https://help.ubuntu.com/community/GrubHowto#Boot%

      • Indian Art

        Thanks, I will definitely check it out.

  • EvansA

    Thanks for post, I am hunting for a fix.

    Note "-" missing in action, else get unrecognised option.

    Using: sudo grub-install -–root-directory=/mnt “path”
    Using full path of /dev/sda6 in line above, I get a warning.
    Attempting to install GRUB to a partition instead of the MBR. This i a BAD idea……….

    using /dev/sda
    I get Installation finished. No error reported, but on reboot it arrive at grub>
    with no menu and no way (that newbie me knows) to get into either ubuntu or windows installed on my machine.

    • Abhishek S.

      Goto the wiki on grub on ubuntu.com. I think the link is wiki.ubuntu.com/grub. Refer the reinstall grub and you should be fine. I have borked my grub too multiple times!

  • Anand

    Thank you very much Chinmoy Kanjilal for efforts to help people. I had too many broken links and installed every application I noticed then one day, I wanted to clean up and marked for removal a lot of stuff from Synaptic Manager and It stopped responding. When I rebooted, I notice that Grub has no information except Memory test. I have booted as of now using USB and running and your page has raised hopes, they were dashed when the mounting sd5, where my Ubuntu is moutned.
    mount: can’t find /dev/sda5/mnt in /etc/fstab or /etc/mtab Please advice.

    Also I notice that I am not able to connect to internet both via ethernet and via wireless Any help would be appreciated.

    Thanks in Advance
    - Anand

 
Copyright 2006-2012 Techie Buzz. All Rights Reserved. Our content may not be reproduced on other websites. Content Delivery by MaxCDN