hi! On Mon, Jun 25, 2007 at 11:50:03AM +0200, Heinrich Rebehn wrote: > I have successfully set up a client for diskless(8) booting. > However, this works only when booting from the first (onboard) nic. > When i use another nic, the kernel still tries to do revarp from the > first nic, which fails. > > sys/nfs/nfs_boot.c offers a possibility to override the default search: > > /* > * Find a network interface. > */ > if (nfsbootdevname) > ifp = ifunit(nfsbootdevname); > else <search loop> > ... > > but where/how can i set nfsbootdevname? > > The boot.conf(8) manpage talks about passing options to the kernel via > "set howto". Could i use that? >
you cannot set the nfsbootdevname as a kernel option. it is filled in by autoconf. for example, pxeboot passes the mac address of its boot interface and autoconf looks up the matching network interface in sys/arch/i386/i386/autoconf.c ---snip--- #if defined(NFSCLIENT) if (bios_bootmac) { extern char *nfsbootdevname; struct ifnet *ifp; mountroot = nfs_mountroot; printf("PXE boot MAC address %s, ", ether_sprintf(bios_bootmac->mac)); for (ifp = TAILQ_FIRST(&ifnet); ifp != NULL; ifp = TAILQ_NEXT(ifp, if_list)) { if ((ifp->if_type == IFT_ETHER || ifp->if_type == IFT_FDDI) && bcmp(bios_bootmac->mac, ((struct arpcom *)ifp)->ac_enaddr, ETHER_ADDR_LEN) == 0) break; } if (ifp) { nfsbootdevname = ifp->if_xname; printf("interface %s\n", nfsbootdevname); } else printf("no interface selected\n"); return; } #endif ---snap--- reyk