Posted by: cyriacsmail | December 26, 2007

Get me back my distro safe…..GRUB re-installation

There are many cases where you lose the grub and you cannot get back in to you world..
just like windows reinstallation… partitioning the HDD.. etc .

here is a very simple way to reach you world easily.

* pop in the ubuntu live cd

* mount ur linux partition
mount -t ext3 /dev/sda8 /mnt/tmp
considering that sda8 is the partition where linux is installed

* install grub

grub-install --root-directory=/mnt/tmp /dev/sda

* restart the computer and you will see the Grub back

sda is basically for sata drives..

for older drives it should be hda, hdb etc.. and for special devices it should be sdb i guess..

thanks to Jain johny for the clue.

Responses

grub-install –root-directory=/mnt/tmp /dev/sda
what kind of command is this????

–root-directory=DIR
install GRUB images under the directory DIR instead of the root
directory

its something like installing the grub into the the linux partition which has been installed earlier. other than the root partition of the live cd ..

da
u can do this by this method also
instead of directory mode….
boot up with your linux disk and enter rescue mode..then the linux image will be mounted on /mnt/sysimage..

chroot /mnt/sysimage
grub-install /dev/sda

but then you need alternate in case of ubuntu… the rescue option is not present in the normal discs…

Leave a response

Your response:

Categories