Bug 1401491

Summary: [RFE] Enhance ipxe.efi with command parameters
Product: Red Hat Enterprise Linux 7 Reporter: Lukas Zapletal <lzap>
Component: ipxeAssignee: Jens Freimann <jfreiman>
Status: CLOSED WONTFIX QA Contact: xiywang
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: ailan, chayang, jfreiman, juzhang, knoel, lzap, michen, pezhang, riehecky, xfu, xiywang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-20 13:54:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1261802    
Attachments:
Description Flags
Proof-of-concept patch none

Description Lukas Zapletal 2016-12-05 12:28:35 UTC
Hello,

for Satellite 6 bootdisk support, we would like be able to generate bootdisks with ixpe.efi chainbooted from Grub2. This allows specifying script location via arguments. For BIOS we use:

default ipxe
label ipxe
kernel /ipxe
initrd /script

For EFI we would like to do the same, but this does not work:

set default=0
set timeout=1
menuentry "Chainload iPXE - this does not work" {
  linuxefi /ipxe.efi
  initrdefi /script.ipxe
}
menuentry "Chainload iPXE - this does not work either" {
  search --no-floppy --set=root -f /ipxe.efi
  chainloader /ipxe.efi chain /script.ipxe
}

Arguments are ignored by the EFI firmware at the moment.

Can you guys estimate how feasible is implementing such a feature, thanks. If that turns out to be hard, we could compile our own ipxe.efi with embedded script that chainloads another one from the media.

Comment 3 Ladi Prosek 2016-12-09 14:13:51 UTC
Created attachment 1229966 [details]
Proof-of-concept patch

Lukas, can you please try the attached prototype patch? I can pass EFI command line arguments from iPXE to iPXE, e.g.

iPXE> chain ipxe.efi echo Hello world!

but I haven't tried it with grub.

Comment 4 Ladi Prosek 2016-12-12 08:42:05 UTC
A patch has just been posted by Christian Nilsson. Should be identical in functionality modulo some extra command line cruft stripping.

http://lists.ipxe.org/pipermail/ipxe-devel/2016-December/005306.html

Comment 5 Lukas Zapletal 2016-12-22 12:50:33 UTC
Thanks, I will test the patch from Christian then.

Comment 8 Lukas Zapletal 2017-01-16 14:05:28 UTC
Unfortunately, I am not able to boot that from Grub2, it looks like there is no way of providing entry options. I am afraid the only solution is to build a regular UEFI boot image (FAT image with iPXE EFI ROM) with embedded "chain script.ipxe" command. The thing I was trying to avoid (to carry own build of ipxe with embedded script in Satellite repositories).

Comment 16 Ladi Prosek 2017-06-07 10:08:52 UTC
Two more replies to Christian Nilsson's patch (pipermail doesn't show them, presumably because the original email was sent last year):

http://lists.ipxe.org/pipermail/ipxe-devel/2017-May/005617.html

Comment 25 Lukas Zapletal 2018-07-20 13:55:15 UTC
The patch was not accepted upstream. Closing the BZ.