On Feb 20, 2014, at 12:55 PM, Bob Goodwin <bobgoodwin(a)wildblue.net> wrote:
I would like to boot Fedora-20 from the Centos 6 grub. So far my
efforts have not been successful.
I've tried various thing I found via Google to no avail ...
For instance the following does not work:
[root@box10 bobg]# cat /etc/grub.conf
# 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,2)
# kernel /boot/vmlinuz-version ro root=/dev/sdb3
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sdb
default=0
timeout=15
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
title CentOS (2.6.32-431.el6.x86_64)
root (hd0,2)
kernel /boot/vmlinuz-2.6.32-431.el6.x86_64 ro
root=UUID=9f464c84-21b9-4af8-b0b7-b6b9128815bd rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD
SYSFONT=latarcyrheb-sun16 rd_LVM_LV=fedora_box10/swap KEYBOARDTYPE=pc KEYTABLE=us
rd_NO_DM
initrd /boot/initramfs-2.6.32-431.el6.x86_64.img
title Fedora-20
root (hd0,1)
kernel /boot/grub/core.img
boot
Assuming the firmware is BIOS and not UEFI…
In the Fedora 20 installer, if you chose to not install a bootloader, core.img isn't
created so it doesn't exist. If you're going to hand write the grub.conf by using
GRUB 0.98 in CentOS, then write the entry to point grub to the actual Fedora 20 kernel and
initramfs rather than chainloading. But if you really want to chainload, then you have to
boot Fedora netinst or DVD in rescue mode, and install grub2 with this command:
grub2-install --grub-setup=/bin/true /dev/sda
That option causes grub2-install to only create core.img without overwriting the grub
legacy code in the MBR and MBR gap.
However, the best practices method is to allow Fedora 20 to stomp on the CentOS 6 grub, so
that you have Grub2. And then either:
a.) Use the grub2 default behavior that causes it to create an entry for Fedora and CentOS
automatically, which then isn't automatically updated when you do CentOS kernel
updates; you'd have to run grub2-mkconfig.
b.) Disable the os-prober option in grub2, so that a CentOS entry isn't created
automatically. Instead edit /etc/grub.d/40_custom to including a menu entry using the
'legacyconfigfile' command pointed to the CentOS grub.conf, and then do a one time
grub2-mkconfig to write out a new grub.cfg, which will cause grub2 to read and display the
CentOS grub.conf menu when chosen. This way, the Fedora grub.cfg and the CentOS grub.conf
are properly updated automatically when kernel updates happen and is thus maintenance free
once configured.
Chris Murphy