help-grub
[Top][All Lists]
Advanced

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

Building a kexec'able grub image


From: Lincoln Thurlow
Subject: Building a kexec'able grub image
Date: Thu, 21 Feb 2019 22:41:34 +0000

Hello all,

I would like to build a grub image which I can kexec into.

I’ve cloned the grub repo and run:

./autogen.sh
./configure --target=i386
make

sudo ./grub-mkstandalone -d grub-core -O i386-multiboot -o multiboot.img \
--locales= --themes= --fonts= --install-modules="ahci all_video at_keyboard \
biosdisk cat chain configfile cpio disk drivemap ehci elf ext2 fat font gzio \
gptsync hello help iso9660 linux ls lvm msdospart multiboot2 normal part_gpt \
part_msdos serial usb_keyboard vga_text xfs zfs echo search” \
"boot/grub/grub.cfg=/tmp/grub.cfg”

The file generated is a:
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked,
stripped

grub-file confirms it is a i386-multiboot image.

However, when I run:
kexec -l i386-multboot.img
kexec -e

I get a pastel solid color screen, when I expect to get the grub menu.

I can create an i386-pc grub image (changing i386-multiboot to i386-pc) with
file type: data, which kexec cannot correctly parse the non-elf headers. If
I take that image and use qemu, I am able to get the grub menu as I expect.

qemu-system-x86 -kernel i386-pc.img -vga std -m 2048


To summarize, I am looking for assistance in building a grub kexec’able image
as a kernel or initramfs which can be used to load a grub.cfg file.

Thank you,

Lincoln

reply via email to

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