Subject: Re: cobalt qube: install without cable
To: Ted Unangst <tedu@stanford.edu>
From: Matthew Luckie <kluckie@ihug.co.nz>
List: port-cobalt
Date: 10/07/2001 17:45:59
> I'm glad this seems to be helping people out.  Please let me know if the
> directions are accurate.  Unfortunately, I wrote them afterwards, and
> there was so much trial and error I'm not sure if I left something out.
> If anything breaks, holler.

i am trying to get a qube2 to netboot off my freebsd nfs server, which is
running FreeBSD 4.4-RC.
i am unable to get the qube2 to seemingly boot far enough for me to be able
to telnet into it.

this is my setup.
i have a system with two hard disks.  the second hard disk has been mounted
to /nfsroot
my kernel does not have nfs compiled in, nor does it start nfsd at boot.
i have a shell script that i manually execute that has the following
contents:

#!/bin/sh
portmap
nfsd -u -t -n 4
mountd -r #-2r -d -l

========

my /usr/local/etc/dhcpd.conf has the following:

default-lease-time 6000;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1;
option domain-name "fake.org.nz";

subnet 192.168.0.0 netmask 255.255.255.0 {
 range 192.168.0.10 192.168.0.20;
}

host qube {
hardware ethernet 0:10:e0:0:be:62;
fixed-address 192.168.0.66;
filename "/vmlinux.gz";
option root-path "/nfsroot";
}

=========

my /etc/exports has the following:

/nfsroot -maproot=root 192.168.0.66 192.168.0.1

=========

I setup the netboot host as suggested in the readme.
I have downloaded the gzipped kernel with the patch that Ted put at
http://heorot.stanford.edu/tedu/netbsd.gz
I have also downloaded the NetBSD-1.5.2 cobalt ISO and written that to CD.
I copied all the .tgz files (except the x*.tgz ones) out of the binary
directory on the CD.
I did not do anything with the kernel on the cd yet.
I installed all the .tgz files that i got off the CD with tar xvzpf [name of
tgz] from 192.168.0.1:/nfsroot
I installed base.tgz followed by etc.tgz followed by e2fsprogs-1.19.tgz and
then the other tgz's in order by name
I ran sh MAKEDEV all in /nfsroot/dev/

my /nfsroot/etc/rc.conf has the following:

#       $NetBSD: rc.conf,v 1.85.2.9 2001/04/24 22:42:44 he Exp $
#
# see rc.conf(5) for more information.
#
# Use program=YES to enable program, NO to disable it. program_flags are
# passed to the program on the command line.
#

# Load the defaults in from /etc/defaults/rc.conf (if it's readable).
# These can be overridden below.
#
if [ -r /etc/defaults/rc.conf ]; then
        . /etc/defaults/rc.conf
fi

# If this is not set to YES, the system will drop into single-user mode.
#
rc_configured=YES

# Add local overrides below
#
inetd=YES
dhclient=YES

===========

my /nfsroot/etc/inetd.conf has this line:

telnet          stream  tcp     nowait  root    /usr/libexec/telnetd
telnetd

===========

my /nfsroot/etc/fstab has the following:

192.168.0.1:/nfsroot    /       nfs     rw      0       0

===========

I wasn't sure what to name the kernel i downloaded, so i copied the
netbsd.gz file from Ted's site as this:

/nfsroot/
-rwxr--r--   1 root  wheel   809784 Oct  6 18:57 vmlinux.gz
-rwxr--r--   1 root  wheel   809784 Oct  6 19:01 vmlinux_RAQ.gz
-rwxr--r--   1 root  wheel   809784 Oct  6 18:58 vmlinux_raq-2800.gz
-rwxr--r--   1 root  wheel   809784 Oct  6 15:57 vmlinux_raq2800.gz

/nfsroot/boot/
-rwxr--r--  1 root  wheel  809784 Oct  7 11:56 vmlinux.gz
-rwxr--r--  1 root  wheel  809784 Oct  7 11:56 vmlinux_RAQ.gz
-rwxr--r--  1 root  wheel  809784 Oct  7 11:56 vmlinux_raq-2800.gz
-rwxr--r--  1 root  wheel  809784 Oct  7 11:56 vmlinux_raq2800.gz

the kernel that linux boots with on that machine appears to be vmlinux.gz

============

I also added the word 'secure' to the end of every line in /nfsroot/etc/ttys

