iPXE

Almos two years since I started that thread :)... but had some problems trying to get iPXE working properly.

Do you still have that repository you set up?
 
Just making notes to remind myself how far I got...
Code:
cd
pkg install git lang/gcc7-devel
git clone http://git.ipxe.org/ipxe.git
cd ipxe/src
gmake CC=gcc7 HOST_CC=gcc7
gmake CC=gcc7 HOST_CC=gcc7 bin/ipxe.iso
gmake CC=gcc7 HOST_CC=gcc7 bin/ipxe.usb
dd if=bin/ipxe.usb of=/dev/da0
 
Thank you balanga, it works. My setup on FreeBSD 11.1-RELEASE-p4 is:
Code:
cd
pkg install git lang/gcc7-devel cdrkit-genisoimage binutils
git clone http://git.ipxe.org/ipxe.git
cd ipxe/src
gmake CC=gcc7 HOST_CC=gcc7 CROSS=/usr/local/bin/
gmake CC=gcc7 HOST_CC=gcc7 CROSS=/usr/local/bin/ bin/ipxe.usb
 
There is a port for it too which does all of that for you: net/ipxe
Yes I know, but I need to embed a script and installing the port via pkg I receive this message:

Code:
[1/1] Fetching ipxe-20170924.txz: 100%    1 MiB   1.1MB/s    00:01   
Checking integrity... done (0 conflicting)
[1/1] Installing ipxe-20170924...
Extracting ipxe-20170924: 100%
Message from ipxe-20170924:

The following files have been installed in /usr/local/share/ipxe:
- ipxe.dsk for creating a bootable floppy disk
- ipxe.usb for creating a bootable USB key
- ipxe.iso for creating a bootable CD
- ipxe.pxe for chainloading from a PXE ROM
- ipxe.lkrn for any boot manager that can boot Linux kernels

How can I embed an iPXE script ?
 
Did you ever try this ?
Yes, it work fine for what it is. It's a little annoying to use it for installing FreeBSD though because it uses mfsBSD. But YMMV.
Yes I know, but I need to embed a script and installing the port via pkg I receive this message:
Of course the package is prebuilt and if you want to embed a script you'll have to build the port yourself. But that's easy to do.
How can I embed an iPXE script ?
Update net/ipxe to the lastest revision (ports r463161) and set in your make.conf(5) or in /usr/ports/net/ipxe/Makefile.local
Code:
IPXE_MAKE_ARGS=    EMBED=/path/to/ipxe/script
# If you build in Poudriere or Synth put the script in e.g. /usr/ports/net/ipxe/ipxe-script
# so that the build can find it:
IPXE_MAKE_ARGS=    EMBED=${.CURDIR}/ipxe-script
with older revisions use
Code:
IPXE_EMBED=/path/to/ipxe/script
instead.

Then proceed to build the port as you usually do.
 
Thank you tobik@ it works. Please add a phrase in the pkg-message.in file to explain how to embed a script.
 
Thank you tobik@ it works. Please add a phrase in the pkg-message.in file to explain how to embed a script.
Hmm, using pkg-message for that doesn't feel right. It's a post-installation message for the package with the next steps on how to use what was installed. It should not be a guide on how to customize the package build. There is also more to it than just IPXE_MAKE_ARGS so the pkg-message would be too long. I think it's reasonable to expect people to look at the port if they want to customize things.

Maybe I'll write a guide and link to it from the port Makefile or pkg-descr instead but don't expect this to happen anytime soon.
 
Hmm, using pkg-message for that doesn't feel right. It's a post-installation message for the package with the next steps on how to use what was installed. It should not be a guide on how to customize the package build. There is also more to it than just IPXE_MAKE_ARGS so the pkg-message would be too long.
In my opinion the phrase should be as short as : "if you need to embed a script please look at net/ipxe/Makefile". In the Makefile few commented lines:
Makefile:
# To build iPXE with an embedded script, please  uncomment the next line and rebuild the port
#IPXE_MAKE_ARGS=    EMBED=/path/to/ipxe/script
# If you build in Poudriere or Synth put the script in e.g. /usr/ports/net/ipxe/ipxe-script
# so that the build can find it:
#IPXE_MAKE_ARGS=    EMBED=${.CURDIR}/ipxe-script
I think it's reasonable to expect people to look at the port if they want to customize things.
This was my error. net/ipxe isn't an application to run or a driver to load and I didn't look at the port tree.
Maybe I'll write a guide and link to it from the port Makefile or pkg-descr instead but don't expect this to happen anytime soon.
Obviously this is the ideal :).
Thank you again for your work.
Regards,
Maurizio
 
Back
Top