Linux makefiles

Yes, that's the first thing to try. But sometimes you'd need to adjust the makefiles, because they were written with Linux in mind.
 
Seems to work.... almost...

I was trying to build ipxe http://ipxe.org/download and got quite a way before an error occurred

Code:
  [BUILD] bin/config.o
In file included from config/config.c:27:0:
./config/settings.h:20:35: fatal error: config/local/settings.h: No such file or directory
#include <config/local/settings.h>
  ^
compilation terminated.
Makefile.housekeeping:850: recipe for target 'bin/config.o' failed
gmake: *** [bin/config.o] Error 1
root@support:~/ipxe/src #

I guess I need to install some extra headers from somewhere.....
 
Building iPXE succeeds on my FreeBSD 10.2 desktop with some tweaks. I installed devel/gcc5 and started the build with gmake CC=gcc5 HOST_CC=gcc5. There seems to be some issues with generating bin/ipxe.iso, so I don't think the ISO is usable, but the other images seem fine.

I might as well create a port at this point...

EDIT: I see that there is already net/gpxe (which does not build on FreeBSD >= 10 however).

EDIT 2: A work-in-progress port is at https://github.com/t6/wip-ports/tree/master/net/ipxe. The installed ISO is not usable however.
 
This is brilliant news. I managed to build it myself, although I assume you meant lang/gcc5-devel as the above pkg doesn't exist.

I managed to test ipxe.pxe and undionly.kpxe on my PXE boot server and both worked although I'm not sure of what the difference is between them. One problem in my case was that an x86-64 CPU was required when I tried

iPXE> chain http://boot.ipxe.org/demo/boot.php

Is there an option to make this work for an i686 CPU.


If you are familiar with IPXE maybe you could explain how to make scripting work.

I get this when booting a PXE client:

Code:
Next server: 192.168.1.1
Filename: ipxe.pxe
Root path: tftpboot
Ignoring unsupported root path
tftp://192.168.1.1/ipxe.pxe... ok

No idea why the root path is unsupported. It works with PXELINUX.
 
I managed to test ipxe.pxe and undionly.kpxe on my PXE boot server and both worked although I'm not sure of what the difference is between them.
ipxe.pxe contains all network drivers iPXE supports and can be used with or without a PXE ROM. undionly.kpxe can only be used if you chain load iPXE from your card's PXE ROM which supports the Universal Network Device Interface (=> UNDI only).

I managed to test ipxe.pxe and undionly.kpxe on my PXE boot server and both worked although I'm not sure of what the difference is between them. One problem in my case was that an x86-64 CPU was required when I tried


iPXE> chain http://boot.ipxe.org/demo/boot.php


Is there an option to make this work for an i686 CPU.
The demo is probably 64-bit only. That URL returns the following iPXE script:
Code:
#!ipxe

kernel vmlinuz-3.16.0-rc4 bootfile=http://boot.ipxe.org/demo/boot.php fastboot initrd=initrd.img
initrd initrd.img
boot
and vmlinuz-3.16.0-rc4 is 64-bit only. If you supply your own iPXE script with your own kernel via your own HTTP server it should work. Making this work with your own server is really simple. Just put the above script and all referenced files in the same directory on your web server and give iPXE that URL.
 
At the moment I'm trying to concentrate on migrating from PXELINUX to IPXE and would like to get the functionality of YUMI (http://www.pendrivelinux.com/yumi-multiboot-usb-creator/) onto my PXE boot server ie a pfSense box (https://www.pfsense.org/).

I have found an IPXE binary which almost produces what I want - https://releng.archlinux.org/pxeboot/ipxe_text.pxe. I have the means, thanks to your advice, to build IPXE binaries, now I just need to figure out how to incorporate scripts into the binary...

There is an example here http://ipxe.org/embed but I can't get it to work.
 
I think I'm going to update the port tomorrow to allow embedding of scripts. I did not know that you could do that. That would make it a lot more useful.
 
I've updated the port. The example script on http://ipxe.org/embed is indeed broken. There is no timeout command anymore etc. The build instructions work however.

With the port you can embed a script by compiling the port with make IPXE_EMBED=/path/to/ipxe/script
 
Here is a script that can boot Debian and FreeBSD with iPXE (over the internet, booting completely unverified images. Don't use in the real world!):
Code:
#!ipxe 
prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE command line... && shell ||

menu Please choose an image to boot
item debian Debian Jessie
item mfsbsdmini mfsBSD 10.2-RELEASE 
choose --default debian --timeout 10000 img && goto ${img}

:debian
ifconf
sanhook http://ftp.de.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/mini.iso
sanboot --keep

# Loading FreeBSD this way is very, very slow. Be patient!
# root password is mfsroot
:mfsbsdmini
ifconf
sanhook http://mfsbsd.vx.sk/files/iso/10/amd64/mfsbsd-mini-10.2-RELEASE-amd64.iso
sanboot --keep
 
Wow!

Is there any chance of creating a repository for such IPXE scripts? I think that once people realise how powerful they are their usage might become quite popular.

I'll try writing a few scripts for Clonezilla and SystemRescueCD today.
 
Back
Top