[Top][All Lists]

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

Re: Load grub from grub (XEN-PVH)

From: Andy Smith
Subject: Re: Load grub from grub (XEN-PVH)
Date: Thu, 3 Mar 2022 23:58:23 +0000
User-agent: NeoMutt/20170113 (1.7.2)

Hi Shaun,

On Thu, Mar 03, 2022 at 08:59:17PM +0000, Shaun Reitan wrote:
> if I try to use a distro like CentOS 8 I run into problems because
> they look to have patched in something called blscfg and what ends
> up happening is I get the error /boot/grub/i386-xen_pvh/blscfg.mod
> not found.

I have worked around this at the moment by doing:

echo "GRUB_ENABLE_BLSCFG=false" >> /etc/default/grub

in the CentOS guest, which disables that feature and ends up
producing a grub.cfg that upstream GRUB understands.

> I'm curious if there is a way to build a grub2 PVH image that would load
> grub2, it's config and modules from the disk?

I think that should be doable but I don't know exactly how to build
that image right now. The Debian package of grub-xen-host gives the
file /usr/lib/grub-xen/grub-i386-xen_pvh.bin (amongst others). If
you install that package in a Debian guest are you able to load it
with a (dom0) grub.cfg like

if search -s -f /usr/lib/grub-xen/grub-i386-xen_pvh.bin ; then
  menuentry "Load PVH GRUB from guest /usr/lib/grub-xen/grub-i386-xen_pvh.bin" {
    search -s -f /usr/lib/grub-xen/grub-i386-xen_pvh.bin
    echo "Booting (${root})/usr/lib/grub-xen/grub-i386-xen_pvh.bin..."
    multiboot /usr/lib/grub-xen/grub-i386-xen_pvh.bin

If that works then I'm assuming there is no such package in CentOS
that provides grub-i386-xen_pvh.bin so you'll have to make a package
yourself for installation in guests. You probably already know how
to do that since you've done it for your dom0, but if not, it is not
too difficult.

I have only ever tried the PV version of the above and that worked,
but there is no interest amongst my users in running their own grub
binary so I haven't tried it again in years and haven't updated it
for PVH, which is now my default. CentOS and Fedora switching to
blscfg before upstream GRUB has the feature is irritating but as
long as it can be disabled I will do that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]