*BSD News Article 28623


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!s1.elec.uq.oz.au!clary
From: clary@s1.elec.uq.oz.au (Clary Harridge)
Newsgroups: comp.os.386bsd.questions
Subject: diskless FreeBSD hangup
Date: 18 Mar 94 06:48:23 GMT
Organization: University of Queensland
Lines: 226
Message-ID: <clary.763973303@s1.elec.uq.oz.au>
NNTP-Posting-Host: s3.elec.uq.oz.au
X-Newsreader: NN version 6.5.0 #2 (NOV)


I am having trouble setting up a diskless client using FreeBSD
my diskless client boots and then hangs after printing the message

	biomask 40 ttymask 12 netmask 0

I get the same result with both the pc and sc serial i/o drivers.

I have found after halting the kernel with ddb compiled
that there are 4 procs running

pid  proc    addr     uid ppid pgrp   flag stat comm		wchan
3			0 0    0      3    1    update		update
2			0 0    0      3    1    pagedaemon	psleep
1			0 0    0      1    1    swapper		netio
0			0 0    0      3    1    swapper		sched

I can ping the diskless client from my FreeBSD server

I can cause 
	panic: init died 
if I remove /sbin/init on the client.

So it seems that process 1 starts reading init but init does not really get
going properly. Can anyone suggest what might be wrong here?

Details of my diskless setup is as follows
================================================================
<server>	spc.pc.elec.uq.oz.au		FreeBSD host
<client>	c1.pc.elec.uq.oz.au		diskless client
<tftp_root>	/tftpboot
<client_root>	/export/root/c1
<client_swap>	/export/swap/c1
<swap_size>	50000

1) Configure a bootp server.

c1:\
        :ht=ethernet:\
        :ha=0000c004271c:\
        :sm=255.255.255.0:\
        :ip=130.102.180.11:\
        :hn:\
        :vm=rfc1048:\
        :ds=130.102.180.1 130.102.96.1:\
        :gw=130.102.180.1:\
        :hd=/tftpboot/:\
        :bf=/tftpboot/386bsd:

2) Configure a tftp server.

on spc.pc.elec.uq.oz.au /etc/inetd.conf contains

tftp	dgram	udp	wait	nobody	/usr/libexec/tftpd	tftpd  /tftpboot
bootps	dgram	udp	wait	root	/usr/libexec/bootpd bootpd

3) Build a diskless kernel.

machine		"i386"
# cpu		"I386_CPU"
cpu		"I486_CPU"
ident		DISKLESS
timezone	-10			#Eastern Australia, no DST
maxusers	10
maxfdescs	2048			#Max file descriptors per process
# see ddb / ddbsym manuals
options		DDB			# kernel debugger
options		INET			#InterNETworking
options		NFS			#Network File System
# options		PCFS			#MSDOS File System
# options		QUOTA			#disk quotas
options		"COMPAT_43"		#Compatible with BSD 4.3
# disable UDP checksums
options	"TCP_COMPAT_42"		#TCP/IP compatible with 4.2
options		XSERVER			#Xserver
options		UCONSOLE		#X Console support
options		DISKLESS

config		"386bsd"	swap on nfs size 50000

controller	isa0

controller	fdc0	at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
disk		fd0	at fdc0 drive 0
disk		fd1	at fdc0 drive 1

# old console driver
# device		pc0	at isa? port "IO_KBD" tty irq 1 vector pcrint
# new console driver hangs at scgetc /scintr 15 Mar
device		sc0	at isa? port "IO_KBD" tty irq 1 vector scintr
device		npx0	at isa? port "IO_NPX" irq 13 vector npxintr

#For high speed serial lines.
device		sio0	at isa? port "IO_COM1" tty irq 4 vector siointr
# device		sio1	at isa? port "IO_COM2" tty irq 3 vector siointr

# parallel ports
# device	lpt0	at isa? port "IO_LPT3" tty irq 7 vector lptintr

# ethernet
#device ed0 at isa? port 0x280 net irq 5 iomem 0xd8000 vector edintr
device ed0 at isa? port 0x280 net irq 3 iomem 0xd0000 vector edintr

# kernel debugger
pseudo-device	ddb
pseudo-device	loop
pseudo-device	ether
pseudo-device	log
pseudo-device	pty	8
pseudo-device	speaker

pseudo-device	swappager
pseudo-device	vnodepager
pseudo-device	devpager

Install the kernel in /tftpboot  and spc:/export/root/c1


4) Create a client root filesystem and swap file on the NFS server.

