Feature request : Make setting up iPXE / netbooting easier, suggest sane defaults, suggest boot firmwares


Several months ago I tried netbooting PCs, VMs and embed computers from my openwrt router

I documented some of the challenges in

I have to say, it was very difficult and in the end I mostly had to resort to editing config files by hand.

However, this does not have to be this way.

There are very few options of boot firmware available and very few ways to configure them.

This is an obscure topic that requires extensive amount of study to get working. Mostly because the internet is absolutely filled to the brim with obsolete methods that are of use to no one except techno-historians.

In the VAST majority of cases, setting up iPXE is really all you need to do


BOOTP, etherboot those are simply obsolete, surpassed by ipxe in every way that matters.

To simply the process here is what needs to happen

Some random network device boots into it's network ROM.

This network ROM generally consist of technological heirloom that does very few things.

Request from DHCP server a TFTP or PXE server to download a better ROM/firmware

All we want to do is give this device a copy of the iPXE firmware for its CPU architecture, which in most cases will be X86 / X86_64 / ARM32 or ARM64 and someday, various MIPS flavours

And here is how you do this

For now, and until I can figure out a better way, you dump the following text into your /etc/dnsmasq.conf

#according to user ivanmara, I have not yet tested this


You may or may not have to install the uhttpd package, I don't remember, but I have it installed
You need to place the firmware files in /www folder along with an boot.ipxe, which is the boot script that ipxe will run if you have not baked in an ipxe script into your own custom ipxe firmware

Despite what the ipxe website says, it is not necessary to build your own custom ipxe firmware, the standard distribution works just fine with the above settings, the configuration is retrieved entirely from the openwrt router

The ipxe folks have done a really good job at making sure that user cannot figure out which files they need, because they really REALLY want users to learn how to code and build their own firmwares.

It took me several weekends to figure out what I needed

And it is all in this, unlinked folder on their website


The most important files are

For legacy bios

For UEFI bios (you need both)

And you need to server a boot.ipxe script which is what the iPXE firmware will do once booted

Once you can boot iPXE from your openwrt router, the hardest part is done, everything else is easy because the rest of the iPXE projet is very well documented , you will be able to boot anything into anything, pure tech nirvana (99% will die before reaching this step)

At this point the documentation is plenty and useful



You only need to install the packages




Here are the relevant commands for setting that up

First create LVM volumes on a USB stick and then tune this script to your liking

tgtadm --lld iscsi --op delete --mode logicalunit --tid 1 --lun 1
tgtadm --lld iscsi --op delete --mode logicalunit --tid 2 --lun 2
tgtadm --lld iscsi --op delete --mode logicalunit --tid 3 --lun 3
tgtadm --lld iscsi --op delete --mode logicalunit --tid 4 --lun 4
tgtadm --lld iscsi --op delete --mode logicalunit --tid 5 --lun 5
tgtadm --lld iscsi --op delete --mode logicalunit --tid 6 --lun 6
tgtadm --lld iscsi --op delete --mode logicalunit --tid 7 --lun 7
tgtadm --lld iscsi --op delete --mode target --tid 1
tgtadm --lld iscsi --op delete --mode target --tid 2
tgtadm --lld iscsi --op delete --mode target --tid 3
tgtadm --lld iscsi --op delete --mode target --tid 4
tgtadm --lld iscsi --op delete --mode target --tid 5
tgtadm --lld iscsi --op delete --mode target --tid 6
tgtadm --lld iscsi --op delete --mode target --tid 7

tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2022-10.lan.router:target01
tgtadm --lld iscsi --op new --mode target --tid 2 -T iqn.2022-10.lan.router:target02
tgtadm --lld iscsi --op new --mode target --tid 3 -T iqn.2022-10.lan.router:target03
tgtadm --lld iscsi --op new --mode target --tid 4 -T iqn.2022-10.lan.router:target04
tgtadm --lld iscsi --op new --mode target --tid 5 -T iqn.2022-10.lan.router:target05
tgtadm --lld iscsi --op new --mode target --tid 6 -T iqn.2022-10.lan.router:win10original
tgtadm --lld iscsi --op new --mode target --tid 7 -T iqn.2022-10.lan.router:win10lankit
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/pve4/iscsitgt1
tgtadm --lld iscsi --op new --mode logicalunit --tid 2 --lun 2 -b /dev/pve4/iscsitgt2
tgtadm --lld iscsi --op new --mode logicalunit --tid 3 --lun 3 -b /dev/pve4/iscsitgt3
tgtadm --lld iscsi --op new --mode logicalunit --tid 4 --lun 4 -b /dev/pve4/iscsitgt4
tgtadm --lld iscsi --op new --mode logicalunit --tid 5 --lun 5 -b /dev/pve4/iscsitgt5
tgtadm --lld iscsi --op new --mode logicalunit --tid 6 --lun 6 -b /var/lib/vz/template/iso/Win10_21H2_English_x64.iso --device-type=cd
tgtadm --lld iscsi --op new --mode logicalunit --tid 7 --lun 7 -b /var/lib/vz/template/iso/win10_21h2_x64_lankit_2022-11-04.iso --device-type=cd
tgtadm --lld iscsi --op bind --mode target --tid 1 --initiator-address ALL
tgtadm --lld iscsi --op bind --mode target --tid 2 --initiator-address ALL
tgtadm --lld iscsi --op bind --mode target --tid 3 --initiator-address ALL
tgtadm --lld iscsi --op bind --mode target --tid 4 --initiator-address ALL
tgtadm --lld iscsi --op bind --mode target --tid 5 --initiator-address ALL
tgtadm --lld iscsi --op bind --mode target --tid 6 --initiator-address ALL
tgtadm --lld iscsi --op bind --mode target --tid 7 --initiator-address ALL
tgtadm --lld iscsi --op show --mode target
iscsiadm --mode discovery --type sendtargets --portal router.lan

You can also remotely list and check your iscsi devices with

tgtadm --lld iscsi --op show --mode target
iscsiadm --mode discovery --type sendtargets --portal router.lan

However we are not really offtopic from this feature request which is just

Make iPXE booting a ONLY CLICK setup, we don't need to know anything about the user and his network to enable iPXE booting with just one click !

1 Like