[arch-releng] [RFC] Rework pxe hooks

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Sat Aug 25 12:09:40 EDT 2012

On 08/24/2012 08:30 PM, Thomas Bächler wrote:
> 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.)
> b)
> 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.
> c)
> 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
> IP setup.
> d)
> 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.
I like it, will look good :)

When this is done, or maybe during the transition we can migrate from 
nfsmount and start using commands from nfs-utils, in order to get rid 
off klibc stuff at all.

Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1

More information about the arch-releng mailing list