Thursday, January 29, 2009

Restoring GRUB On Linux Machine.


Simple steps to reload the grub on any linux box :

1 .Boot from the linux live cd (ex: knoppix, ubuntu).

2. After sucuessful booting, Open a terminal,

3. Mount the root partition on any of the file system (ex : /mnt )

Ex : mount /dev/sda2 /mnt or /media

To check the root partition you can user fdisk -l or cfdisk.

4. Reload the grub.

grub-install --root-directory=/mnt /dev/sda (Specify the device not the partition)


grub-install /dev/sda

5. Reboot the machine. Now you should be able to access your OS.

Enjoy.. :-)

No comments: