This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Hardware

1 - Supermicro

1.1 -

Bundled BIOSs

Supermicro often bundles the firmware for the motherboard and BMC together.

Enable Remote Upgrade

Upgrading the BIOS remotely requires a license key. If your system is out of support, you can generate that getting the IMPI MAC address from the System page and using this command.

echo -n 'THEMACADDRESS' | xxd -r -p | openssl dgst -sha1 -mac HMAC -macopt hexkey:8544E3B47ECA58F9583043F8 | awk '{print $2}' | cut -c 1-24 | sed 's/..../& /g'

You can then download the BIOS from the support page, uncompress it, enter the BIOS update settings and then apply it.

(Accept the defaults)

Update the BMC/IMPI

The Baseboard Management Controller, or BMC, is a small embedded computer inside the server that allows you lights-out management. I.e. you can control the system even when its powered off. One of it’s key features is to provide the IMPI (Intelligent Platform Management Interface), a way to mange the server over the network. Its a good idea to enable it and keep it up to date.

Find the model of your server (as from the PO or BIOS screen) and search for it’s support page, for example:

Supermicro 5048R-E1CR36L

<https://www.supermicro.com/en/products/system/4U/5048/SSG-5048R-E1CR36L.cfm?

View the server’s Quick Start document to find which network socket on the server the BMC uses. Enter the BIOS (if needed) to configure the IPMI network settings and to determine what IP address (if using DHCP) is in use. It will also display this during boot. You can then access it over the network, change the password and go to maintenance.

Go to Maintenance at the top, then Firmware Update at the left. Enter Update Mode and supply the new firmware, downloadable from the server support page above.

(Leave the defaults checked)

For some/all models, the BIOS and BMC firmware are bundled together and you can skip the next step

Upgrade the SAS card

The recommended[^2] firmware (by TruNAS) is version 16.00.12.00. This is newer than the version available at Supermicro’s site.[^3].

Download the firmware package from Supermicro and the firmware binary from TrueNAS. You will need the former for the flashing utility.

Install from

You may be able to create an ISO from it and mount it virtually. See the [Virtual CD-ROM.md] notes. If it works, you can look at mapped devices with the command and change to the device

If that fails, you can extract it to a GPT FAT32 USB drive, travel to the site and insert it. Connect to the network KVM and reboot. During POST, record the SAS address by hitting Ctrl-C during it’s screen and taking a screen shot

Then you can reboot and invoke the boot menu with F11 and select built-in EUFI shell. (Enable the built in shell in BIOS Boot order if needed)

You should flash it to IT mode as you’ll not be booting from it

# Look for removable HardDisks as likely suspects
map -b
fsrB:
cd 3008*\IT\UEFI
SMC3008T.NSH

You may get stuck at the end if your netkvm keeps interrupting you before you can get the whole string in and you’ll have to look at the NSH and see what the last command is. It will be something like this:

sas3flash.efi -o -sasaddhi 50030

In that case, if your address was 50030480:1CDC4001 you can execute

sas3flash.efi -o -sasadd 500304801CDC4001

Version

TrueNAS discovered issues[^2] with the 3008 and sata drives and recommends a special firmware they have worked with Broadcom to create. I have seen those issues first hand with the firmware available from Supermicro and recommend updating to firmware 16.00.12.00 from TrueNAS

https://twitter.com/Kleissner/status/996955400787423232?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E996955400787423232%7Ctwgr%5E%7Ctwcon%5Es1_&ref_url=https%3A%2F%2Ftechblog.jeppson.org%2F2018%2F12%2Fgenerate-supermicro-ipmi-license%2F

https://forums.servethehome.com/index.php?threads/lsi-9300-8i-flashing.28140/

1.2 - IPMI

Instructions to use the java based KVM that’s part of the IPMI on older Aupermicro servers.

  • Download Firefox 52 ESR from https://ftp.mozilla.org/pub/firefox/releases/52.0esr/win32/en-US/
  • Block FireFox from updating. (HOW? - IF you don’t do this, every time you close the browser FireFox will auto update to version 60, which won’t work with Java)
  • Install Java 8 Update 431. (which version? I installed Both 32 and 64 bit just in case.)
  • Edit Java Policy ** notpade C:\Program Files\Java\jreXXX\lib\java.policy ** At the bottom, add : permission java.security.AllPermission; ** Enable Java Add On’s to always activate in firefox (In the address bar enter) about:addons On the left, “Plugins” On the right, set the two Java entries to “Always Activate”
  • Add the URL of the IPMI to the java exeptions list ** Java Control Panel –> Security Tab –> Exception Site List

1.3 - Virt CD

Supermicro’s IPMI will only mount NTLMv1 shares for virtual CD-ROM drives. Do that like so:

Enable NT1 protocol in your samba server

vi /etc/samba/smb.conf

[global]
  map to guest = bad user
  hosts allow = 192.168.1.
  log file = /var/log/samba/%m.log
  min protocol = NT1

[srv]
  path = /srv
  read only = no
  guest ok = yes
  guest only = yes

In the Virtual Media CD-ROM add the host and path as below and hit Save before you attempt to mount.

Share Host: 192.168.1.X Path to Image: \srv\VMware-VMvisor-Installer-7.0U3c-19193900.x86_64.iso

2 - Waveshare

Waveshare makes many SBC accessories

2.1 - CM4 NAS

This is perhaps the most portable NAS you can put together. Paired with 5V/3A DC power supply like the ones [geekworm] makes (that don’t reset when input power is applied) it travels in the car well.

Configure as a Basic Server

One great use is to add some media, enable it as a HotSpot and share things up with plain-old SMB. Most tablets will easily connect and play with VLC.

  • Install RaspberryPI OS
  • Install Hardware Tools
  • Configure SMB
  • Add a HotSpot

