Nerd blog.

01 Feb 2005

NetInstalling OpenBSD on sparc/sparc64

I have had a few friends (who ended up wimping out and installing either via scsi cdrom, or by writing the miniroot.fs to the swap partition) ask how to do a netboot install of OpenBSD on sparc or sparc64 architecture.

First things first

  1. enable the services you will need on your server (OpenBSD will be used for this example). This is actaully quite simple.. make sure the /etc/ethers file exists (we’ll customize it later), as well as the /etc/bootparams file.

  2. in the /etc/ethers file, add the mac address, and the hostname of the machine you want to install (you can get this from the openfirmware boot sequence). My file looks like this:

    8:0:20:79:1c:1d ss5
    8:0:20:c2:a8:7e netra2
  3. add an entry to /etc/hosts for the machine in question.

  4. create an /etc/bootparams file, this file contains the NFS path that will be mounted as the root filesystem. Mine looks like this:

    ss5     root=salamander:/usr/home/ss5/root 
    netra2  root=salamander:/usr/home/netra/root 
  5. enable the tftp daemon in /etc/inetd.conf (uncomment it)

  6. copy or to /tftpboot, you will make a symlink to the file that will be requested in a minute.

  7. prepare the nfs directories:

    mkdir -p /home/ss5/root
    dd if=/dev/zero of=/home/ss5/swap bs=1k count=16000
    cd /home/ss5/root
    tar xzpf /path/to/base36.tgz
    cp /path/to/bsd.rd .
    ln -s bsd.rd bsd
  8. nfs export your directory structure you made

  9. either manually start rarpd and rpc.bootparamd, or just reboot your openbsd server and it will bring up the required services.

  10. now the tricky part, when you “boot net” your sun box, it will request a weirdly named file from the tftp server, and openbsd’s tftp server doesn’t have verbose logging like debians for example, but there is a really easy way to get around that. run tcpdump

    # tcpdump -i hme0 port tftp
    tcpdump: listening on hme0
    05:22:33.667329 netra2.18619 >  17 RRQ "0A00013D"

    The filename in quotes after RRQ is what you will want to symlink or in /tftpboot, so create that symlink, and then you should be able to successfully “boot net” the box and do the install.

I had several sources to write this up:

External References

Theodore Baschak - Theo is a network engineer with experience operating core internet technologies like HTTP, HTTPS and DNS. He has extensive experience running service provider networks with OSPF, MPLS, and BGP.