Send dhcp-users mailing list submissions to dhcp-users@lists.isc.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.isc.org/mailman/listinfo/dhcp-users or, via email, send a message with subject or body 'help' to dhcp-users-requ...@lists.isc.org You can reach the person managing the list at dhcp-users-ow...@lists.isc.org When replying, please edit your Subject line so it is more specific than "Re: Contents of dhcp-users digest..." Today's Topics: 1. PXE booting multiple bootfiles (Rob Janssen) ---------------------------------------------------------------------- Message: 1 Date: Sat, 13 Mar 2021 11:44:36 +0100 From: Rob Janssen <pe1...@amsat.org> To: dhcp-users@lists.isc.org Subject: PXE booting multiple bootfiles Message-ID: <33dfb5f6-fbe8-dda4-c64f-0497b3c66...@pe1chl.nl> Content-Type: text/plain; charset=utf-8 Hi, I am looking for some trick to select alternative bootfiles when booting with PXE. Background: I have several network bootable images on the bootserver, like installation of Linux or Windows, live booting of Clonezilla to make images of disks, etc. In the old days this wasn't a problem.? I used a "PXE menu" and the DHCP server was set up to serve that, and it would "chain" to the proper next bootable image depending on the selection made in the menu.? At first I used "3Com Pre-OS" and later I moved on to using PXELINUX with a menu.c32 module and its configuration. However, this no longer works properly with new systems that use EFI booting. It is still possible to make a PXELINUX menu for that, but one can no longer "chain" to a completely different bootable image.? So with some care I can still boot some different Linux images from that menu, but installing Windows from the menu is no longer possible. After a lot of searching I found that PXE network boot ROMs on the client should in fact be able to provide a menu, using a tricky vendor-encapsulated-options setup.? I read that "dnsmasq" apparently has a compiler for such options and it can be configured with statements like this: ?pxe-prompt="Choose:" ?pxe-service=x86PC, "Boot from local disk", 64 ?pxe-service=x86PC, "PXE-Linux", "pxelinux" ?pxe-service=x86PC, "PXE-Linux on 192.168.0.100", "pxelinux", 192.168.0.100 ?pxe-service=x86PC, "ACME Deployment server", "acme", 192.168.0.101 This somehow configures a vendor-encapsulated-options string, but I cannot find what it exactly does. For ISC DHCPD I found an option space declaration for some of the things to be put in the encapsulated options, but whatever I try I cannot get the client to display a menu. Maybe I am doing it wrong, maybe the client does not support it. Anyone who has experience with setting this up with ISC DHCPD? I only need the menu to provide a couple of selections each with a different bootfile, no need for different boot servers as they are all on a single server. Else, I am looking for some trick to be able to serve two different boot files to PXE booting clients, e.g. alternately serving different boot files on subsequent requests.? I could then boot those clients, and when I get the wrong bootfile I can just reboot it again and usually get the correct one.? It would be fine when its toggling would be "global", i.e. not for each individual client but for any client booting on that network. Of course I know that I can do stuff like this: if (some condition) { ??? option bootfile-name "firstfile"; } else { ??? option bootfile-name "secondfile"; } and put that in a class for PXE booting matched by: match if (substring(option vendor-class-identifier,0,9) = "PXEClient"); However, what I am looking for is some kind of trick to have that condition toggle between invocations.? Is it possible to maintain some state between requests? I have thought about using the lease-time and rely on the fact that with dhcp-cache-threshold setting a second boot will get re-issued the same lease and thus has a shorter lease time than the first one.? However, unfortunately the lowest setting of dhcp-cache-threshold is 1% and it is not possible to get a reasonable lease time and still have an acceptable window for the second boot to use this trick. It would have worked when dhcp-cache-threshold could be specified in seconds rather than as a percentage, as I could set it to something like 60 seconds. Rob ------------------------------ Subject: Digest Footer _______________________________________________ ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. dhcp-users mailing list dhcp-users@lists.isc.org https://lists.isc.org/mailman/listinfo/dhcp-users ------------------------------ End of dhcp-users Digest, Vol 149, Issue 2 ******************************************