Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chainloading grub2 pxe efi file
2016-11-27, 16:45
Post: #4
RE: Chainloading grub2 pxe efi file
There is loots and loots of examples on how to use ipxe to load different things, but below is example for working in both legacy and efi mode and depnding on CPU bitness

In this case it is based on systemrescuecd

Code:
#!ipxe

# if kbmap is not already set, we set a default to avoid question on boot
isset ${kbmap} || set kbmap us

# generate a setting with 32 or 64 depending on what the cpu supports
cpuid --ext 29 && set bitn 64 || set bitn 32


# This is for 4.8.1-beta002.iso or later
kernel altker${bitn} initrd=initram.igz initrd=sysrcd.dat.cpio edd=off vga=791 scandelay=0 dodhcp setkmap=${kbmap} nomdadm nodmraid rootpass=l
initrd initram.igz

# ipxe does currently only support adding cpio headers on the fly to bzImage boots,
# but not efi, for now use preadded cpio header
# generate with: echo sysrcd.dat | cpio -H newc -o > sysrcd.dat.cpio
initrd sysrcd.dat.cpio

boot

If you put this in a separate "sysrcd.ipxe" file and then chain http://server/sysrcd.ipxe
it should boot (As long as you have all the other files available as well)

This is just an example, and it can be done easier and more advanced, it is also possible to have menues and other things, se http://ipxe.org/cmd/menu as a base for how menues can be implemented.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Chainloading grub2 pxe efi file - NiKiZe - 2016-11-27 16:45



User(s) browsing this thread: 1 Guest(s)