Setting up the software

We now have 3 different methods to setup the Cluster HAT software - you only need to follow ONE of these guides below (Simple/Intermediate/Manual).

The pre-created images (Simple/Intermediate) for each Raspberry Pi Zero and the Controller below are currently based on Raspbian Stretch with PIXEL/Lite (2017-09-07).

NEW We also have a TEST usbboot/rpiboot image available which allows booting the Pi Zeros without SD cards using rpiboot and a nfsroot filesystem stored on the Controller Pi. Once booted the Pi Zeros function in the same way as using our normal Cluster HAT images.

Download an image for each Pi (Controller/P1/P2/P3/P4) and write to the SD cards. We have Controller versions available as Stretch with PIXEL Graphical interface and Stretch Lite (you only need one).

  • PIXEL Controller - Stretch with PIXEL image for the controller.
  • Lite Controller - Stretch Lite image for the controller.
  • P1 - Stretch Lite image for Zero P1.
  • P2 - Stretch Lite image for Zero P2.
  • P3 - Stretch Lite image for Zero P3.
  • P4 - Stretch Lite image for Zero P4.

OR you can download all of the images in a single .zip file.

  • PIXEL Combined Stretch with PIXEL Controller and Lite P1/2/3/4 images.
  • Lite Combined Stretch Lite Controller and Lite P1/2/3/4 images.

Follow the standard instructions to unzip and write each of the above images to the corresponding SD Card.

Username: pi
Password: raspberry

We strongly advise changing the pi users password and resizing the filesystem using the raspi-config tool on your first login.

SSH

SSH is no longer enabled by default on any of the images, to enable SSH you will need to create a file named "ssh" in the boot partition - see the Raspberry Pi blog entry for more details, this needs to be done on both Controller and Pi Zero images (from the Controller Pi the Pi Zeros can be accessed via the serial console when SSH is disabled).

The images above are configured to obtain an IP address automatically using DHCP (Pi Zero network is bridged to eth0 on the Controller Pi).

Download the image for the controller and write to each SD card, then modify the cmdline.txt file on the boot partition for P1/P2/P3/P4.

Follow the standard instructions to unzip and write the above images to your SD Cards for Controller/P1/P2/P3/P4.

To convert the controller image into an image for P1 Zero append " quiet init=/sbin/reconfig-clusterhat p1" to the cmdline.txt file in the boot (first) partition using either a Windows, Mac or Linux machine. To customise the other images replace p1 above with p2/p3/p4 (cmdline.txt must be a single line and there must be a space after the existing string and the text above).

Username: pi
Password: raspberry

We strongly advise changing the pi users password and resizing the filesystem using the raspi-config tool on your first login.

SSH

SSH is no longer enabled by default on any of the images, to enable SSH you will need to create a file named "ssh" in the boot partition - see the Raspberry Pi blog entry for more details, this needs to be done on both Controller and Pi Zero images (from the Controller Pi the Pi Zeros can be accessed via the serial console when SSH is disabled).

The images above are configured to obtain an IP address automatically using DHCP (Pi Zero network is bridged to eth0 on the Controller Pi).

Manually configure the software for Controller/P1/P2/P3/P4, this can be used to customise your own images or to "port" to different distributions.

Below are a list of steps we take when creating a new image. You should be able to follow these as a base to create/modify your own custom images.

  • Copy base Raspbian image file and rename for the controller.
  • Setup variables for the build.
  • Use losetup to create a loop device for the new file.
  • Enable access to the partitions on the loop device using kpartx
  • mount both root and boot filesystems
  • Install any updates, remove dhcpcd5 and install required tools
  • Force boot to be text mode
  • Setup getty on ttyGS0 (The USB gadget device)
  • Setup the hostname and /etc/hosts file
  • Download/Extract ClusterHAT software/config files
  • Copy controller config file into place
  • Disable auto filesystem resize
  • Setup /boot/config.txt file
  • Cleanup
  • Unmount, cleanup partitions and loop devices
  • Copy the controller image for p1/p2/p3/p4
  • Use losetup to create a loop device for the new file.
  • Enable access to the partitions on the loop device using kpartx
  • mount both root and boot filesystems
  • Setup the cmdline.txt for P1 or P2/P3/P4.
  • Unmount, cleanup partitions and loop devices

The build script can be downloaded/viewed here.

Once the controller image has been created this can be modified to change into images for p1/p2/p3/p4 by editing the cmdline.txt file.

The scripts above should not be ran before reviewing the code and understanding exactly what they're going to do on your system. AKA don't blame me if they cause data loss/etc.


Use of our images is optional if you prefer to setup the OS/network to your requirements. A copy of our controller script is available to download

We have a TEST Jessie image available which boots the Pi Zeros (without SD cards) over USB.

See our usbboot/rpiboot guide for details and the download URL.