Categories
How-to Tips Ubuntu

How to Fix ‘Grub Rescue’ Prompt for Ubuntu

After I have installed dual-booting Windows 7 with Ubuntu 12.10, my laptop stuck on grub rescue screen and cannot continue to boot screen. Actually after I installed Ubuntu I want to install Windows 8 and then compare them and determine which is the best. But I must delay to compare them and try to solve grub rescue problem.If you see the same problem with image below, I will tell you how to solve grub rescue problem.

Grub Rescue
Grub Resuce – Image by BuggingWeb.com

I try to find the solution in every search engine like Google, Yahoo, etc. Finally I found this site and I can solved grub rescue problem. In my own word, if you have installed Ubuntu 12.10 you must have Ubuntu 12.10 Live CD to solve grub rescue problem.

 

  1. We cannot access Ubuntu OS through normal boot process because we have grub rescue problem, so you need to boot from CD. Change the BIOS boot order, choose CD/DVD if you use Ubuntu CD or USB Flashfisk/FD if you use flashdrive. Then boot into Ubuntu Live CD
  2. Open Terminal, type sudo fdisk -l and then determine which partition Ubuntu has been installed, e.g in sda7
  3. Type these on Terminal to mount Ubuntu partition
    sudo mkdir /mnt/temp 
    sudo mount /dev/sdXY /mnt/temp  # Example: sudo mount /dev/sda5 /mnt/temp
  4. Then type these
    for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt/temp$i;  done
    sudo cp /etc/resolv.conf /mnt/temp/etc/resolv.conf  # May be required to connect to the Internet.
    sudo chroot /mnt/temp

    If the command run successfully, the terminal prompt would include ‘root’ (root@ubuntu:/#). Don’t panic, it indicates that you are in chroot environment.

  5. Connect to the internet, then you have to type these to get necessary Grub packages
    sudo apt-get update
  6. The next command will purge Grub installation. Read the warning, tab to highlight YES and press Enter
    apt-get purge grub grub-pc grub-common
  7. Reinstall Grub packages.
    • You will be given the opportunity to add extra kernel options to the kernel line. If you don’t know, you probably don’t need them ; TAB to highlight “<OK>” and press ENTER.
    • Read the installation notes. TAB to “<OK>” to continue.
    • When presented with the device option, use the UP/DN keys to select the correct drive (sdX).
      • Make sure the installation drive [*] /dev/sdX has an asterisk next to it ( example: [*] /dev/sda ). If it doesn’t, highlight it and press the SPACE bar to select it.
      • Do not select a partition ( example: [ ] /dev/sda5 , etc).
    • TAB to “<OK>” and press ENTER. When it has finishing the installation, you should have Grub 2 installed.
    apt-get install grub-common grub-pc
  8. Update Grub2 files
    update-grub 
  9. Exit the chroot environment
    exit
  10. Unmount what you previously mounted
    for i in /dev/pts /dev /proc /sys; do sudo umount /mnt/temp$i ; don
  11. Reboot.

 

Then you can boot normally and you can access Ubuntu without using live CD.

Grub rescue problem is very annoying problem. But after read this post and practice it I hope you can solve grub rescue problem 🙂

source

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.