Install RaspberryPI OS

If you have an EMMC based CM4, flip the switch on the back to put it in target mode and power it on while plugged into your PC. You’ll see it appear as a block device and you can image it.

After installation, run these commands on it to set it to US locale and settings.

sudo raspi-config nonint do_change_locale en_US-UTF-8
sudo raspi-config nonint do_configure_keyboard us
sudo raspi-config nonint do_wifi_country US
sudo timedatectl set-timezone America/New_York

Install Hardware Tools

These make the buttons and LCD work as intended. Refer to their wiki for installation - though this may be out of date and require some work as Raspberry Pi updates their OS.

Configure SMB

After you’ve configured the storage, with mdadm, btrfs or mergerfs, you’ll want to share it up simply.

Setup SMB

Add a HotSpot

The easiest way to create a hotspot is with nmcli. It’s already installed and will do the configuration for you. Here’s the command to add a 5GHz connection on channel 161.

sudo nmcli device wifi hotspot ssid SOMENAME band a channel 161 password SOMEPASSWORD ifname wlan0 
sudo nmcli connection modify Hotspot connection.autoconnect yes

This will give you about 72MBits of bandwidth. If you’re getting less, look to see if anything else is using 161 and change as needed.

# What channels can I use?
iw phy phy0 info | grep "MHz \[" | grep -v "no IR" | grep -v "disabled"

# What other things are around me?
sudo nmcli device wifi

# Try on of the ones that might be free
sudo nmcli connection modify Hotspot wifi.channel 149

Not every channel is available in every country. In fact, if you tried to use the default when creating the AP you’d get these errors1.

Error: Connection activation failed: 802.1X supplicant took too long to authenticate brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail, reason -52

If you want to use it as a router as well, say because you’ve plugged it into a LAN cable, you can enable masquerade.

Configure LibreELEC

You can double-down and use this as a media player, in addition to serving up content over the network. A great way to do this is with LibreELEC

Though as Jeff Geerling found you may be doing something dangerous or harmful, so be careful!

Installation

Flashing the OS

This requires either flashing the SD card, or putting the CM4 into USB target mode and using rpiboot to mount the eMMC as a drive so you can use the Raspberry Pi Imager to flash the LibreELEC image.

The LibreELEC folks recently added AHCI support to their CM4 image so you don’t have to re-spin things.

Installing Hostapd

You may want to increase the WiFi performance by installing hostapd, but some assembly is required.

Configuration

You can also install services like Jellyfin. For large libraries, you may want to switch it’s metadata directory by editing:

/storage/.kodi/userdata/addon_data/service.jellyfin

Speeding up Rsync

For smaller CPUs, it can help to use the rsync daemon on-demand to remove the overhead of SSH. Establish SSH keys and write a simple script like below.

Setup Rsync Daemon

Troubleshooting

The USB port isn’t working

Check that the config.txt file contains

dtoverlay=dwc2,dr_mode=host

Jellyfin transcoding is slow

Yes, this is just a Pi4. But you can find versions of ffmpeg optimized for the pi4 hardware and rest replacing the shipped version. Though you’d think that one was already optimized.

2.2 - UPS

Notes

https://www.waveshare.com/ups-hat-e.htm

The pogo pins didn’t supply voltage until I used a pencil eraser to clean the bottom of the Pi’s contacts, and them too for good measure.

Once working, I downloaded the python same as described in

https://www.waveshare.com/wiki/UPS_HAT_(E)

You must sudo the first example, but the second injects into the GUI seemingly OK (though I didn’t test to see if it was accurate).

Then I used ChatGPT to make a UPS monitoring script. It did a really good job. I’d have hacked something up in bash, but python is better for reading registers (probably)

I had the gui version of RaspOS installed so there might have been other libraries than described in the wiki that were used without being explicitly called out.

sudo vi /usr/local/bin/ups-monitor.py
sudo chmod +x /usr/local/bin/ups-monitor.py
#!/usr/bin/env python3
import time
import subprocess
from smbus2 import SMBus

I2C_ADDR = 0x2D            # UPS HAT (E) I2C address
RUNTIME_LOW  = 0x28        # low 8-bit of remaining time (minutes)
RUNTIME_HIGH = 0x29        # high 8-bit

SHUTDOWN_LIMIT = 20        # minutes

def get_remaining_minutes():
    try:
        with SMBus(1) as bus:
            lo = bus.read_byte_data(I2C_ADDR, RUNTIME_LOW)
            hi = bus.read_byte_data(I2C_ADDR, RUNTIME_HIGH)
            remaining = (hi << 8) | lo
            return remaining
    except Exception as e:
        print(f"UPS read error: {e}")
        return None

def shutdown():
    print("Remaining runtime below threshold — initiating shutdown …")
    subprocess.run(["sudo", "shutdown", "-h", "now"])

def main():
    while True:
        remaining = get_remaining_minutes()
        if remaining is not None:
            print(f"[UPS HAT E] Remaining runtime: {remaining} minutes")
            if remaining < SHUTDOWN_LIMIT:
                shutdown()
                break
        else:
            print("Could not read remaining runtime from UPS — retrying")

        time.sleep(30)  # check every 30 seconds

if __name__ == "__main__":
    main()
sudo nano /etc/systemd/system/ups-monitor.service
[Unit]
Description=Waveshare UPS Runtime Monitor
After=multi-user.target
StartLimitIntervalSec=0

[Service]
Type=simple
ExecStart=/usr/local/bin/ups-monitor.py
Restart=always
RestartSec=5
User=root

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable ups-monitor.service
sudo systemctl start ups-monitor.service