On Fri, 07 Feb 2025 00:06:51 +0000
"Shaun Reitan" <shaun.rei...@ndchost.com> wrote:

> I'm using qemu with KVM acceleration to boot an ubuntu 22.04 instance.  
> The disk is a lvm that is flat. Not partitioning, just an ext4 
> filesystem.  I've build a grub image to be used with the -kernel option 
> of qemu.  I've also built and am using custom version of seabios with 
> virtio support.
> 
> I'm building the grub kernel using the following command
> 
> /opt/grub2-i386/bin/grub-mkimage -O i386-pc -o grub.img normal biosdisk 
> ext2 -p '(hd0)/boot/grub'

You say you want to run in QEMU, so I think you should be using the
i386-qemu target. I'm not sure if this is the cause of your problem
though.

> 
> The idea here is that the grub kernel will load grub, it's config, and 
> any required modules from the instances disk. I have successfully been 
> able to do this with AlmaLinux/RHEL 9 but for some reason I cannot get 
> it to work with Ubuntu 22.04 LTS.  Grub loads, I see the options as 
> expected but when I select an option I immediately get the following 
> error and I can't seam to figure out why.  It's driving me crazy.
> !
> 452: out of range pointer: 0xbfec8630
> 
> 
> Any idea's what's going on here?  Or how to figure out whats going on? 
> Remember the disk is flat, no partitioning and no MBR.

Set debug=all as the first thing in the menu entry being selected. This
might give a clue as to what is causing the error. It looks like the
error is coming from malloc_in_range() at
grub-core/lib/relocator.c:452. Without really looking it to, a wild
guess is that you don't have enough memory allocated.

Glenn

> 
> On a side note, if I pull the vmlinuz and initrd from the disk image and 
> use them with the -kernel and -initrd qemu params I am able to boot the 
> instance.
> 
> --
> Shaun Reitan
> 

Reply via email to