Setting/resetting a MAC address on a Sun workstation with dead NVRAM battery using OBP (Open Boot PROM)

I had this post in draft since 2019 when I picked up a Sun Ultra 60 from ebay and needed to reset it’s MAC address because the NVAM battery had died. I never posted it apparently, probably because I only had to do it once and then forgot about it.

I had to give up the Ultra 60 when we moved from the US back to the UK – if you’ve every come across one of these you’ll know how heavy they are and I couldn’t justify the shipping costs (besides, I already had a Power Mac G5 and a Mac Pro 3,1 going in the container, which were heavy enough).

I saw a FB post recently that someone had a palette of Sun Ultra 5 ‘s for £50, so after working out some shipping, I now have an Ultra 5.

I previously followed instructions I bookmarked here but looks like that article is not up anymore, but it is archived on Wayback Machine here.

The relevant part I needed were the steps at the Open Boot Prompt to reset the MAC and System address:

01 0 mkp
80 1 mkp < = System type. For sun4u arch 80. For sun4m arch - 72
08 2 mkp <= Sun AUI is is always 08:00:20, which are the next three values for MAC
0 3 mkp
20 4 mkp
01 5 mkp <= 01:02:03 next values to append for your MAC, e.g. to generate 08:00:20:01:02:03 as MAC
02 6 mkp
03 7 mkp
0 8 mkp
0 9 mkp
0 a mkp
0 b mkp
c0 c mkp <= next 2 values are your System ID, e.g. c0:ff:ee
ff d mkp
ee e mkp
0 f 0 do i idprom@ xor loop f mkp <= Calculates the checksum

The Gentoo wiki also has a great reference for OBP prompt commands here.

Notes on setting the MAC address also here and here.

I don’t have VGA monitor for the Ultra 5 yet, or a Sun keyboard or mouse, so I’m booting via a serial terminal right now (using my VT132) – first two steps scrolled off the screen:

After the above steps, reset-all, then your boot command depending where you are booting from,

boot disk

or

boot net

Mounting SMB and NFS shares from ugreen NAS on Linux

To mount an NFS share on Ubuntu:

sudo mount -t nfs4 ip-address=of-nas:/volume[x]/sharename /mnt/path

If you get this error:

mount: /mnt/path: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program

Install helpers (from here):

# for NFS
sudo apt install nfs-common

# for SMB
sudo apt install cifs-utils

For mounting an SMB share using a specific userid (will be prompted for password):

sudo mount -t cifs -o username=your-user-id //ip-address/sharename /mnt/path

Note for ugreen NAS shares, the sharename is just the sharename and not /volume[]x]/sharename

Creating and renewing Let’s Encrypt SSL certificates with certbot

After purchasing SSL certs for many years for my personal project websites, I recently switched to creating free Let’s Encrypt certs using CertBot instead.

To install with python and pip on Debian based Linux, for nginx (from here):

Install deps and install:

sudo apt install python3 python3-dev python3-venv libaugeas-dev gcc
sudo python3 -m venv /opt/certbot/
sudo /opt/certbot/bin/pip install --upgrade pip

sudo /opt/certbot/bin/pip install certbot certbot-nginx
sudo ln -s /opt/certbot/bin/certbot /usr/local/bin/certbot

To generate certificate and renew manually (same command):

sudo certbot certonly -v --reinstall --webroot --webroot-path=/var/www/html/ --email your@email --agree-tos --no-eff-email -d your.domain.name

To view current status of your certificates:

certbot certificates

For websites not on the public internet where the validation step can’t use the webserver to host a validation file, certbot also can validate using a DNS record with a generated value – follow the prompts to use this approach:

certbot certonly --manual --preferred-challenges dns -d your.domain.name