I'm revisiting a old mailing list question I posted that I really never
got to work the way I wanted it too and I ended up abandoning what I was
doing as my time was needed elsewhere. here's the original post link
https://lists.gnu.org/archive/html/help-grub/2017-02/msg00001.html
I do have a better understanding of building a grub kernel image and I
am able to get grub to load from the qemu instances disk. The scenario
is the same, I'm looking to load grub from a disk with no partitioning,
so hd0. I'm still confused if I can load grub from the disk image. Not
just the config file but actually load grub and it's modules from that
disk. The main module I need these days is the blscfg module. I am able
to build an image, use it and run configfile /boot/grub/grub.cfg and
then if I drop into a shell do insmod blscfg and load that module
however what I feel is probably happening is that my grub image is just
loading that module from the disk which seams to work but my concern
here is that the modules on that disk may of been built for a different
version of grub depending on the distro. For example redhat based
distros tend to be way behind on the version of grub used. So my first
question is if that is even possible, or if maybe I'm just not fully
understanding how grub works.
In my previous tests the big issue was that virtio devices was not
supported in grub and biosdisk was very slow. I recently figured out
how to correct this by building my own seabios with virtio support and
using that bios by passing it to qemu with -bios.
I did notice that seabios talks about being able to load grub as a rom
but have found little info on how to do that and i'm not even sure
that's the right direction to go.
All I want to do, is have qemu use grub from the disk just as it would
on a bare metal system.
Quick final question, do you plan to bring add blscfg into the grub
source? Is there an official patch someplace? The random patches I keep
finding look to just be ripped from a few different variations of RHEL
based packages.
--
Shaun Reitan