iPXE discussion forum

Full Version: [SOLVED] Kernel parameters over HTTP in EFI
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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).
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.
(2019-02-22 11:53)lzap Wrote: [ -> ]I wonder if this is related:

http://lists.ipxe.org/pipermail/ipxe-dev...05820.html

No that patch is about sending commands on the cmdline to ipxe in efi mode.
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
(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
Awesome! Always good when there is easy solutions Wink
Reference URL's