« Back

Setting up Solaris 8 in 202X

06 May 2021 - faintshadows

(This was originally written July 22, 2020)


So I am currently (at the time of writing this) upgrading the hard drive in my Sun Ultra 5, one of my SPARC boxes. In doing so, I had to reinstall Solaris. I thought while I did that, I would go through my process in setting it up and making it useful today so I could have a reference and can share with others.

Most of the packages I have came from the amazing mirror of the old SunFreeware site, located here.

I don't remember where I got my ISOs for Solaris 8, but they may be on that FTP as well? If not, archive.org has a Sun Solaris archive that has more than anyone could ask for in terms of Solaris media and other extra bits.

Update 2021 The sunsolaris archive got removed, I have a local copy but it's much to big to host on my own.

!!This guide assumes you have a working NVRAM in your Sun box!!

I may do a write up on how to fix up the NVRAM after getting a replacement or getting into the battery in the original one, but time will tell.

To the Install portion. Boot your Solaris media with

boot cdrom

at the OpenBoot ok prompt. If your NVRAM has anything in the boot-file option you'll want to add a - after cdrom. (to check, type printenv at the ok prompt)

Wait a bit, and the screen will clear, then asking what language you want. 0 for English (POSIX C), and 0 again on the next screen.

It'll start up OpenWindows and get you going on the install process. I don't have a mouse for my Ultra 5, so I was stuck using keyboard controls.

This is the system indentification process, and you'll just be telling Solaris that you are or are not on a network, your hostname, if you'll use DHCP or not, what name service you'll use (DNS, more on that in a bit), and make sure the time in your NVRAM is correct.

For DNS, I don't have Search Domains so I left those blank and Solaris complained that I needed to update the DNS information. You can just say no there and it'll continue on its merry way and I had no issues with DNS after that.

After that, it'll ask what you want to do for your disks, if you want to auto-partition or manually do it. I usually go with the automatic one and tweak the sizes afterwards, because by default it doesn't have a separate /usr partition and we're going to be filling up /usr a lot so you can either make / bigger (what I do), or add a separate /usr partition and make that pretty big.

For the 80GB drive I put in here, / was about 8GB large, with around 200MB of swap space, and the rest of the drive was /export/home for user home directories.

Once the drive is partitioned, it'll ask you how much of Solaris you want to install. Since I had all this space to work with I said "Entire Distribution", though YMMV based on your disk space. You can definitely get away with the default, which is End User if I recall, but having everything is nice since you'll get development tools and it doesn't hurt to have those, especially given we don't have a lot of Solaris software already pre-packaged and may have to compile our own.

For "Entire Distribution" but NOT with OEM support, all my Ultra 5 needed was the first install disc and then Software 2, Software 1 wasn't needed.

A few reboots later and we're at the X login screen! Again, no mouse for me so before I can get into CDE I gotta Control+Tab over to "Options" and select console login, where I'm dropped back to the TTY and can get to work.

This is where the fun really starts. /s

NOTE: If you have a mouse, and can log into X, Netscape's built in FTP works and you won't have to worry about using another computer as an intermediary, it seems to load the sunfreeware FTP server fine. But I don't have a mouse, so if you're in the same boat, or are doing this headless, continue on. I would still reccomend making a normal user and doing everything (incl. X) under that user, but you do you.

You can also use a NFS server, which I did for my latest reinstall, and it eases this whole process, since even the latest NFS servers work without issue (assuming you are allowing NFSv3 support). If you have one available on your LAN, go ahead and use that instead of dealing with weird FTP nonsense. However, do not skip this section, since you still need the gzip package and such. You can mount the NFS share with mount -F nfs <IP>:/<export> /mnt

You'll need a computer with an FTP client for a bit, to get our first set of software over to the Solaris install. Thankfully, Sun has a FTP server on by default on Solaris 8 (may also be the same for later versions, not sure, as I haven't used them a whole lot).

But before we login to the FTP, we need to create a user account that's not root. Also, root login on FTP doesn't work.

So in creating a user account I didn't really know how Solaris wants you to do it so I was doing it the Linux way of useradd -m <username> Solaris didn't like that. It complained about not being able to make the home directory, so I just made it myself as root and chown'd it over to foxpro:staff (in my case).

