IT, Digital & Culture
A wordy one this time. I bought a handful of the NanoKVM lites (and a couple with screens) late last year. They are pretty good for what they cost! I run a couple of them in remote locations, the only supported way to update the firmware (not the application confusingly) is to rewrite the sd card.
This is somewhat less than ideal!
I have had a couple of cracks at doing it remotely, the first was quite complex and wiped out all customisations, not great if you were connected via tailscale!
This process is a lot slicker, but proceed at your own risk!
Backup /boot/eth.nodhcp # This is your network config if you use a static IP
Backup /etc/kvm/server.yaml # This is a config file for if you have SSL certs, etc
Copy img file to /data/ # Copying the new firmware to the device
losetup -f -P /<imagename> # Mount the image
losetup -a # To check mount point
mkdir -p /tmp/boot && mkdir -p /tmp/root # Make the mount points for the new firmware
mount /dev/loop0p1 /tmp/boot && mount /dev/loop0p2 /tmp/root # Mount the new firmware
cd /tmp/boot && cp -av * /boot/ # Copy the boot firmware
cd /tmp/root && cp -av * / # Copy the new root firmeware
cd / && umount /tmp/boot && umount /tmp/root # Unmount the new image partitions
losetup -d /dev/loop0 # Unmount the image
rm /data/ # Remove the copied firmware
copy /boot/eth.nodhcp # Copy the network config back
rm /etc/kvm/ssh_stop # Enable SSH
Reboot # Do the needful
Update web application # Make sure the latest application is installed (this will have been overwritten with the new image)
root passwd # Reset the root password to one you like
Setup Tailscale
SSH into NanoKVM.
Execute tailscale version to check if Tailscale is already installed. If not, manually install it:
Download Tailscale and extract it;
Move the tailscale file to the /usr/bin/ directory;
Move the tailscaled file to the /usr/sbin/ directory.
Execute /etc/init.d/S98tailscaled restart to start the Tailscale service.
Execute tailscale login and wait for the login link to be generated, then visit the generated link in your browser.
Click Connect in the browser to add NanoKVM to your Tailscale account.