On 7 September 2012 23:14, russell <russ...@dotplan.dyndns.org> wrote: > On 09/08/12 03:34, Ville Valkonen wrote: >> >> On 7 September 2012 14:08, russell <russ...@dotplan.dyndns.org> wrote: >>> >>> I have doing quite a lot of netbooting lately. However I can not figure >>> out >>> how to configure a specific machine to use a specific kernel. >>> >>> Is there a way for pxeboot to load a kernel based on something machine >>> dependent, for example, mac address? >>> >>> If not, I have been digging around in sys/stand/boot/boot.c >>> while I have not found where to get the mac address yet >>> would it be preferable to >>> a. look for a boot.conf.<macaddress> before an unadorned boot.conf >>> b. if not otherwise specified fall back to /bsd.<macadress> >>> c. macro expansion in boot.conf(somthing in the manner of >>> "machine $macaddress") >>> >>> I like option a as that seems like it would be easy to put in and provide >>> configuration power where needed while not complicating the >>> setup in the common case of only ever needing one kernel. >> >> >> Have you checked man 8 diskless ? >> >> -- >> Ville >> > heh, diskless(8), thats my bible. > > but my problem is. > dhcp: filename directive > can be per machine but it does not point to a kernel. > it points to a pxeboot. > pxeboot: > can be configured via boot.conf but there is no way to specify > a kernel based on the machine actually booting, > can only hard code the kernel image in. > and even if I kept different pxeboot binarys they would still use the > same boot.conf > > when different machines (say one is amd64 and the other is i386) need > different kernels one boot.conf will not work. > > I was hoping there was something obvious I missed when setting it up. > cause right now I am typing in the kernel name by hand when booting, which > sucks and kind of defeats the purpose of netbooting. > > my intention is to hack boot.c(my guess, at this point I am still just > looking at source) to check for and use some sort of global kernel > macaddress var pxeboot claims to set. > > It may seem I have no idea what I am doing, this is true. > However I figure this is a good chance to learn.
Apparently I remembered the contents of the man and its pointers wrong, so for sorry for the noise. Should have checked. -- Ville