Wednesday, July 5, 2017

Ubuntu won't boot, only displays GRUB terminal



I have a problem with my Ubuntu 11.04 installation. I've installed Ubuntu 11.04 from Windows, it worked fine for days, but today it won't boot.



When I start the machine, GRUB loads. There is the Windows 7 loader, I select Ubuntu from there and after that, I should see the Ubuntu GRUB menu, where I'd select the mode to boot Ubuntu. However, I can't see that anymore. I directly get to a GRUB terminal.




Can anyone help me with this? How would I recover my data or reset the boot loader?


Answer



Try reinstalling your grub2 to the partition with Ubuntu:




  • Use an Ubuntu Live CD to start a live session


  • Identify the partition where Ubuntu is:




    • Open gparted (Type gparted in the dash home)


    • Identify the location of the partition. It should be something like '/dev/sda3' or '/dev/sdb2' (in general, '/dev/sd?#' where '?' is a single character and '#' is a digit)


  • Open a terminal


  • Mount that partition (substitute 'sda3' with the partition name you found previously):



    sudo -i
    mkdir /media/ubuntu
    mount /dev/sda3/ /media/ubuntu

  • Reinstall grub in that partition (substitute 'sda3' with the partition name you found previously):




    grub-setup -d /media/ubuntu/boot/grub /dev/sda3


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...