I try and always install my new OpenBSD (i386 and amd64) machines using pxeboot.
I have the basic process down cold, but I am looking for a bit more flexibility, hence these questions. In my environment, I have a mix of i386 and amd64 machines, and it is conceivable that I would want to install different versions of OpenBSD on new installs. On my dhcpd server, I might have something like this: host obbamd42 { hardware ethernet 00:e0:81:45:df:d4; fixed-address 1.2.3.4; filename "pxeboot-amd64-4.2"; } If I take care to specify the correct filename here, dhcpd will return the correct pxeboot file for the OS version and architecture of the machine in questions, so far so good! The question/problem is how can I specify a different bsd.rd file for different installs? The filename to be booted is obtained by requesting /etc/boot.conf from the tftpd server, so if I could return a different boot.conf file for different requests, I could change the boot line to make sure the correct boot file is then requested. On the tftp server, in /var/tftpboot, I have an etc directory, containing a boot.conf file, which looks something like: # cat boot.conf set tty com0 stty com0 9600 boot bsd.rd I'd like for the file to boot to vary depending on which machine is asking. How can I do that? One way I can imagine is to modify the pxeboot file to request different boot.conf files, for example, pxeboot-amd64-4.2 requests /etc/boot-4.2-amd.conf pxeboot-i386-4.1 requests /etc/boot-4.1-i386.conf etc. Or, maybe even more flexibly, the pxeboot program would determine the MAC address of the machine on which it is running, and request a specific boot.conf file, eg /etc/boot-00e08145dfd4.conf And ideally, if it couldn't find a file like this on the tftpd server, it would then just request the normal boot.conf file (to preserve existing behavior) I've begun looking through the source code for pxeboot, and I haven't yet found where it requests the boot.conf file. Can anyone out there point me to the right file in the source tree to do what I want? Or, I am always open to other ideas as to how I can accomplish my goals here. If there were a "cgi" option to tftpd where one could compute the response to a request dynamically, that would be another way to go. I'd appreciate any tips/pointers/advice. Best regards, Don