This works using the FC6 first installation CD or the FC6 rescue CD.
To re-install Grub to a non-bootable Fedora Box:
Code:
A
1. Boot off the 1st Fedora CD or use the Fedora Rescue CD
2. At the boot prompt type 'linux rescue'
3. The rescue mode will find the fedora installation
4. Type 'chroot /mnt/sysimage'
5. Type 'grub-install /dev/hda' (to install Grub to the MBR of the 1st HD)
(all commands without quotes)
Having re-installed GRUB to the MBR by following the instructions above,
I then need to do:
Code:
B
grub> find /boot/grub/stage1
(hd0,12)
grub> root (hd0,12)
grub> kernel /boot/vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/hda13
grub> initrd /boot/initrd-2.6.18-1.2798.fc6.img
grub> boot
Obviously, /boot/vmlinuz-2.6.18-1.2798.fc6 & initrd /boot/initrd-2.6.18-1.2798.fc6.img have to exist in the boot directory of the root partition for this to work.
You might get away with section B, without having to re-install GRUB as per section A. If you can do part A, that will allow you to access /boot/grub under /mnt/sysimage. You should be able to then edit your /boot/grub/grub.conf file.
The default OS to boot is set with:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,8)
# kernel /boot/vmlinuz-version ro root=/dev/hda9
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
Code:
default=0 <---- will boot the first entry in the grub.conf file
^
either change this to the entry to boot, or move the entry you want to boot first in grub.conf.
timeout=5
splashimage=(hd0,8)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.22.9-61.fc6)
root (hd0,8)
kernel /boot/vmlinuz-2.6.22.9-61.fc6 ro root=/dev/hda9
initrd /boot/initrd-2.6.22.9-61.fc6.img
title Fedora Core (2.6.22.7-57.fc6)
root (hd0,8)
kernel /boot/vmlinuz-2.6.22.7-57.fc6 ro root=/dev/hda9
initrd /boot/initrd-2.6.22.7-57.fc6.img
title Fedora Core (2.6.20-1.3002.fc6xen)
root (hd0,8)
kernel /boot/xen.gz-2.6.20-1.3002.fc6
module /boot/vmlinuz-2.6.20-1.3002.fc6xen ro root=/dev/hda9
module /boot/initrd-2.6.20-1.3002.fc6xen.img
See 'pinfo grub' for more details.