ttyp0   none                            network secure
ttyp1   none                            network secure
ttyp2   none                            network secure
ttyp3   none                            network secure

=============

When I netboot the qube i also have ping running, this is the output:

PING 192.168.0.66 (192.168.0.66): 56 data bytes
64 bytes from 192.168.0.66: icmp_seq=23 ttl=64 time=1.826 ms
64 bytes from 192.168.0.66: icmp_seq=24 ttl=64 time=0.883 ms
64 bytes from 192.168.0.66: icmp_seq=39 ttl=255 time=1.426 ms
64 bytes from 192.168.0.66: icmp_seq=40 ttl=255 time=0.694 ms
64 bytes from 192.168.0.66: icmp_seq=41 ttl=255 time=0.716 ms
64 bytes from 192.168.0.66: icmp_seq=42 ttl=255 time=1.019 ms
64 bytes from 192.168.0.66: icmp_seq=43 ttl=255 time=0.857 ms
64 bytes from 192.168.0.66: icmp_seq=44 ttl=255 time=0.727 ms
64 bytes from 192.168.0.66: icmp_seq=45 ttl=255 time=0.781 ms
64 bytes from 192.168.0.66: icmp_seq=46 ttl=255 time=0.826 ms
64 bytes from 192.168.0.66: icmp_seq=47 ttl=255 time=1.149 ms
64 bytes from 192.168.0.66: icmp_seq=48 ttl=255 time=0.774 ms
64 bytes from 192.168.0.66: icmp_seq=49 ttl=255 time=7.541 ms
64 bytes from 192.168.0.66: icmp_seq=50 ttl=255 time=0.718 ms
64 bytes from 192.168.0.66: icmp_seq=51 ttl=255 time=0.745 ms
64 bytes from 192.168.0.66: icmp_seq=52 ttl=255 time=0.811 ms
64 bytes from 192.168.0.66: icmp_seq=53 ttl=255 time=1.047 ms
64 bytes from 192.168.0.66: icmp_seq=54 ttl=255 time=0.968 ms
64 bytes from 192.168.0.66: icmp_seq=55 ttl=255 time=0.847 ms
64 bytes from 192.168.0.66: icmp_seq=56 ttl=255 time=0.867 ms
64 bytes from 192.168.0.66: icmp_seq=57 ttl=255 time=7.308 ms

--- 192.168.0.66 ping statistics ---
143 packets transmitted, 21 packets received, 85% packet loss
round-trip min/avg/max/stddev = 0.694/1.549/7.541/1.924 ms

it appears that the qube is booting the netbsd kernel from the nfs server
given that the ttl returned value changes midway through, and from a tcpdump
i have taken that lots of packets appear to be sent.

I have taken a tcpdump of what happens when the qube is netbooted with the
following line:
tcpdump -n -l -vvv net 192.168.0.66
and put it up at http://moat.nlanr.net/~mjl/tcpdump.txt.gz (80kb)

i have noticed that there are lots of messages such as the following in the
dump:
15:59:16.668813 192.168.0.1.2049 > 192.168.0.66.4250027459: reply ok 116
lookup
ERROR: No such file or directory (ttl 64, id 15331, len 144)

i found that there were some stray symlinks in the /nfsroot that the tgz's
had pointing relative to root, so i re-symlinked them to their netbsd
counterparts (after failing to netboot the qube) although that didnt fix
anything:

cd /nfsroot; ls -l | grep lr
lrwxr-xr-x  1 root  wheel         20 Oct  7 15:48 rmail ->
../usr/libexec/rmail
lrwxr-xr-x  1 root  wheel           14 Oct  7 15:56 log -> ../var/run/log
lrwxr-xr-x  1 root  wheel        32 Oct  7 15:55 localtime ->
../usr/share/zoneinfo/US/Pacific
lrwxr-xr-x  1 root  wheel        15 Oct  7 15:54 rmt -> ../usr/sbin/rmt

rmt and localtime are in /nfsroot/etc
log is in /nfsroot/dev
rmail is in /nfsroot/bin

I've never admin'd nfsd before, so i do not know how to find out what files
it cannot actually find.
i looked in /var/log/messages but there wasn't anything there.

I have the primary ethernet plugged into my switch, when it is at various
stages of booting the green light (link status) goes off and on three times;
the third time coincides with the last packet captured with tcpdump.

Any ideas?

Matthew