Differences between revisions 1 and 2
Revision 1 as of 2005-05-06 14:56:58
Size: 973
Editor: anonymous
Comment:
Revision 2 as of 2006-09-28 15:35:04
Size: 1028
Editor: ?MikeWilliamson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
To recover grub you need a console from a live CD. For example, boot with Debian installation CD and hit crtl+alt+F2. Knoppix makes the work too. Then mount the Debian '' in the hard disk, change the mount point to be the new '' and exec grub-install. To recover grub you need a console from a live CD. For example, boot with Debian installation CD and hit ctrl+alt+F2. Other live CDs will also work, such as Knoppix. Then mount the Debian partition '' on the hard disk, change the mount point to be the new root'' and exec grub-install.
Line 18: Line 18:
May be you need to load the fs module manually before mounting, for example You may need to load the fs module manually before mounting, for example:

Recover Grub

Imagine for any reason you have any other crapy OS installed next to Debian. And for any reason you need to reinstall it because is really broken. Again, imagine this crappy OS has a crappy installation and overwrites the disk MBR to own the full computer. What's next? reinstall Debian? no

To recover grub you need a console from a live CD. For example, boot with Debian installation CD and hit ctrl+alt+F2. Other live CDs will also work, such as Knoppix. Then mount the Debian partition on the hard disk, change the mount point to be the new root and exec grub-install.

May be these commands clarify the steps. For this example, Debian is in /dev/hda2

 # mkdir /my-debian
 # mount /dev/hda2 /my-debian
 # chroot /my-debian
 # grub-install /dev/hda
 # exit
 # umount /my-debian
 # reboot

You may need to load the fs module manually before mounting, for example:

 # modprobe reiserfs

That's all. No more, no less.