Diskless Sun3/NetBSD HOW-TO NetBSD over the network on a diskless Sun 3/60 workstation. Boot PROM setup Set the NORM/DIAG hardware switch to the DIAG position. This will put serial console output over serial port A. Power on the sun3 with a null modem cable connecting the serial port to a properly configured terminal, i.e. 9600 baud, 8N1, VT-100 emulation. The machine should display boot PROM selftests, a memory test, and other system checks. Note the machine's ethernet address, i.e., 8:0:1:1:58:E7, this will be used later when setting up the boot server(s). Type 'h' for the help menu. To open the EEPROM, enter 'q'. To boot from AMD (Lance) Ethernet le(0,0,0), set EEPROM locations 0x019-0x01d to 0x6c 0x65 0x00 0x00 0x00. To set Primary Terminal use serial port A, set 0x01f to 0x10. These settings should be enough to ready the sun3 for netbooting, the rest of the work is done on the server. rarpd server On the server running linux, run apt-get rarpd. Create an /etc/ethers file listing the sun3 client's ethernet hardware address: #/etc/ethers 8:0:1:1:58:E7 sun3 Add your client to the /etc/hosts file on the server and assign it an arbitrary (yet available) IP address: #/etc/hosts 192.168.1.36 sun3 Run # /usr/sbin/rarpd -A, to have the rarpd daemon respond to ARP as well as RARP requests. rpc.bootparamd server # apt-get bootparamd Create the /etc/bootparams file: #/etc/bootparams sun3 root=nfsserver:/export/sun3/root gateway=192.168.1.254:0xffffff00 Where the router/gateway IP address is entered followed by the netmask in hexadecimal form. The bootparamd daemon may be run in debug mode by running: # /usr/sbin/rpc.bootparamd -d tftp server # apt-get install tftpd The trivial file transver protocol is used by the sun3's boot PROM to download the boot loader over TCP/IP. Creat a directory /tftpboot on the server: # mkdir -p /tftpboot Place the NetBSD boot program from installation/netboot/netboot into the /tftpboot directory and rename it according to the sun3's IP address assigned in /etc/hosts. For example, for an IP address of 192.168.1.36 the netboot file should be named C0A80124 by converting each octet to hexadecimal representation. Edit /etc/inetd.conf and remove the # from the following line: tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd /tftpboot NFS server Create the networked file system on the server allowing the client root read/write access. The following directories must have root read/write permissions: / /var /etc /dev Run: # mkdir -p /export/sun3/root/dev # mkdir /export/sun3/usr # mkdir /export/sun3/home # touch /export/sun3/swap # cd /export/sun3/root # tar --numeric-owner -xvpzf /path/to/netbsd/binary/sets/kern-DISKLESS.tgz # mknod /export/sun3/root/dev/console c 0 0 Create an /etc/exports file: #/etc/exports /export/sun3/root sun3(rw,no_root_squash) /export/sun3/swap sun3(rw,no_root_squash) /export/sun3/usr sun3(rw,root_squash) /export/sun3/home sun3(rw,root_squash) Run apt-get nfs-user-server to install the mountd & nfsd daemons. Setup the client filesystem In the /export/sun3/root directory, untar the essential distribution sets: # tar --numeric-owner -xvpzf /path/to/netbsd/binary/sets/base.tgz # tar --numeric-owner -xvpzf /path/to/netbsd/binary/sets/etc.tgz Additional sets may also be extracted the same way. Run: # mkdir /export/sun3/root/kern Setup swap (creates a 16 MB swap file): # mkdir /export/sun3/root/swap # dd if=/dev/zero of=/export/sun3/swap bs=4k count=4k Create a file called /export/sun3/root/etc/ifconfig.le0 with the following: #/etc/ifconfig.le0 inet sun3 netmask 255.255.255.0 broadcast 192.168.1.255 Setup the file system table, create a file /export/sun3/root/etc/fstab with: #/etc/fstab nfsserver:/export/sun3/swap none swap sw,nfsmntpt=/swap nfsserver:/export/sun3/root / nfs rw 0 0 nfsserver:/export/sun3/usr /usr nfs rw 0 0 nfsserver:/export/sun3/home /home nfs rw 0 0 Edit /export/sun3/root/etc/rc.conf and add the values: hostname="sun3" defaultroute="192.168.1.254" nfs_client=YES auto_ifconfig=NO net_interfaces="" Add the client and server to /export/sun3/root/etc/hosts: #/etc/hosts 192.168.1.36 sun3 192.168.1.84 nfsserver Reboot the server to ensure that all daemons and configuration files are loaded properly (i.e., rarpd, tftpd, rpc.bootparamd, rpc.nfsd, & rpc.mountd) and try netbooting the sun3. If everthing is working correctly, you should see: Selftest Passed. Sun Workstation, Model Sun-3/60M. ROM Rev 1.6, 4MB memory installed, Serial #88295 Ethernet address 8:0:1:1:58:E7 Testing 4 Megabytes of Memory ...Completed. Auto-boot in progress... Using IP Address 192.168.1.36 = C0A80124 Boot: le(0,0,0) Booting from tftp server at 192.168.1.95 = C0A8015F Downloaded 23852 bytes from tftp server. >> NetBSD/sun3 netboot [1.13] Using IP Address 192.168.1.36 = C0A80124 netboot: trying netbsd 1121172+89124 [127392+117150]=0x163718 starting program at 0x4000 console is ttya Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. NetBSD 6.0 (DISKLESS) Model: sun3 60 fpu: mc68881 total memory = 4096 KB avail memory = 2680 KB mainbus0 (root) obio0 at mainbus0 zsc0 at obio0 addr 0x0 ipl 6: (softpri 3) kbd0 at zsc0 channel 0: baud rate 1200 ms0 at zsc0 channel 1: baud rate 1200 zsc1 at obio0 addr 0x20000 ipl 6: (softpri 3) zstty0 at zsc1 channel 0 (console i/o) zstty1 at zsc1 channel 1 eeprom0 at obio0 addr 0x40000 oclock0 at obio0 addr 0x60000 ipl 5: intersil7170 memerr0 at obio0 addr 0x80000 ipl 7: (Parity memory) intreg0 at obio0 addr 0xa0000 le0 at obio0 addr 0x120000 ipl 3: address 08:00:01:01:58:e7 le0: 8 receive buffers, 2 transmit buffers obmem0 at mainbus0 bwtwo0 at obmem0 addr 0xff000000 (1152x900) cgfour0 at obmem0 addr 0xff300000 (1152x900) enabling interrupts boot device: le0 root on le0 nfs_boot: trying RARP (and RPC/bootparam) nfs_boot: client_addr=192.168.1.36 (RARP from 192.168.1.95) nfs_boot: server_addr=192.168.1.95 nfs_boot: hostname=sun3 nfs_boot: gateway=192.168.1.254 nfs_boot: my_mask=255.255.255.0 root on unisys:/export/sun3/root /etc/rc.conf is not configured. Multiuser boot aborted. Enter pathname of shell or RETURN for /bin/sh: We recommend that you create a non-root account and use su(1) for root access. sun3# ls .cshrc bin kern libexec rescue stand usr .profile dev lib mnt root swap var altroot etc libdata netbsd sbin tmp sun3#