I have made my Ferrari 3400 a triple-boot machine. I have Windows XP, Vista RC2 and FC6. The proper way to set it up is to install the XP first, then Vista and finally FC6. Therefore, I can use Grub as my boot manager to switch between Linux and Windows. However, if you decide to install or re-install Windows, the grub is gone and you can boot to Windows only.
Here are the procedures I use to restore grub.
- Boot the machine using a KNOPPIX live cd.
- Bring up a root shell.
- My main Linux partition is on hda8, so I use this command to mount it.
mount -o dev,rw /dev/hda8 /mnt/hda8
- I have a separate boot partition hda6, so I need to mount it, too. You can skip this step if you don’t have it.
mount -o dev,rw /dev/hda6 /mnt/hda8/boot
- Finally, I run grub-install to re-install
grub-install --root-directory=/mnt/hda8 /dev/hda
This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.
How to restore grub . After type linux rescue will go to shell like this sh-05b# here i type chroot /mnt/sysimage its showing ” chroot: cannot change root directory to /mnt/sysimage : no such file or directory” i dont know what is the problem plz help sombody to this problem
What bootable CD did you use? Have you tried to use Knoppix CD? If you use Knoppix, you don’t have to type linux rescue, just hit enter to boot normally.
i found an easier solution to the grub not being shown at the first boot after installing fc6:
use fc6 dvd to boot
press F5 for linux rescue
type linux rescue, press enter
now, at the prompt, type:
grub — to enter grub program
root (hd1,0) — my fc6 is on 2nd hdd, 1st partition
setup (hd0) — my xp runs on 1st hdd
press ctrl-alt-del to reboot, et voila 🙂
hope that helps
The above method has the advantage of not being distro specific. I personally find it much simpler too. All one has to do is mount the device (easily done by gui) and the grub install is just one measly command on the root console. (Knoppix is the real swissknife for any linux enthusiast/administrator).
Thanks Jimmy great solution