[ipxe-devel] wimboot: loading by grub
Bernhard Übelacker
bernhardu at vr-web.de
Sat Jun 21 12:00:47 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I was just curious why wimboot works when loaded by ipxe, but would
fail when loaded by grub.
I think I found the issue: wimboot expects to be loaded to 0x1000 but
grub loads it to 0x9000.
In more detail in prefix.S at the setup label is a ljmp:
ljmp $PREFIX_SEG, $1f
That has PREFIX_SEG hardcoded to segment 0x1000 but we would like to
jump to 0x9000.
Defining PREFIX_SEG to 0x9000 and recompiling produced a version just
working with grub.
With attached patch wimboot can handle to be loaded by both.
Any comments are welcome.
Kind regards,
Bernhard
PS.: Thats an example grub.cfg entry (took me some time to figure out
that we need linux16 and how the on-the-fly packing to cpio archives
is working.
menuentry "wimboot" {
linux16 /boot/wimboot
initrd16 \
newc:bootmgr:/boot/ISO.ROOT/BOOTMGR \
newc:bcd:/boot/ISO.ROOT/boot/BCD \
newc:wgl4_boot.ttf:/boot/ISO.ROOT/boot/fonts/wgl4_boot.ttf \
newc:boot.sdi:/boot/ISO.ROOT/boot/boot.sdi \
newc:vistape.wim:/boot/ISO.ROOT/vistape.wim
}
The corresponding ipxe script:
#!ipxe
imgfree
kernel /boot/wimboot
initrd /boot/ISO.ROOT/BOOTMGR bootmgr
initrd /boot/ISO.ROOT/boot/BCD bcd
initrd /boot/ISO.ROOT/boot/fonts/wgl4_boot.ttf wgl4_boot.ttf
initrd /boot/ISO.ROOT/boot/boot.sdi boot.sdi
initrd /boot/ISO.ROOT/vistape.wim vistape.wim
imgstat
boot
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJTpXPoAAoJEOlvol+DpkHmUF4IALLA5cb/JJC2Aghcwz7YPOra
6Iu6OHd+Nwo5vJjYAoXu5XhgbgX0tLSraRaMwl7kc3h59hIne2fZfd94gbJJcYju
4BVwmACszN0jdh92dfXX66gtIqTNSGFt15pIEdiK13gvdV+ICXCVmtwpcYqwKI9Y
75Vq8Fv2dMvWp2icqg/SSfbuesG4sp1L17ys4NBFfukpeZOVwAn2ffExY++lfi/Y
lhPj/GA7x7rhE6ac5/hptlBX6Q6SIQ+eZm6JuHOLpHz38MUjkBnYrytqzOXAYItC
/+moQlytUy8MpU8q6LvY/kt+OQRbeDBxi0bsfIyh8jsp9xPxNdx27ji8eiZBtXM=
=wxZx
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-a-hardcoded-PREFIX_SEG.patch
Type: text/x-patch
Size: 2453 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20140621/ffdfb975/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-a-hardcoded-PREFIX_SEG.patch.sig
Type: application/pgp-signature
Size: 287 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20140621/ffdfb975/attachment.sig>
More information about the ipxe-devel
mailing list