Subject: Re: Sun 3/60 diskless boot w/ Linux Bootserver
To: Matthew Sparby <matthews@scc.net>
From: Chris Callanan <ccallana@vision.elee.calpoly.edu>
List: port-sun3
Date: 02/14/1996 23:22:15
The esteemed Matthew Sparby, once spake:
>
>
> My NetBSD experience started when I picked up a Sun 3/60 and monitor for dirt-cheap from a friend who had no clue what to do with it. I didn't know much more about it than he did but I did come across the NetBSD web site and found some answers. My first task is getting the system to function as a diskless workstation... booting from a Linux box.
>
> Documentation regarding RARP, tftp and bootp for Linux are almost non-existent. I've been running Linux as an NFS server for close to a year now so that much I was already familiar with. After shuffling through some cryptic man pages and reading the NetBSD/Sun3 installation instructions I think I have it figured out for the most part. I still have a few things that could be clearer.
>
Gordon asked me to document this a while back... here is what i wrote
up, some of it copied from other documents. its not totally complete,
but it should help
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:
These directions may have changed, as they were for netbsd 1.0
# 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
"I am a traveler of both time and space." Kashmir, Led Zepplin