Restore Grub from a live CD
Written by edmond in Applications, Gnu-Linux, SGD, Security, Tips & Tricks, UtilitiesW hen you configure a computer to dual boot between Linux and Windows, we must remember that Windows is installed first, because, while Linux from what democratic system recognizes the presence of another OS, but it beats Windows and overwrites the 'MBR, making it impossible to choose dell'alltro os. If this happens, everything can be solved using a live CD. Once booted from the live CD, we mount the partition on which you installed Linux. If you do not know what it is, use:
fdisk-l
then montiamola with
mount-t ext3 / dev/hda1 / mnt
clearly replace hda1 with its corresponding partition. If you had a separate partition for / boot, you must also install the
mkdir / mnt / boot mount-t ext3 / dev/hda2 / mnt / boot
even the file system mount / dev and proc
mount-bind / dev / / mnt / dev mount-t proc proc / mnt / proc
now we chrooted
chroot / mnt
then we go into Grub and we give the following commands
grub root (hd0, 1) setup (hd0) quit
where hd0, 1 and hd0 refers to the first partition of first disk. To avoid this procedure may make up the 'MBR, follow these steps. Another very useful tool, is to use Super Grub Disk, and as a downloadable floppy image, both as cd-rom.
Tags: grub, mbr















