Netbooting OpenBSD on Sparc
Disk Drives are Optional
There really isn't any practical advantage to having a server without any external disk drives, but I kind of smile when I tell IT people that all you really need is an ethernet card and a serial port on a server.
Configuring a Netboot Server
In this case, my "server" is my Intel powered laptop running OpenBSD, which I recommend since all it's utilities work.
rarpd is a user-space program that will return an ip address when queried with a MAC address. The MAC/IP pairs are configured in /etc/ethers:
08:00:20:9e:b3:e1 us270-ob0 00:09:6b:42:1a:9e ia1800-ob1
Next enable tftpd in /etc/inetd.conf and make sure that /tftpboot exists.
# mkdir /tftpboot # chown -R nobody:nobody /tftpboot/
A DHCP server is not required--instead we'll use a simple BOOTP configured by creating /etc/bootparams:
us270-ob0 root=72.20.216.14:/export gateway=72.20.216.1:0xfffffff0
Notice the mask I used here is NOT a /24 network, I happen to have a /28 here.
The appropriate entries also need to be added to /etc/hosts:
72.20.216.13 us270-ob0 72.20.216.14 ia1800-ob1
My laptop's name is ia1800-ob0, but I don't want to use that name because it will return 127.0.0.1. Don't even think about commenting out localhost--all kinds of stuff will break, and you'll have to reboot.
Lastly, NFS needs to be configured by editing a few files:
$ grep -e nfs -e rpc /etc/rc.conf.local nfs_server=YES portmap=YES nfsd_flags="-tun 1" $ grep nfs /etc/sysctl.conf vfs.nfs.iothreads=1 $ cat /etc/exports /export -ro us270-ob0
After a reboot make sure NFS is configured correctly:
$ showmount -e Exports list on localhost: /export us270-ob0
Netbooting the Sun
After receiving an IP address from the RARP server, the Sun will try to download a boot image from the server that responded. OpenBoot converts the IP address it received to hex and asks for that address. The IP that we're handing out to a HEX number by running a test boot while tcpdump is running to discover what the requested file is.
In my case it's 4814D80D. Make a link to the boot image. You should have ofwboot and ofwboot.net for sparc or sparc64 in your /tftpboot folder.
# cd /tftpboot # ln -s ofwboot.net 4814D80D
Then fire up a few utilties in separate terminals so you can see what is and isn't happening:
$ sudo /sbin/mountd -n $ rpc.bootparamd -d $ sudo rarpd -d -a $ tcpdump -n
At the ok OpenPROM prompt type
boot net bsd.rd
rpc.bootparamd should report something similar to the following:
rpc.bootparamd: whoami got question for 72.20.216.13 rpc.bootparamd: This is host us270-ob0 rpc.bootparamd: Returning us270-ob0 127.0.0.1 rpc.bootparamd: getfile got question for "us270-ob0" and file "root" rpc.bootparamd: returning server:72.20.216.14 path:/export address: 72.20.216.1
rarpd should product output something like this:
fxp0: 0:9:6b:42:1a:9e 72.20.216.14 rarpd: got a packet rarpd: 08:00:20:9e:b3:e1 rarpd: reply sent rarpd: got a packet rarpd: 08:00:20:9e:b3:e1 rarpd: reply set
Once the OpenBSD installer is up and running you'll have to point it to a FTP or HTTP location where all the *.tgz sets are located. I usually copying the sets from the CD and use Apache or thttpd to serve them up. Some web servers don't like to provide access to executable files, so you may have to use chmod 644 bsd* to provide access to the kernel.