Introduction

In May of 1997, I finally decided to weigh anchor and stop running SunOS on my sun3 machine. I had been running SunOS 4.1 ( I always meant to upgrade to 4.1.1, but just never did ), but wanted to start doing some hardware hacking and no way to do that without source code, so NetBSD is the obvious thing. At the same time as I made the move to NetBSD, I also changed a fair amount of hardware. My configuration at the time that I installed NetBSD was as follows: I had NetBSD 1.2 already running on a sun4/370 that was accessible on the network from this sun3, so I decided to do the install "over the network". I had already set up this sun4 to diskless boot the Xkernel onto a sun 3/60, so I was familiar with what was involved in setting up for a network boot, and in fact had already fallen into and climbed out of most of the pits involved in doing this.

Setting up for the diskless boot

The diskless(8) man page for NetBSD actually covers this quite well, but here is a quick run thru of what is involved. The following files and directories need to be monkeyed with: In /tftpboot one file (netboot) and a link to it are required. The name of the symbolic link is the IP number of the target machine in hex, something like 8273900B.

No swap space is needed for the NetBSD ramdisk kernel. In fact, the only thing that needs to be placed into /export/root/pickle is the file: netbsd-rd . All of this is pretty well documented in the install notes for NetBSD-sun3.

The netbsd miniroot is supplied as miniroot.sun3.gz, and needs to be gunzipped and placed somewhere handy. I brought the entire NetBSD-1.2 for sun3 distribution home on a tape and loaded it into /usr/archive/NetBSD-1.2/sun3. The miniroot ended up being gunzipped into /usr/archive/NetBSD-1.2/sun3/miniroot.sun3. Note that the install notes say gzip when they mean gunzip in a place or two.

At this point, it is time to give things a go. The first time I tried all this, I had to monkey with the rc files on my server machine to activate rarpd and bootparamd. Then power on the machine "pickle" and use L1-A to interrupt whatever boot sequence it is probably trying (in my case booting from sd()), then type:

b ie()netbsd-rd -s

What goes on at this point is that the boot roms obtain their IP number via rarp, then use tftpboot to get the netboot image (the 2nd stage boot) and run it. It then uses NFS to get the kernel image (in this case netbsd-rd) and runs it. /etc/bootparams tell it where to mount the root from and /etc/exports makes it available.

This all worked fine, and in short order brought up the NetBSD ramdisk kernel and its minishell, then I issued the commands:

ifconfig ie0 inet xx.yy.zz.pp up
mount -r xx.yy.zz.ss:/usr /mnt
dd if=/mnt/archive/NetBSD-1.2/sun3/miniroot.sun3 of=/dev/rsd0b bs=8k

After the ifconfig, I got the peculiar error message: ie0: TDR detected short, 4096 clocks away; and after the dd command, I got 5 repeats of the message: si_intr: spurious from SBC. But all in all this seemed to work despite the messages. Notice that the scsi disk had to be partitioned and labeled before any of this would work, and this would presumably have to have been done under SunOS. In any event, as I had previously been running SunOS, I had done all of this via the SunOS format program. In fact my partition layout at this time was:

At this point, I typed "halt" and then rebooted from the miniroot that I had just copyed into the swap area via the following:

b sd(0,0,1) -s

This boots up a real GENERIC netbsd kernel, which in itself is pretty exciting. Typing "install" starts the install script running and it right away asks what disk is my root (sd0 of course) and then asks if I would care to edit my disklabel. I did care to (altho the install notes mention that this disk should already be partitioned via the ramdisk kernel). I merged my previous g and h partitions into a single d partition as follows:

After this I told it sd0d should mount on /usr and the install script built filesystems on / and /usr. So much for SunOS. Next thing is to answer a buch of questions to configure the network. I edited /etc/hosts to add my server machine and opted to use tcp capable NFS, since that machine was running NetBSD-1.2.

I told it to get the install sets from server:/usr/archive/NetBSD-1.2/sun3/binary and found something to read while it plowed thru all the install sets. US/Arizona seems to be the right timezone for me and pretty soon we are putting a kernel and boot blocks on my disk and I am being congratulated on having installed NetBSD.

b sd()

Does indeed seem to boot netbsd now, and I don't need to crack past a root password or anything! Not bad, this only took a couple of hours of one evening. Now I need to move all the sources over and get X11 to run and I can call this a working system.