S
S
speedvm2022-02-04 08:57:40
GRUB
speedvm, 2022-02-04 08:57:40

How to put iPXE script content in grub.conf?

I welcome everyone!
There is usb with grub2 on board. One of the grub menu options is to load the iPXE menu from an external server:

menuentry "Menu iPXE {
        linux16 /ipxe.lkrn 
        initrd16 /ipxe.cfg
}

Contents of ipxe.cfg:
#!ipxe
dhcp ; chain http://pxe.server/menu.ipxe


Question: Is it possible to transfer the contents of the ipxe.cfg file directly to the grub.cfg file in some tricky way?
I tried to specify strings as ipxe.lkrn kernel parameters, but this thing does not work.
I tried to do it by analogy with grub4dos:
set config_line="dhcp ; chain http://pxe.server/menu.ipxe"
linux16 /ipxe.lkrn --config-file=$config_line
But it doesn't roll either.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
speedvm, 2022-02-04
@speedvm

The menu item should look like this:

menuentry "Menu iPXE" {
        linux16 /ipxe.lkrn dhcp \; chain http://pxe.server/menu.ipxe
}

PS: if only grub2 could "on the fly" without crutches and ipxe.lkrn pull off boot.ipxe.org , there would be no price for it. )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question