Linux Backtrack 5 "grub rescue>"

A lot of people may have had this kind of problem. "grub rescue>" appears because of the non-existent of "grub.cfg". Why? Normally, It is caused by the users who accidentally deleted the installation partition for the OS Linux including the file "grub.cfg".
There are many ways to solve this problem. Some of you may want to use the Live CD of Windows (if you are Windows user), and there are other people who choose to use the OS Linux Live CD such as the Backtrack or Ubuntu or any other types of Linux OS.
But, how if I don't have any Live CD? Relax. Please try the steps below, and good luck.
  1. "grub rescue>" appears on booting process. When "grub rescue>" appears, please type this command:
    grub rescue > ls
    
  2. After that, you will see list of partitions which reside in your computer's hard disk. The lists might look like this:
    (hd0,0) (hd0,1) (hd0,5) ...
    
    This is the moment where you have to choose. You have to choose one of the "(hd0,x)" where your Linux partition is in it. Don't worry in case you pick the wrong one. Hopefully, nothing will happen. The most important thing is choose one of the partition and continue to the next step.
  3. Continue with these commands.
    grub rescue > set prefix=(hd0,6)/boot/grub
    grub rescue > set root=(hd0,6)
    grub rescue > set
    grub rescue > ls /boot
    grub rescue > insmod /boot/grub/linux.mod
    

    If the system gives you warning that the insmod couldn't be recognized, you have to repeat from step two and choose another partition.
  4. Next...
    grub rescue > linux /vmlinuz root=/dev/sda6 ro
    grub rescue > initrd /initrd.img
    grub rescue > boot
    
    If there is no problem, you will see many commands which run automatically and the system will ask you to enter the username boot login "root" and the password "toor". In case you have problem, you have to repeat from step one and choose another partition.
    And then, run your backtrack "startx"
  5. Open the terminal window in Backtrack.
    sudo update-grub
    sudo grub-install /dev/sda
    sudo update-grub
    
    Finally, restart your computer.
Happy coding. Good luck :) FYI. I have no idea whether this kind of troubleshooting can be implemented in any other types of Linux OS. Because, I've only tried it in Backtrack. Thank you.

Labels: , , , , , , ,