Re: Reinstall GRUB?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Doctor Who wrote:

OK....the root partition for Fedora *used* to be /dev/sda2 and now is
/dev/sdb2.  This is seen here:


I have changed /etc/grub.conf manually to be:

# 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,1)
#          kernel /boot/vmlinuz-version ro root=/dev/sda2
#          initrd /boot/initrd-version.img
#boot=/dev/sda2
default=2
timeout=5
splashimage=(hd1,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.23.14-107.fc8)
        root (hd1,1)
        kernel /boot/vmlinuz-2.6.23.14-107.fc8 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.23.14-107.fc8.img
title Fedora (2.6.23.9-85.fc8)
        root (hd1,1)
        kernel /boot/vmlinuz-2.6.23.9-85.fc8 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.23.9-85.fc8.img
title Fedora (2.6.21-2952.fc8xen)
        root (hd1,1)
        kernel /boot/xen.gz-2.6.21-2952.fc8
        module /boot/vmlinuz-2.6.21-2952.fc8xen ro root=LABEL=/ rhgb quiet
        module /boot/initrd-2.6.21-2952.fc8xen.img
title Fedora (2.6.21-2950.fc8xen)
        root (hd1,1)
        kernel /boot/xen.gz-2.6.21-2950.fc8
        module /boot/vmlinuz-2.6.21-2950.fc8xen ro root=LABEL=/ rhgb quiet
        module /boot/initrd-2.6.21-2950.fc8xen.img

Where all (hd0,1) were changed to (hd1,1).

What else needs to be done?

Thanks.

I suspect that root is really /dev/sdb3 and /boot is /dev/sdb2. Probably the easiest if to boot the Linux install you say works, and then mount the F8 file system.

mkdir /mnt/F8
mount /dev/sdb2 /mnt/F8
chroot /mnt/F8
grub-install (hd1,1)
exit

You may have to use /dev/sdb2 instead of (hd1,1)

The reason you have to run grub-install is to update the grub first stage to point to stage 1.5 on the second hard drive instead of the first one. What the chroot command does is the root directory from what the one you booted to the one from F8 that you mounted on /mnt/F8. That way, Grub uses the correct directories. You could also use something like:

mkdir /mnt/F8
mount /dev/sdb2 /mnt/F8
grub-install --root-directory=/mnt/F8/boot/grub /dev/sdb2

This will work most of the time, but it may cause problems if you have different versions of Grub. (You probably do not.)

You also have the option of using the rescue CD and telling it to re-install the boot loader. But I have not used this with more then one version of Linux installed, so I am not sure of the results in this case.

Mikkel
--

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux