Showing posts with label grub. Show all posts
Showing posts with label grub. Show all posts

Sunday, May 27, 2012

Debian 6.0.4 grub installation failed

Well, I'd like to share a problem which I had a few days ago. Hope the solution will be helpful to others who got into the same trouble.

Problem:

I downloaded and burnt Debian 6.0.4 distro into a DVD, and starts to install it. Everything was okay, but the grub installation failed. Then I skipped that step and let it to continue. Once it finished the installation, it rebooted the machine and there was nothing to boot.

Solution:

The reason for the above problem is, the boot loader wasn't found. The solution is too easy, all you need to do is, install the grub boot loader manually. Unlike grub version 1, in grub version 2, you need to install a package called "grub-pc". But how ?

  • Put your Debian 6 DVD and let it boot.
  • Then you will get a menu where you need to choose "Rescue mode"
  • There will be a process somewhat similar to installation process. 
  • When you get a list of partitions to boot, select the previously installed partition and run the shell on it. (you will get an option)
  • It will load a simple shell, where you have only basic commands. 
  • To install the "grub-pc", you need to add the cd-rom to the repository list. "apt-cdrom add"
  • As usual run "apt-get update"
  • Then install grub-pc, "apt-get install grub-pc"
  • You are done !!!


Sunday, January 2, 2011

Reinstalling grub boot loader

This post is only for the Linux users. If you want to use Linux with Windows you need to install a boot loader. Most of the latest distros provides a boot loader (ex: grub) and it installs automatically with the OS. If you install Windows after installing Linux the boot loader will disappear, in other words, you are unable to load Linux OS. To solve this problem you need to reinstall grub boot loader. First of all, you need to find a live Linux CD and boot it without installing. ( http://www.livecdlist.com )

1. Open a terminal and log in as root.
:~> su -
or use "sudo"  

               
2. run grub
 :~# grub
or :~> sudo grub

3. finding master boot record
grub> find /boot/grub/stage1

4. If you know where the master boot record
grub> root (hd0,6)

5. Setup the boot loader
grub> setup (hd0) 
grub> quit

 Now you can have both operating systems.