iPXE discussion forum
multiple initrd/imgfetch in UEFI mode - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: multiple initrd/imgfetch in UEFI mode (/showthread.php?tid=7830)



multiple initrd/imgfetch in UEFI mode - simonb - 2015-10-09 12:39

Hi,

I'm trying to upload multiple files from my iPXE script to get them during initrd.

It works fine in legacy mode, but I not in UEFI mode.

Code:
#!ipxe
  kernel http://my.web.server/boot/vmlinuz initrd=initrd.img
  initrd http://my.web.server/boot/initrd.img
  initrd http://my.web.server/boot/test.txt /tmp/test.txt
  boot

The file test.txt is correctly loaded (I have done an imgstat after the load) but can not be found under /tmp (neither anywhere) during the initrd phase. It works fine in legacy mode ...

Any advices ?

Note: It took me time to find that the kernel option initrd=<file> is compulsory in UEFI mode (not in legacy)

Thanks,

Simon.


RE: multiple initrd/imgfetch in UEFI mode - mcb30 - 2015-10-22 00:53

(2015-10-09 12:39)simonb Wrote:  
Code:
#!ipxe
  kernel http://my.web.server/boot/vmlinuz initrd=initrd.img
  initrd http://my.web.server/boot/initrd.img
  initrd http://my.web.server/boot/test.txt /tmp/test.txt
  boot

The file test.txt is correctly loaded (I have done an imgstat after the load) but can not be found under /tmp (neither anywhere) during the initrd phase. It works fine in legacy mode ...

Any advices?

Note: It took me time to find that the kernel option initrd=<file> is compulsory in UEFI mode (not in legacy)

Not yet supported under UEFI, sorry. You can provide multiple initramfs CPIO archives via (from memory) multiple initrd= arguments on the kernel command line, but there's no capability to have iPXE automatically construct the CPIO headers for you (as is done under BIOS).

Michael


RE: multiple initrd/imgfetch in UEFI mode - simonb - 2015-10-22 08:35

Thanks for your reply. It does work indeed with :

Code:
#!ipxe
  kernel http://my.web.server/boot/vmlinuz initrd=initrd.img initrd=test.cpio
  initrd http://my.web.server/boot/initrd.img
  initrd http://my.web.server/boot/test.cpio
  boot
with test.cpio created as :
Code:
find tmp
tmp
tmp/test.txt
Code:
find tmp |cpio --quiet --dereference -o -H newc > test.cpio
Thanks a lot.

Bertrand.