RFC: Multiboot Guide

Chris Murphy lists at colorremedies.com
Wed Jun 24 22:17:40 UTC 2015


On Mon, Jun 1, 2015 at 12:37 PM, Pete Travis <lists at petetravis.com> wrote:

> I would think that grub2 would boot el6 without chainloading, but I haven't
> tested that...  good catch, I'll look into it.  A bz ticket would help make
> sure the question doesn't fall off the radar, if you have time.

Yes. Use /etc/grub.d/40_custom to create a simple menu entry that
searches for the CentOS /boot volume by UUID, and then use the
'legacyconfigfile' command to point to that volume's
/boot/grub/grub.conf. Ergo, GRUB2 can read GRUB1 configuration files.
And then grub2-mkconfig to create a new (Fedora) grub.cfg that
contains this menu entry.

By default os-prober should find CentOS and create a generic menu entry for it.
a.) This may not happen if CentOS uses LVM, and at the time of
installation when grub.cfg was created, the CentOS root LV wasn't
active. In this case os-prober doesn't find the installation. So you
can make it active to create the generic menu entry which is useful as
a template for the set root and search by UUID command mentioned
above.

b.) After making the 40_custom change you'll probably want to edit
/etc/default/grub to add the GRUB_DISABLE_OS_PROBER=true line so you
don't get superfluous CentOS boot entries.

c.) The generic menu entry might work for some people as is, the
problem is that since it doesn't point to the CentOS grub.conf, kernel
updates don't affect this Fedora grub.cfg so it requires intervention
to create a new grub.cfg in Fedora anytime a CentOS kernel update
happens. Plus, it's a generic entry, you don't get the distro specific
boot parameters.

So for all of these reasons I prefer the use of configfile and
legacyconfigfile (and there's also GRUB support to read
syslinux/isolinux/extlinux configuration files). Sadly, grub2-mkconfig
doesn't create menu entries using these commands by default so it's
not the most user friendly thing.


-- 
Chris Murphy


More information about the users mailing list