Subject: Re: other sun questions...
To: Rick C. Petty <pett0019@gold.tc.umn.edu>
From: Chris Callanan <ccallana@vision.elee.calpoly.edu>
List: port-sun3
Date: 03/03/1996 19:13:38
The esteemed Rick C. Petty, once spake:
> 
> On Sun, 3 Mar 1996, Jason Thorpe wrote:
> 
> > There's been a process posted here before on how to boot your NetBSD/sun3 
> > system from Linux.  We probably ought to put it up on the NetBSD WWW 
> > server :-)
> 
> YES!  Please do...  ;)
> 

yup.. i wrote this one up a while back.... its not fully complete,
but it should be enuf to help most people out.



Installing on a Linux NFS server:

(How to set up your Linux NFS server so your Sun3 can boot NetBSD from it.)

Section I: Basic Setup

First of all, some things you may need to get running, that may or
may not have been part of your Linux distribution:

rarp, rpc.portmap, rpc.nfsd, rpc.bootparmd, tftpd.  

Rarp portmap and nfsd should be included.  If not, you should be able to find
them on the major archives for linux.

bootparmd is probably not included, you can find that in the Linux 
XKernel package on sunsite or its mirrors.   

tftpd must be set up in /etc/inetd.conf to point to the proper directory,
as the Sun is only requesting the IP, not a directory.  i.e.

tftp    dgram   udp     wait    root    /usr/sbin/in.tftpd /usr/sbin/in.tftpd /tftpboot


Section II: Setting up the Server end.

1.  Get the Ethernet address of the client.  (It is printed on
    the console when you power-up the machine.)  

2.  Assign an IP address for the machine.  Add it to /etc/hosts
    (or the DNS or YP database on the server)

3.  Insert a line for rarp into your rc script.  Something like this:
	/sbin/rarp -s duvel 08:00:20:00:01:82
	where duvel is the name of the Sun from the /etc/hosts file.
        and the big number is the hardware address of the Sun.

4.  Add the client to your bootparams database.  In /etc/bootparams:
	client	root=server:/export/client/root \
		swap=server:/export/client/swap

	Where client is your Sun and server is your Linux machine.

5.  Create the directory hierarchies on your NFS server.  First, put
    the *.tar.gz files someplace where they can be read.  Then:

	# Once per server:
	cd /export
	mkdir netbsd.sun3
	cd    netbsd.sun3
	TARDIR=/somewhere	# (where to find *.tar.gz)
	sh install.sh		# (unpacks *.tar.gz here)

	# Once per client:
	cd /export
	mkdir client client/root
	dd if=/dev/zero of=client/swap bs=8k count=1024
	cd client/root
	mkdir bin sbin
	(cd ../../netbsd.sun3 ; tar cf - dev etc var) | tar xvf -
	(cd ../../netbsd.sun3/bin  ; ln * /export/client/root/bin)
	(cd ../../netbsd.sun3/sbin ; ln * /export/client/root/sbin)
	(cd dev ; sh MAKEDEV)
	cp -p ../../netbsd.sun3/netbsd.dl60 netbsd
	ln -s netbsd vmunix

   Double check the Makedev step, it failed on me the first time.

6.  Copy the NetBSD/sun3 diskless boot program into 
    your /tftpboot directory ; then make a link...
	cd /tftpboot
	cp -p /export/client/root/usr/mdec/netboot .
	ln -s boot.sun3 C0E914C3
    where the link basename is the client IP address in hex.
    ex: C0E914C3 = 192.233.20.195
    The directory and files must have global read permission.

7.  Customize the following files in /export/client/root:
	cp etc/fstab.nfs etc/fstab
	cp /etc/hosts etc/hosts
	echo client > etc/myname

	Create a file called hostname.le0 and inside put your ifconfig
	information, i.e.

	inet duvel 255.255.255.0 255.255.255.255

	Which means, type inet, name duvel (must be in /etc/hosts),
	netmask of 255.255.255.0 and broadcast of 255.255.255.255

8.  Export the above.  On Linux, /etc/exports needs:

	/export/netbsd.sun3/usr         duvel(rw)
	/export/client          duvel(rw)
	
	I had a few problems NFSing usr, so I just copied it under
	root and it solved quite a few problems.


Section III: Booting a Sun3/60 client:

Tell the PROM to boot from Ethernet, i.e.

	> b le() -ds

The "-ds" options tell the kernel to stop in DDB, and
then boot in single-user mode.  To continue from DDB do:

db> cont

Then, to go multi user, do:

	# fsck -p	# (if necessary)
	# mount -u /
	# exit



-- 
  Chris Callanan - CpE major       ccallana@gauss.elee.calpoly.edu 
              http://www.elee.calpoly.edu/~ccallana
         "The secret to happiness is high expectations 
              and your own bag of chips" --dogbert