Steps for installing Solaris 10 on a sparc server over serial
I have a Sun Netra X1 running Solaris 5.8. I needed to blow it all away and install a fresh copy of Solaris 10 so I could sell it. I had done this before on a few sparcbooks and I remember it being complicated and there being a lot of conflicting information out there. So I figured I'd document the process, just in case I need to do it again.
Ubuntu on a desktop that has ports
I'm going to be using a desktop that has ethernet and a 9 pin serial port, running Ubuntu. The brand of Linux doesn't matter, but you definitely need ethernet and a serial port, and usb serial is rife with problems.This little box is going to be the network host for everything.
First I connect the 8P8C LOM port (Lights Out Management) on the Sun to the 9 pin serial port on my linux box. Then I run the following to configure minicom
$ sudo minicom -s
The Sun manual says the port should be 9600 baud, 8N1. So I setup minicom to do just that, and then save the config and run minicom.
I plug in the server and sure enough, I see a lom> prompt in minicom!
lom> poweron
This turns on the server and it boots off the harddrive. As it boots up, I collect some information about the server.
Sun Netra X1 (UltraSPARC-IIe 400MHz)
OpenBoot 4.0, 1024 MB memory installed
ethernet: 0:3:ba:5:22:e4
Loading: /platform/SUNW,UltraAX-i2/ufsboot
Loading: /platform/sun4u/ufsboot
SunOS Release 5.8 Version Generic_108528-06 64-bit
The most important things here are the ethernet MAC address, as well as the fact that it uses the sun4u platform. I let the server continue booting until it reaches a console login prompt. I then connect a cross-over ethernet cable between the Sun and my linux machine.
Configure the net boot server
Now I focus on configuring the Linux machine to properly netboot the Sun machine. First I setup the ethernet network. I set the IP address of the Linux machine to 10.0.0.1 with a netmask of 10.255.255.255. If I don't set the netmask accordingly, bootparamd won't answer the broadcast later, and you'll get a "ERROR bpgetfile unable to access network" error when you try to do the installer.
My linux machine now has 2 networks.. the normal network over wifi, and the configuration subnet over ethernet.
First I'll need to install and configure rarpd so the net boot knows its own IP and server name.
$ sudo apt install rarpd
$ sudo vi /etc/ethers
/etc/ethers should have just the following line:
00:03:ba:05:22:e4 netboot.local
Which is the MAC address we recorded from the server boot, and a completely invented server name.
Next configure the ip address:
$ sudo vi /etc/hosts
and add the following line:
10.0.0.2 netboot.local
The net boot will then want to fetch its boot kernel from tftpd, so we'll install that next.
$ sudo apt install tftpd-hpa
$ sudo systemctl start tftpd-hpa
You'll notice we start the tftpd daemon already, but didn't with the rarpd. That's intentional, we'll run rarpd after we get the kernel.
In fact, the kernel is the next thing we need. So we download the Solaris 10 ISO from Oracle... and we'll mount it to a local endpoint in our home dir.
$ mkdir sun
$ sudo mount -o loop sol-10-u11-ga-sparc-dvd.iso sun
$ sudo cp sun/Solaris_10/Tools/Boot/platform/sun4u/inetboot /srv/tftp/0A000002
So we make a sun folder, mount the ISO on it, and then copy the proper boot kernel into the default tftp folder. Remember during the initial boot we noted that the system used sun4u? That's how we know to use it here. Finally, the /srv/tftp folder is the default folder for tftpd-hpa. We rename the file to 0A000002 which you'll notice is the hex encoding of the IP we assigned, 10.0.0.2.
Now we'll run rarpd, which checks the existence of the boot kernel, which is why we waited to run it.
$ sudo rarpd -v -b /srv/tftp eno1
Now you have to specify which ethernet interface to listen to. On older Linux, that's eth0. On Ubuntu 23, it happens to be eno1.
Next we need to specify the boot params, along with installing the boot param daemon.
$ sudo apt install bootparamd
$ sudo vi /etc/bootparams
/etc/bootparams should have the following line:
netboot.local root=10.0.0.1:/sun/Solaris_10/Tools/Boot install=10.0.0.1:/sun/ boottype=10.0.0.1:in rootopts=10.0.0.1:vers=2
This tells the server where it's boot partition and install partition should be (on NFS). The Solaris bootparams doesn't require the host ip in front of every field, but the linux bootparams does.. so do it this way instead of what you read elsewhere.
Now rpcbind intercepts all rpc broadcasts and doesn't forward them properly. So you'll also want to edit rpcbind:
$ sudo vi /etc/default/rpcbind
Find the OPTIONS line and add -r to it, so it should be OPTIONS="-w -r"
and restart rpcbind
$ sudo systemctl restart rpcbind
Now we just need to setup NFS.
$ sudo apt install nfs-kernel-server
$ sudo exportfs \*:~ -o fsid=0,ro,no_root_squash,crossmnt,no_subtree_check,sync
This shares my entire home folder over NFS. You'll probably want to stop exporting it when you're done.
Now, just because it's the most finicky service we have, I prefer to run the bootparam service in the foreground. So that's the last thing to do:
$ sudo rpc.bootparamd -d
This tells bootparam to display debug data to stdout... and it'll run until you ctl-c it.
Now, switch back over to minicom in another terminal preferably.
We'll interrupt the server and go back into lights out management by pressing the LOM interrupt keys which are hash followed by period: #.
That should return you to the LOM prompt... we'll then break out of that to openboot:
lom> break
You should now see the "ok" prompt from openboot. Finally we'll tell it to net boot and run the installer:
ok boot net - install
That should cause the system to reboot, and hit the linux machine for all the various things it needs in order to boot properly and then finally start the Solaris 10 installer.