> I've asked this question in the past and just havn't been able to get an > answer with a solution, or if I can even do what I want to do so I'm going to > throw it out here again. > > I have a QEMU/KVM environment with flat disk images, no partitioning, no MBR, > just a ext filesystem. These instances are not all the same and are running > different OS's (RHEL, Ubuntu, et> c). I'm wanting to boot these instances > using grub, it's configs, and modules from the disk just the way it would if > grub was installed onto the disk. So far I've been building grub imag> es > using grub-mkimage -O i386-pc -o grub.img biosdisk ext2 normal -p > '(hd0)/boot/grub' and using the -kernel option with QEMU. This does work but > not always. There are some situations w> here i'm seeing errors like this. > > unaligned pointer 0x684355af > Aborted. Press any key to exit. > > The reason I want to load grub, it's modules, and config from the disk is > that distributions like redhat have decided to create modules like blscfg > that are not part of grubs core and I > need my grub image to load those from > the disk so that the instance boots correctly. > > Can I do what I'm wanting to do? If so, how? I don't want to have to build a > bunch of grub versions to match each OS. > > -- > Shaun Reitan
I think what i understood from you is two points: * You are trying to make grub boot your virtual machines. First you must understand grub is just a bootloader it has nothing to do with VMs. Virtual machines are managed by the kernel, qemu also is just helper. * You are trying to load external Grub module that isn't compiled with the one booting. If that is the case then this is unfortunetly not possible as i know, even if it does not stable (you already saw misaligment issue). The best way is to compile modules with at least grub source compiled. Those distributions maybe have there own fork and do the same, which is compiling with it and ship Grub with there modules. Khalid Ali _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel