Subject: diskless boot
To: None <current-users@netbsd.org>
From: Milos Urbanek <urbanek@openbsd.cz>
List: current-users
Date: 11/03/2003 21:28:56
Hello,

I'm trying to setup a diskless machine (usable e.g. for crash testing etc.).
I read diskless(5) etc. I got PXE working, the second-stage bootstrap
pxeboot_ia32_com0.bin over serial console works fine aswell.

The kernel is successfully loaded via tftp.
All goes fine until the last stage> mounting the root filesystem over nfs.

At the serial console from the diskless server I get the following error:

boot device: ex0
root on ex0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 10.0.1.1
nfs_boot: my_name=xcrash
nfs_boot: my_domain=mydomain.com
nfs_boot: my_addr=10.0.1.2
nfs_boot: my_mask=255.255.255.0
nfs_boot: gateway=10.0.1.1
nfs_boot: sosend: 49
nfs_boot: mountd error=49
nfs_boot: mountd `10.0.1.1:/export/crash', error=49
no file system for ex0
cannot mount root, error = 79
root device (default ex0):


Well, I suspect that the error is somewhere in the /etc/exports file, there I
have:
milos:2$ cat /etc/exports 
/export/crash -mapall=root -alldirs xcrash

where the entry from /etc/hosts is:
10.0.1.2                xcrash xcrash.mydomain.com

The tcpdump trace shows:
21:18:24.883029 0.0.0.0.68 > 255.255.255.255.67:  xid:0x6ffffff secs:1 [|bootp] (ttl 7, id 52173, len 576)
21:18:24.886692 10.0.1.1.67 > 10.0.1.2.68:  xid:0x6ffffff secs:1 Y:10.0.1.2 S:10.0.1.1 [|bootp] [tos 0x10]  (ttl 16, id 0, len 356)
21:18:24.887786 0.0.0.0.68 > 255.255.255.255.67:  xid:0x6ffffff [|bootp] (ttl 7, id 46371, len 576)
21:18:24.888380 10.0.1.1.67 > 10.0.1.2.68:  xid:0x6ffffff Y:10.0.1.2 S:10.0.1.1 [|bootp] [tos 0x10]  (ttl 16, id 0, len 356)
21:18:25.081725 arp who-has 10.0.1.2 tell 10.0.1.2
21:18:28.076418 arp who-has 10.0.1.1 tell 10.0.1.2
21:18:28.076452 arp reply 10.0.1.1 is-at 0:50:4:4a:ed:41
21:18:28.076717 10.0.1.2.1023 > 10.0.1.1.111: udp 76 (ttl 64, id 35413, len 104)
21:18:28.077663 10.0.1.1.111 > 10.0.1.2.1023: [udp sum ok] udp 28 (ttl 64, id 39168, len 56)

In /var/log/authlog I can see:
Nov  3 21:15:43 xxx rpcbind: connect from ::ffff:10.0.1.2 to getport/addr(mountd)
Nov  3 21:18:28 xxx rpcbind: connect from ::ffff:10.0.1.2 to getport/addr(mountd)

Well, in addition the majority of nfs/rpc services I need should be up
and running:
root:/home/milos:2# ps axuww|grep rpc
root     287  0.0  0.3   176   736 ??  Ss    7:46PM 0:00.01 /usr/sbin/rpc.lockd 
root     318  0.0  0.3   168   748 ??  Ss    7:46PM 0:00.01 /usr/sbin/rpc.statd 
root    2985  0.0  0.3   152   832 ??  Ss    9:06PM 0:00.01 /usr/sbin/rpcbind -l 
and

root:/home/milos:4# ps axuww|grep nfs  
root    2103  0.0  0.3   116   744 ??  Ss    8:52PM 0:00.01 nfsd: master 
root    2141  0.0  0.2    44   496 ??  SL    8:52PM 0:00.00 nfsd: server 
root    3526  0.0  0.2    44   496 ??  SL    8:52PM 0:00.00 nfsd: server 
root    4144  0.0  0.2    44   496 ??  SL    8:52PM 0:00.00 nfsd: server 
root    4774  0.0  0.2    44   496 ??  SL    8:52PM 0:00.00 nfsd: server 

I actually have no glue while looking at all this alltogether.

Output from dmesg follows.

Thank you for any idea/glue/help.

Milos

The machine dmesg ('nearly' netbsd -current):

6133016+134756+406872 [337136+302424]=0x6fad88
BIOS CFG: Model-SubM-Rev: fc-01-00, 0x74<EBDA,KBDINT,RTC,IC2>
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.6ZE (GENERIC) #1: Thu Oct 30 11:32:21 MET 2003
        root@crash:/usr/obj/sys/arch/i386/compile/GENERIC
total memory = 97916 KB
avail memory = 83408 KB
using 1249 buffers containing 4996 KB of memory
BIOS32 rev. 0 found at 0xfdb80
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium (P54C) (586-class), 149.58 MHz, id 0x52c
cpu0: features 3bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,APIC>
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82439HX System Controller (TXC) (rev. 0x02)
pceb0 at pci0 dev 7 function 0
pceb0: Intel 82375EB/SB PCI-EISA Bridge (PCEB) (rev. 0x05)
ahc1 at pci0 dev 8 function 0: unable to map registers
vga1 at pci0 dev 9 function 0: Silicon Integrated System product 0x0204 (rev. 0x21)
wsdisplay0 at vga1 kbdmux 1
wsmux1: connecting to wsdisplay0
ex0 at pci0 dev 10 function 0: 3Com 3c905C-TX 10/100 Ethernet with mngmt (rev. 0x74)
ex0: interrupting at irq 11
ex0: MAC address 00:04:76:0c:eb:eb
bmtphy0 at ex0 phy 24: Broadcom 3c905C internal PHY, rev. 6
bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
eisa0 at pceb0
eisa0: can't map I/O space for slot 15
isa0 at pceb0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16450, no fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns8250 or ns16450, no fifo
pckbc0 at isa0 port 0x60-0x64
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
isapnp0: no ISA Plug 'n Play devices found
Kernelized RAIDframe activated
boot device: ex0
root on ex0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 10.0.1.1
nfs_boot: my_name=xcrash
nfs_boot: my_domain=mydomain.com
nfs_boot: my_addr=10.0.1.2
nfs_boot: my_mask=255.255.255.0
nfs_boot: gateway=10.0.1.1
nfs_boot: sosend: 49
nfs_boot: mountd error=49
nfs_boot: mountd `10.0.1.1:/export/crash', error=49
no file system for ex0
cannot mount root, error = 79

--