Pale Purple https://www.palepurple.co.uk Office Address Registered Office Blount House, Hall Court, Hall Park Way,,
Telford, Shropshire, TF3 4NQ GB
sales@palepurple.co.uk GB 884 6231 01
Historically we had a ‘normal’ pxe boot server in the office (DHCP server points to a TFTP server and specified a pxelinux file to load) from which we could choose to install various distributions.
The only problem with this is that it was initially limited to the a specific release/version of Debian/Ubuntu (as we’d just copy the bundled install/netboot stuff locally).
Then we added other things into the boot menu – like memtest86 – and then found we could also add in ISO images – so making things a bit easier to setup/maintain – with a simple menu like the below.
In pxelinux.cfg/default :
timeout 120 default LocalBoot prompt 1 LABEL Memtest kernel memtest86 LABEL Debian kernel memdisk append iso initrd=path/to/some.iso LABEL LocalBoot localboot 0
Where
However, the problem with the above is that it’s REALLY slow to load ISO images over TFTP….. Rummaging around on the internet indicates this is a problem with TFTP and the only way to fix this is to use something like iPXE – which allows for much faster booting / loading of ISO images – as it can work over HTTP / iSCSI and other protocols.
While iPXE can be flashed to network cards – this seemed overkill for our environment. It’s easier to ‘chainload’ iPXE from your normal PXE (Network Boot) process.
The only pain in doing this is that iPXE needs an initial configuration – so when it loads, it knows what to do without you having to type things in on the command line. This requires building iPXE from source. Thankfully this is straight forward and takes about 10 seconds.
File: palepurple.ipxe (Note, it must start with the #!ipxe bit) :
#!ipxe echo Some welcome message... # See http://ipxe.org/scripting for docs on scripting ipxe. dhcp chain http://172.30.33.67/netboot/boot.php
And then, within the DHCP server (dhcpd.conf), ensure you have :
... option tftp-server-name "my.server.name"; next-server 172.30.33.250; filename "undionly.kpxe" ....
Now when you ‘boot off LAN’, your normal onboard PXE boot thing will talk to your DHCP server, be told it needs to look at the TFTP server on 172.30.33.250 and then load the file ‘undionly.kpxe‘. undionly.kpxe loads, gets itself an IP address via DHCP (as we told it to in palepurple.ipxe above) and then load whatever is specified at http://172.30.33.67/netboot/boot.php (see below).
File: boot.php:
#!ipxe echo Boot menu menu Selection item debian Debian Netboot (7.4) item fedora Fedora 20 choose os && goto ${os} # :something is a 'goto' label. :debian sanboot http://server/path/to/debian-7.4.0-amd64-netinst.iso :fedora sanboot http://server/path/to/Fedora-Live-etc.iso
And that’s it.
‹ Joomla Plugin Caching require.js – an introduction ›
[…] iPXE Network booting for ISO images […]
Dude, you rock! I’m finally able to boot to my Windows 10 PE. I’m wondering why this is not mentioned more clearly anywhere?
Actually I had some stability issues while booting, UNTIL I I added sanunhook, like this:
#!ipxe
sanunhook
sanboot http://172.16.8.254/raw_isos/winpe_win10_x64_2021-10-09.iso
Now I have been testing some 10 times in a row and boot is solid! I’m using self-compiled ipxe.efi with custom embedded script to fetch this external script for booting.