Dev:PXEConfig

This is a draft about a new way to manage our PXE configuration.

Client side
The ltsp-client[-core] package may provide /etc/ltsp/update-kernels.conf, with contents similar to the following:

Those are actually the defaults provided by ltsp-update-kernels, so if they're appropriate for a disto, it may omit shipping /etc/ltsp/update-kernels.conf. They should also allow older chroots to be used by newer ltsp-server versions, at least on some distros.

On chroot kernel upgrades, ltsp-client should generate appropriate initrds, but it shouldn't bother creating any /boot/pxelinux.cfg/* files, ltsp-update-kernels on the server side will ignore those and will generate them from scratch in TFTP.

Server side
The ltsp-server package may ship /etc/ltsp/ltsp-update-kernels.conf, to define SERVER_BOOT_METHODS="NBD NFS". The default is to try to autodetect which of them are supported, so it shouldn't be necessary.

For each chroot (or loop-mounted image), ltsp-update-kernels sources $CHROOT/etc/ltsp/update-kernels.conf, if it exists, and does the following steps:
 * It deletes older files: cd "$TFTP/ltsp/$ARCH"; rm -f $BOOT_FILES.
 * It copies new files: cd "$CHROOT/boot"; cp $BOOT_FILES "$TFTP/ltsp/$ARCH/" || fail (that's pseudocode, the implementation will be a bit more careful).
 * It generates statically named symlinks for the newest versions of each kernel flavor in $TFTP/ltsp/$ARCH/$NAME$FLAVOR.
 * It creates $TFTP/ltsp/$ARCH/pxelinux.cfg/ and a static $TFTP/ltsp/$ARCH/pxelinux.cfg/default, if they don't exist.
 * It generates $TFTP/ltsp/$ARCH/pxelinux.cfg/ltsp and $TFTP/ltsp/$ARCH/pxelinux.cfg/ltsp-all, to be INCLUDED from $TFTP/ltsp/$ARCH/pxelinux.cfg/default. "ltsp" contains code for all the boot methods but for only the symlinks, while "ltsp-all" for all of the available kernels and usually goes in a submenu.

The sysadmin is free to edit $TFTP/ltsp/$ARCH/pxelinux.cfg/default as he pleases (e.g. to use ifcpu64), we never overwrite it. He can also use the statically named symlinks or the ltsp[-all] files that we generate.

Future changes
The implementation described so far targets LTSP 5, so it aims to keep some level of compatibility with existing LTSP chroots. When we move to LTSP 6, ltspd will probably make $TFTP/ltsp/$ARCH/lts.conf deprecated, and $TFTP/ltsp/$ARCH/pxelinux.cfg/ dirs may be moved to a global $TFTP/pxelinux.cfg/.