How do I USBBOOT Pi Zeros without SD cards (Cluster HAT/Cluster CTRL)?

Chris Burton
2019-08-26 15:01

With the Cluster CTRL images (linked from the ClusterHAT website) it's now possible to mix/match booting nodes (Pi Zeros/Compute Modules/A+) with or without SD cards.

Preparation

This guide assumes you're running a Raspberry Pi with our modified Raspbian Buster or Stretch ClusterCTRL images (see the Cluster HAT site for details).

For the ClusterHAT v1.x edit /etc/default/clusterctrl on the controller and uncomment the appropriate CLUSTERHATV1 line based on the USB port you have the Cluster HAT plugged into, then run "sudo clusterctrl init". 

The Cluster HAT v2.x/ClusterCTRL devices don't need this step as the USB port is detected as the controller boots.

If the port is changed after boot (for v1.x you'll need to set the correct port again first) run "sudo clusterctrl init" to setup the boot directory links in /var/lib/clusterctrl/boot/ .

Setup Pi Zero file systems

Differing from the old test images the filesystems for the Pi Zeros are no longer pre-installed. This allows you to mix/match different versions and releases (Buster/Stretch) on the same controller.

Official usbboot archives can be found at https://dist.8086.net/clusterctrl/usbboot/

I would advise using the latest dated Buster release and then choose if you want Lite, Full or Standard image. There are also Stretch usbboot root filesystems available if you need to use an older release.

Once you've selected the image(s) you want to use copy the URL and download them to the controller using wget.

wget -P ~pi/ URL_OF_USBBOOT_ARCHIVE

For example to download the 2019-07-10 Lite Buster image you would run

wget -P ~pi/ https://dist.8086.net/clusterctrl/usbboot/buster/2019-07-10/ClusterCTRL-2019-07-10-lite-4-usbboot.tar.xz

For each Pi Zero (in position pX) extract the filesystem (you can mix/match different versions) and then configure it.

If you have files in the nodes root filesystem these must be removed first (replacing X with the pX number). Ensure you have a backup of any required files first!

sudo rm -rf /var/lib/clusterctrl/nfs/pX/{*,.*}

The error "unable to remove  directories . and .." error is expected and can be ignored.

For example for P1 you would extract and configure it using.

sudo tar -axf ~pi/ClusterCTRL-2019-07-10-lite-4-usbboot.tar.xz -C /var/lib/clusterctrl/nfs/p1/
sudo usbboot-init 1

Repeat the above steps for all Pi Zeros 2/3/4/etc. you want to use with USBBOOT (you can mix booting with SD and using USBBOOT).

Before powering on the Pi Zero you can enable SSH by creating the "ssh" file in the "/boot" directory.

sudo touch /var/lib/clusterctrl/nfs/p1/boot/ssh

Power the Pi Zero on as normal.

clusterctrl on p1

You can watch the boot process by tailing /var/log/daemon.log (shows rpiboot process) /var/log/kern.log (shows USB devices etc)

tail -f /var/log/daemon.log /var/log/kern.log

 

Tags: cluster ctrl, cluster hat, clusterctrl, clusterhat, raspberry pi, rpiboot, usbboot
Average rating: 3.75 (4 Votes)

You cannot comment on this entry