[arch-releng] [RFC] Rework pxe hooks
thomas at archlinux.org
Fri Aug 24 19:30:16 EDT 2012
The current PXE setup on the ISO has some drawbacks:
1) We still use ipconfig, as I stated in my previous mail.
2) Without changing the configuration, archiso can only guess where the
NBD/NFS/http server is. In that guess, we abuse DHCP's next-server
option, which is meant to identify the TFTP server.
3) Without changing the configuration, the user can choose between NBD,
NFS and http, although only one option will actually work.
When I tried addressing 1), I also noticed that dhcpcd does not parse
the next-server option, so we cannot use it like we did with ipconfig.
While that is easy to patch, it is still not the right way.
I propose the following new setup to improve this:
a) (Actually unchanged, just for clarification)
DHCP sends next-server and filename as usual, sets DHCP options 209 and
210 so that pxelinux finds the configuration. pxelinux loads the kernel
and initramfs and boots them. (BTW, this can already be done via http if
ipxe is used, so we only need to put a single ipxe configuration file on
the TFTP and the ISO only on http.)
There is only one PXE option in the menu instead of three. This passes
an option like 'archiso_pxe_autodetect=224,225' (option syntax to be
discussed, explanation below) and omits the http/nfs/nbd-specific options.
We run dhcpcd in the initramfs instead of ipconfig. We make sure to use
BOOTIF= to identify the correct interface and pass that along to
userspace using /run/archiso/dhcp_interface. We also copy the lease to
/new_root/etc/dhcpcd/ after mounting to make sure we have a consistent
The DHCP server passes two strings as DHCP options. The options 224 and
225 as given above are "for private use". Option 224 contains either
"http", "NFS" or "NBD". Option 225 contains the actual URL.
The advantage of this setup is that we can just extract the ISO and
configure everything via the DHCP server configuration file. There is no
need to change the archiso bootloader configuration, and we only get a
single option in the boot menu, instead of three.
I can implement this, but I thought I'd put this up for comments first,
as I didn't get a chance to do it yet.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 900 bytes
Desc: OpenPGP digital signature
More information about the arch-releng