I also had to edit (with good ol' vi) /etc/passwd to reflect that, and also to change my shell to my preferred shell of Zsh, which is installed with Solaris but we'll be installing a newer version shortly.

Now that we have a normal user and a home directory, we can FTP in as the user you created.

So the files I get first are GZip and OpenSSH. From the sunfreeware mirror, head into the sparc/X/ folder, where X is your Solaris version.

So you need:

Once those are in your ~, make sure you are root and enter pkgadd -d gzip-1.4-sol8-sparc-local

Remember pkgadd -d, it's how you install everything from sunfreeware.

You can just press enter to accept and on a fresh install it should say that /usr/local doesn't exist, and it would like to create it. We want that, so press y, and let it install gzip.

Now you can gzip the rest of the files. gzip -d *.gz (or) gunzip *.gz

I noted in a later install that gunzip never worked, the binary was there but it wouldn't run.

I used this guide as a reference here, and it said I should install the packages in this order:

  1. openssl
  2. prngd
  3. zlib
  4. openssh

I didn't, I installed openssh first but it seems to be working fine anyways.

Follow that link, and we'll resume once all the init scripts are written and keys are generated.

sshd gave me an error of "Privilege separation user sshd does not exist" So it's expecting a sshd user, but we don't have one.

I went into /usr/local/etc/sshd_config and changed the line #UsePrivilegeSeperation yes to UsePrivilegeSeperation no

Yea, it's probably not as secure as making a sshd user but this is Solaris 8, it's not secure anyways in 2020.

You then can get back to the above link and generate SSH keys for OpenSSH. Except! What's provided there also doesn't work. They provide: /usr/local/bin/ssh-keygen -d -f /usr/local/etc/ssh_host_dsa_key -N "" That doesn't work, you need to replace -d with -t dsa Which would get you /usr/local/bin/ssh-keygen -t dsa -f /usr/local/etc/ssh_host_dsa_key -N ""

The command for the RSA key is fine as is.

And what also wasn't said in that article, was that in /usr/local/etc/sshd_config, that the paths for the DSA and RSA keys were not specified, so sshd won't start as it can't find the keys.

Oh also the provided initscript for prngd has the wrong path, prngd is in /usr/local/sbin with sshd, not /usr/local/bin like it says.

Also prngd will probably give "Random pool not (yet) seeded", you need Solaris patch 112438-01 for that, which I think is in the big patchset we will be installing at the end of this. So it should work after that.

NOW you can start SSHD and it should hopefully start on boot as well.

Once that's out of the way, and assuming SSH does indeed work (it does for me following this) you can stop using FTP if you'd like, and can use SFTP instead, or use sshfs to mount the Solaris drive as a drive mount.

(This is where you would start if you had a NFS share mounted, and didn't want to install SSH)

Now it's mostly going through sunfreeware and finding anything that looks interesting or useful to have, like wget and sudo. And updated versions of your $EDITOR of choice. Same process, just transfer the files over, gunzip 'em, and pkgadd -d <file>

pkgadd doesn't do dependency checking so the only way you'll know if you're missing dependencies (you most certainly are), is to run ldd <file> on the full path to the binaries you just installed, and see what shows up as not found.

In installing vim, I was missing libraries, so you also need, alongside vim itself,

Yes, all of that.

For zsh, I needed,

ln -sf /usr/local/lib/libgdbm.so.4 /usr/local/lib/libgdbm.so.3

Now onto the patch installing bit, now that we have SSH access and everything pretty much working, we can go and install updates.

I found the patches required for things like Firefox to work at all, and it helps to have them working anyways.

This I got from the (now gone) sunsolaris archive on archive.org. The file in question is 8_Recommended.zip

Go ahead and copy that over, and unzip it. Thankfully, Sun provided a one command solution to installing all of these in the proper order, so we just gotta run that and it'll take care of the rest.

Pro tip, don't unzip it verbosely if you don't have X running, the Sun TTY is godawfully slow and I'm pretty sure more time is wasted drawing to the screen than is waiting for the disk to finish writing.

Once it's unzipped, just cd into the directory and run ./install_cluster

It'll warn you about not installing patches in a low disk space setting, but assuming a large drive like mine, we don't have to worry about this.

When I first did this on the smaller hard drive, I would occasionally get return codes that weren't 0, and I had some concern but after checking out a list of the patch codes I found the ones I would normally get, 2 and 8, that they weren't anything to worry about.

Return code 2 just means that patch has already been applied Return code 8 means the patch is for something that's not installed, which I imagine you would get a lot if you didn't choose "Entire Distribution" like I did.

After that's all done, you should have an updated, working Solaris 8 install with OpenSSH, ready to be worked on remotely.

One last thing, on boot you probably got something from sendmail complaining that your hostname isn't right, for that all you need to do is add some entries into /etc/hosts

So mine looked like

127.0.0.1 localhost 192.168.1.8 ultra5 #Added by DHCP

I just changed the first line to

127.0.0.1 localhost localhost.localdomain ultra5

and that seemed to have fixed it, sendmail no longer complains to me.

One thing I did notice is that modifying /etc/hosts is also critical for getting a remote X11 login working. Which is how I mostly use this Ultra 5. I could launch Xnest and get the dtlogin screen, but when logging into either CDE or OpenWindows, it would just go back to the login screen. —

And THAT, that is finally it, the steps I take to set up Solaris 8 in 2020.

~faint @ faintshadows.xyz