iPXE discussion forum
[SOLVED] Kernel parameters over HTTP in EFI - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: [SOLVED] Kernel parameters over HTTP in EFI (/showthread.php?tid=17447)



[SOLVED] Kernel parameters over HTTP in EFI - lzap - 2019-02-22 09:00

Hello,

I am booting ipxe.efi over network and provide it this script:

Code:
#!ipxe
dhcp
kernel http://xxx/boot/fdi-image/vmlinuz0 rootflags=loop root=live:/fdi.iso rootfstype=auto
initrd http://xxx/boot/fdi-image/initrd0.img

It works fine in BIOS as root kernel command line option is passed in (this is a LiveCD which needs root option to be present). However, when I try this in EFI mode, I am getting kernel panic because it seems like no kernel command line parameters are passed in.

Is there a way to pass in kernel command line parameters in EFI?

(By the way I noticed that ipxe.efi works also in BIOS mode, does it mean it is compatible with both BIOS and EFI? Interesting stuff. -- EDIT it was a QEMU VM and it booted directly via iPXE that's why it worked).


RE: Kernel parameters over HTTP in EFI - lzap - 2019-02-22 11:53

I wonder if this is related:

http://lists.ipxe.org/pipermail/ipxe-devel/2017-September/005820.html


RE: Kernel parameters over HTTP in EFI - NiKiZe - 2019-02-22 12:16

You can see some information in the FAQ about initrd in efi land.
One thing to check before boot is imgstat to see which arguments are sent.

And no it is not possible to run efi code in pcbios mode or the other way around - also covered in the FAQ in the forum.


RE: Kernel parameters over HTTP in EFI - NiKiZe - 2019-02-22 12:18

(2019-02-22 11:53)lzap Wrote:  I wonder if this is related:

http://lists.ipxe.org/pipermail/ipxe-devel/2017-September/005820.html

No that patch is about sending commands on the cmdline to ipxe in efi mode.


RE: Kernel parameters over HTTP in EFI - MultimediaMan - 2019-02-24 08:53

RE: Kernel Panic (VFS error); This is a Common "Problem" in EFI... EFI explicitly needs to know the name of the initrd as part of the kernel command line.

Try:
Code:
#!ipxe
dhcp
initrd http://xxx/boot/fdi-image/initrd0.img
kernel http://xxx/boot/fdi-image/vmlinuz0 initrd=initrd0.img rootflags=loop root=live:/fdi.iso rootfstype=auto

You might have to play around with the "root=" portion of the command line... usually, if it works from the ISO in EFI mode in this manner, it *should* work in iPXE. It just matters where the kernel parameters are being applied.

Best,

M^3


RE: Kernel parameters over HTTP in EFI - lzap - 2019-02-25 11:28

(2019-02-22 12:16)NiKiZe Wrote:  You can see some information in the FAQ about initrd in efi land.

Great, thanks it works now!

Code:
#!ipxe
dhcp
kernel http://xxx/boot/fdi-image/vmlinuz0 initrd=initrd0.img rootflags=loop root=live:/fdi.iso rootfstype=auto
initrd http://xxx/boot/fdi-image/initrd0.img



RE: Kernel parameters over HTTP in EFI - NiKiZe - 2019-02-25 22:41

Awesome! Always good when there is easy solutions Wink