Skip to contentSkip to conversation

Chainloading ntldr and grldr from grub2

DISCUSSION Bean 1 participant 1 message Dec 1, 2007

lore
Share & tools
lore

Bean

author
#0 lore raw

Hi,

The idea actually comes from my previous post about converting core.img to linux kernel format. Instead of combining the header and the image, we can make the header separate, and load the image as initrd. This method can be used to load system images like ntldr and grldr. For example, to chainload ntldr from grub2:

linux loadbin.bin
initrd ntldr

This method is not limited to grub2, it can also be used in boot loaders which support the linux kernel format, such as syslinux/lilo/grub.

To compile loadbin.bin, use the following commands:

gcc -nostdlib -DLOADBIN -Wl,-N -o lnxhdr lnxhdr.S
objcopy -O binary lnxhdr lnxhdr.bin

Signature · 1 line
Bean