> Am 28.01.2017 um 14:56 schrieb Jiri B <ji...@devio.us>: > > On Sat, Jan 28, 2017 at 12:17:40AM +0100, Sven-Volker Nowarra wrote: >> I am netbooting many systems, and last recently stepped on the issue, that I >> had an amd64 and an i386 client in the same network. I wanted to boot them >> into a "full" OpenBSD (not ramdisk kernel). That is not possible with the >> default installation, cause pxeboot can not distinguish between these >> Intel/AMD systems. DHCP server can distinguish by MAC address, but then when >> pxeboot is loaded, the kernel is per default "bsd". This must clash either >> with i386 or amd64 architecture, whatever was dropped into tftpboot direcotry. >> So I went through some older mailing list entries, adapted them, and updated >> my meanwhile extensive netboot document. I updated this into a PDF, covering >> many, many details (now ~50 pages). Wanted to give something back to the >> community. The PDF is currently located here: >> http://nowarra.ch/Volker/netboot_OpenBSD/170127_netbooting_OpenBSD60.pdf >> > > Thanks, interesting document. > > Isn't better to use rewrite/file remapping instead of hacking pxeboot? > If an i386 machine would request /etc/boot.conf via tftp you could rewrite > it to (based on fact you know that that machine is i386 - during provisioning) > /etc/i386/boot.conf. For the client I suppose it would still think it gets > /etc/boot.conf. > > j.
If this works, I could get rid of recompiling pxeboot everytime a new release comes out. Well, sometimes pxeboot also supports "older" OpenBSDs, but that is another topic. I understand, the tftp server has a "root dir" for the client specified. In the dhcpd.conf I declare per client a MAC address and its filename (usually "/pxeboot"). The i386 pxeboot manual says: "pxeboot boot program will look for an /etc/boot.conf configuration file on the TFTP server." I didn't find a reference to a different sub structure... Anyway, I tried a structure like you proposed, but pxeboot didn't find the boot.conf, and didn't even show the echo lines from this file (so useless to play with bsd location). This was my setup: location of boot.conf: /tftpboot/etc/i386/boot.conf $ cat /tftpboot/etc/i386/boot.conf echo ####### echo ####### hello from tftpd@192.168.88.12, with /etc/i386/boot.conf ####### echo ####### boot bsd.rd $ cat /etc/dhcpd.conf | grep filename filename "/pxeboot"; I also tried to play with the dhcpd.conf settings, by using a different subdir for pxeboot, but I didn't get the system to find "his" boot.conf in the i386 directory.