Unfortunately PiBox and KubeSail ended operations in September 2025. I had not used my PiBox too much, just as a scratchpad for WordPress. I decided to reflash it with Raspbian. Below are the steps that I took to reuse my PiBox.
Oddly, the only post that I could find about it was at https://lemmy.world/post/38039322. I did go to the PiBox and KubeSail websites and they appear to be gone.
Flashing Raspbian
I’m using a Windows PC to flash the PiBox. I followed the directions at https://docs.kubesail.com/guides/pibox/rpiboot/. One thing that was not clear is that rpiboot.exe should be run before plugging the PiBox into the PC. It looked like there were errors but it still works. The errors are about optional files for configuring the connection, so they may be ignored. The connection is slow even with a high quality USB-C to USB-C cable.
- Remove the cover from the PiBox and move the internal switch from “normal” to “rpiboot”.
- Remove the carrier board from the backplane
- Run rpiboot.exe on the PC.
- Plug the PiBox into the PC using a USB-C Cable.
- Open Raspberry Pi Imager.
- Click Storage and make certain that the PiBox is showing as “RPi-MSD- 0001”.
- Click “Choose Device” and select “No filtering”.
- Click Operating System and select the 64-bit version you wish to install.
- Click the “Next” button to write the image to the PiBox.
- Once the image is written and verified, unplug the PiBox from the PC.
- Move the internal switch from “rpiboot” to “normal”.
- Reassemble the PiBox.
Updating Raspbian
If SSH is enabled and the Wi-Fi settings are configured or it is connected via ethernet , you may open an SSH session to run commands. If not, you may need to connect a monitor and keyboard to continue.
sudo apt update
sudo apt upgrade
Setup SSD Drives
I have two 1TB Samsung SSDs installed. I wanted to wipe them and remount them to the PiBox. Below are the steps that I followed.
/dev/sda
- Run the parted tool
sudo parted /dev/sda - Change the units used by parted
unit s - Delete the existing partitions
- Run the print command to list all the partitions.
print - Remove each partition (Repeat if more than one partition is present.)
rm 1
- Run the print command to list all the partitions.
- Create a single partition for the whole drive
mkpart primary ext4 0% 100% - Exit parted
quit - Format the partition
sudo mkfs.ext4 -L data1 /dev/sda1 - Create a mounts point for the drive (The rancher mount point is only so it will display on the LCD display.)
sudo mkdir -p /var/lib/rancher
/dev/sdb
- Run the parted tool
sudo parted /dev/sdb - Change the units used by parted
unit s - Delete the existing partitions
- Run the print command to list all the partitions.
print - Remove each partition (Repeat if more than one partition is present.)
rm 1
- Run the print command to list all the partitions.
- Create a single partition for the whole drive
mkpart primary ext4 0% 100% - Exit parted
quit - Format the partition
sudo mkfs.ext4 -L data2 /dev/sdb1 - Create a mount point for the drive
sudo mkdir -p /mnt/data2
Update fstab
- Open text editor to edit fstab
sudo nano /etc/fstab - Add the following lines
/dev/sda1 /var/lib/rancher ext4 defaults,nofail,noatime,discard,errors=remount-ro 0 0
/dev/sdb1 /mnt/data2 ext4 defaults,nofail,noatime,discard,errors=remount-ro 0 0
Enabling PWM Fan Support
- Clone the PiBox OS Scripts
git clone https://github.com/kubesail/pibox-os.git - Change to the Fan folder
cd pibox-os/pwm-fan - Uncompress the Fan scripts
tar zxvf bcm2835-1.68.tar.gz - Change to the Fan scripts folder
cd bcm2835-1.68 - Run the make command
./configure && make && sudo make install - Go to the parent folder
cd .. - Make and run the installation
make && sudo make install - The fan should run quieter now.
Optimize system for EMMC
- Store system logs in memory, instead of writing to disk, and lower log verbosity
sudo sed -i "s/#Storage.*/Storage=volatile/" /etc/systemd/journald.confsudo sed -i 's/.MaxLevelStore.*/MaxLevelStore=info/' /etc/systemd/journald.confsudo sed -i 's/.MaxLevelSyslog.*/MaxLevelSyslog=info/' /etc/systemd/journald.conf
sudo systemctl restart systemd-journald.service - Disable swapfile
sudo swapoff -asudo dphys-swapfile swapoff - Mount /var/tmp as tmpfs filesystems to extend EMMC lifetime
echo "tmpfs /var/tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=0755,size=1M 0 0" | sudo tee -a /etc/fstab
Enabling the 1.3” LCD display
- Return to the home directory
cd ~ - Install additional drivers for Raspbian / Pibox-OS
sudo apt-get install raspberrypi-kernel-headerspushd pibox-os/st7789_modulemakesudo mv fb_st7789v.ko /lib/modules/"$(uname -r)"/kernel/drivers/staging/fbtft/fb_st7789v.kopopdsudo dtc --warning no-unit_address_vs_reg -I dts -O dtb -o /boot/overlays/drm-minipitft13.dtbo pibox-os/overlays/minipitft13-overlay.dts - Update config.txt
cat <> /boot/firmware/config.txt
dtoverlay=spi0-1cs
# dtoverlay=dwc2,dr_mode=host
hdmi_force_hotplug=1
dtoverlay=drm-minipitft13,rotate=0,fps=60
EOF - Download pibox-framebuffer binary
curl -s https://raw.githubusercontent.com/kubesail/pibox-os/main/update-framebuffer.sh | sudo bash
Optional if you want the ability to control the top RGB LED
- Install the RPi.GPIO library.
sudo apt install python3-RPi.GPIO - Open Nano to create a script file.
nano blinkLED.py
import RPi.GPIO as GPIO
import time
# Red 17
# Green 27
# Blue 23
leds = [17, 27, 23]
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
for led in leds:
GPIO.setup(led, GPIO.OUT)
for led in leds:
for i in range(3):
GPIO.output(led, GPIO.HIGH)
time.sleep(0.5)
GPIO.output(led, GPIO.LOW)
time.sleep(0.5)
# Commented next line so the LED stays off.
# Added GPIO.setwarnings(False) at the start of the script
# to hide warnings that the channel is in use on future runs.
# GPIO.cleanup()
- Run the script and observe the top LED on the front of the PiBox.
python ./blinkLED.py
