Re: howto set nfsbootdevname for nfsroot?
Tom Cosgrove wrote: Heinrich Rebehn 25-Jun-07 13:57 Tom Cosgrove wrote: Sorry, one last thing: I find a dmesg from a (presumably unsuccessful) boot via xl0. Could you post that, too? So far it looks like the xl0 boot is correctly getting the right MAC address, so we need to find why it's not getting through to the NFS code. Thanks Tom The dmesg that i sent was from a successful boot via sk0. To post an unsuccessful boot's dmesg , i would have to type everything from the screen. What exactly do you want to know? Do you not have a serial console on this box? I'd like to double-check the NIC lines and the lines around the point it fails. It really should be printing out PXE boot MAC address ..., even on 4.1. Could you also post your exact kernel config file? And finally: it's worth trying this with GENERIC, too, particularly from -current (i.e. a snapshot) since that should be able to do this automatically. I was not aware that GENERIC can also deal with nfsroot. In fact, it works perfect with -stable! The problem shows when i change GENERIC to include root on nfs swap on nfs: [EMAIL PROTECTED] [~/src/sys/arch/i386/conf] # diff DISKLESS GENERIC 42,43c42 #config bsd swap generic configbsd root on nfs swap on nfs --- configbsd swap generic The dmesgs for both cases are attached (installed a serial console :-) ) --Heinrich [demime 1.01d removed an attachment of type application/octet-stream which had a name of xl0-GENERIC-stable] [demime 1.01d removed an attachment of type application/octet-stream which had a name of xl0-DISKLESS-stable]
howto set nfsbootdevname for nfsroot?
Hi list, 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? -- Heinrich Rebehn University of Bremen Physics / Electrical and Electronics Engineering - Department of Telecommunications - Phone : +49/421/218-4664 Fax :-3341
Re: howto set nfsbootdevname for nfsroot?
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
Re: howto set nfsbootdevname for nfsroot?
Reyk Floeter wrote: 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 Hmm, at least in my case this does not seem to work. I have not much C experience, but should nfsbootdevname not be declared extern in sys/nfs/nfs_boot.c as well? --Heinrich
Re: howto set nfsbootdevname for nfsroot?
Heinrich Rebehn wrote: Reyk Floeter wrote: 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 Hmm, at least in my case this does not seem to work. I have not much C experience, but should nfsbootdevname not be declared extern in sys/nfs/nfs_boot.c as well? I also do not see any output from the printf's above. Maybe bios_bootmac is not true? NFSCLIENT *is* defined. Config is GENERIC with root on nfs swap on nfs. I am attaching a dmesg from a successfull boot from the onboard nic. --Heinrich OpenBSD 4.1-stable (DISKLESS) #0: Fri Jun 22 10:41:43 CEST 2007 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/DISKLESS cpu0: AMD Athlon(tm) 64 Processor 3000+ (AuthenticAMD 686-class, 512KB L2 cache) 1.81 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3 cpu0: AMD erratum 89 present, BIOS upgrade may be required real mem = 536113152 (523548K) avail mem = 481468416 (470184K) using 4278 buffers containing 26931200 bytes (26300K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+ BIOS, date 11/03/05, BIOS32 rev. 0 @ 0xf0010, SMBIOS rev. 2.3 @ 0xf0530 (67 entries) bios0: ASUSTeK Computer Inc. A8V apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 30102 dobusy 0 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xf/0x1 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf5980/192 (10 entries) pcibios0: PCI Interrupt Router at 000:17:0 (VIA VT8237 ISA rev 0x00) pcibios0: PCI bus #1 is the last bus bios0: ROM list: 0xc/0xb000 0xcb000/0x800 0xcb800/0x800 0xcc000/0x1000 acpi at mainbus0 not configured cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 VIA K8HTB Host rev 0x00 pchb1 at pci0 dev 0 function 1 VIA K8HTB Host rev 0x00 pchb2 at pci0 dev 0 function 2 VIA K8HTB Host rev 0x00 pchb3 at pci0 dev 0 function 3 VIA K8HTB Host rev 0x00 pchb4 at pci0 dev 0 function 4 VIA K8HTB Host rev 0x00 pchb5 at pci0 dev 0 function 7 VIA K8HTB Host rev 0x00 ppb0 at pci0 dev 1 function 0 VIA K8HTB AGP rev 0x00 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 ATI Rage 128 Pro TF rev 0x00 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) skc0 at pci0 dev 10 function 0 Marvell Yukon 88E8001/8003/8010 rev 0x13, Yukon Lite (0x9): irq 10 sk0 at skc0 port A, address 00:13:d4:de:cf:88 eephy0 at sk0 phy 0: Marvell 88E1011 Gigabit PHY, rev. 5 xl0 at pci0 dev 12 function 0 3Com 3c905C 100Base-TX rev 0x78: irq 10, address 00:0a:5e:61:7a:2d exphy0 at xl0 phy 24: 3Com internal media interface xl1 at pci0 dev 14 function 0 3Com 3c905C 100Base-TX rev 0x78: irq 3, address 00:0a:5e:61:7a:04 exphy1 at xl1 phy 24: 3Com internal media interface pciide0 at pci0 dev 15 function 0 VIA VT6420 SATA rev 0x80: DMA pciide0: using irq 10 for native-PCI interrupt wd0 at pciide0 channel 1 drive 0: Maxtor 6V080E0 wd0: 16-sector PIO, LBA48, 76293MB, 15625 sectors wd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 5 pciide1 at pci0 dev 15 function 1 VIA VT82C571 IDE rev 0x06: ATA133,