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).