spc:/export/root/c1 # ll
total 621
   1 drwxrwxr-x   13 root     wheel        1024 Mar 18 12:07 .
   1 drwxr-xr-x    3 root     bin           512 Mar 13  1980 ..
   1 -rw-r--r--    2 root     wheel         657 Oct 28 15:00 .cshrc
  11 -rwxr-xr-x    1 root     wheel       10953 Feb 25  1980 .profile
 592 -rwxr-xr-x    1 root     wheel      593920 Mar 18 11:01 386bsd
   1 drwxr-xr-x    2 root     bin           512 Mar  9  1980 bin
   4 drwxrwxr-x    3 root     wheel        4096 Mar  9  1980 dev
   2 drwxrwxr-x    7 root     wheel        2048 Mar 18 12:02 etc
   1 drwxr-xr-x    2 root     wheel         512 Mar  9  1980 fd0
   1 drwxr-xr-x    2 root     wheel         512 Mar  7  1980 proc
   1 drwxrwxr-x    3 root     wheel         512 Mar  9  1980 root
   1 drwxr-xr-x    2 bin      bin          1024 Mar 18 10:18 sbin
   1 drwxr-xr-x    2 root     wheel         512 Mar 23  1980 swap
   1 drwxr-xr-x    2 root     wheel         512 Feb 18  1980 tmp
   1 drwxrwxr-x   12 root     wheel         512 Mar 23  1980 usr
   1 drwxrwxr-x   18 root     wheel         512 Mar  7  1980 var

spc:/export/swap # ll
total 2
   1 drwxr-xr-x    2 root     bin           512 Mar 17 15:32 .
   1 drwxr-xr-x    4 bin      bin           512 Mar 13  1980 ..
   0 -rw-r--r--    1 root     bin             0 Mar 17 15:32 c1

**
spc:/etc # cat exports
/export/root/c1 -root=0 c1.pc.elec.uq.oz.au
/export/swap -root=0 c1.pc.elec.uq.oz.au
/usr -root=0 c1.pc.elec.uq.oz.au
**
spc:/export/root/c1/etc # cat fstab
spc:/export/root/c1     /       nfs     rw 0 0
spc:/usr        /usr    nfs     rw 0 0
**
spc:/export/root/c1/etc # cat myname
c1.pc.elec.uq.oz.au
**
#       From: @(#)netstart      5.9 (Berkeley) 3/30/91

routedflags=-q
timedflags=NO
xntpdflags="NO"
ntpdate="NO"
rwhod=NO
sendmail_flags=NO
#kerberos_server=YES
nfs_server=YES
#name_server=YES
#gated=YES
........
........
ifconfig ed0 inet up $hostname netmask my-netmask

# set the address for the loopback interface
ifconfig lo0 inet localhost

# use loopback, not the wire
route add $hostname localhost
        echo -n ' route' ;      route add default -net spc

**
spc:/export/root/c1/etc # diff rc /etc/rc
4d3
< echo "starting rc on c1.pc" > /dev/console
64c63
< mount -a -t nonfs
---
> mount -a
211d209
< mount -a -t nfs >/dev/null 2>&1 &     # XXX shouldn't need background
**
5) Create a diskless configuration file.

diskless_cfg -rootfs /export/root/c1 -swap /export/swap/c1 \ 
		-hostname c1.pc.elec.uq.oz.au
spc:/export/root/c1 # ll /tftpboot/
total 597
   1 drwxr-xr-x    2 root     wheel         512 Mar 15  1980 .
   1 drwxrwxr-x   29 root     wheel        1024 Mar 18 10:01 ..
 592 -rwxr-xr-x    1 root     wheel      593920 Mar 18 11:01 386bsd
   1 -rw-r--r--    1 root     wheel         384 Mar 18 10:46 cfg.130.102.180.11
**
6) Compile the netboot.com program.

spc:/sys/i386/netboot # rcsdiff main.c

82a83,92
>       *(p++) = '/';
>       *(p++) = 't';
>       *(p++) = 'f';
>       *(p++) = 't';
>       *(p++) = 'p';
>       *(p++) = 'b';
>       *(p++) = 'o';
>       *(p++) = 'o';
>       *(p++) = 't';
>       *(p++) = '/';
================================================================

Please email any suggestions.
-- 
regards			Dept. of Electrical Engineering,
Clary Harridge		University of Queensland, QLD, Australia, 4072
			Phone: +61-7-365-3636	Fax:   +61-7-365-4999
			INTERNET: clary@s1.elec.uq.oz.au