Build Pi Zero image manually

112 views
Skip to first unread message

Ernie Prevost

unread,
Apr 2, 2021, 5:59:54 AM4/2/21
to ClusterHAT

Hi All,

 I recently bought ClusterHAT v2.5 installed the CBRIDGE image on the controller and the Lite Buster image on a couple Pi Zero’s and it all works fine.

 I would like use the physical hardware to be convenient (tidy) way of connecting 4 Pi Zero’s to my home network as 4 independent devices.

 So I would like to build from scratch a full Raspberry Pi OS image for the Pi Zero and connect them to the ClusterHAT and be allocated an IP address from my home router DHCP table.

 Could anyone guide my to what is required to configure a new Raspberry Pi OS image to work with the Cluster Controller Pi.

 Thanks

 Ernie

 

Tim Wood

unread,
Apr 2, 2021, 8:43:11 AM4/2/21
to clust...@googlegroups.com
Hi Ernie,

If you're using CBRIDGE image, then you can configure each Pi Zero with separate IP addresses already, something like this in /etc/dhcpcd.conf for each one:

interface usb0
static ip_address=192.168.0.4/24
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 1.0.0.1

I was able to use a p5 image, and plug it into the Controller Pi via USB cable, and it still worked in gadget mode (not physically connected to the HAT): https://clusterctrl.com/setup-software

So. not sure what building an OS image from scratch would help you do, that you can't do already.

Tim

--
You received this message because you are subscribed to the Google Groups "ClusterHAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clusterhat+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/clusterhat/23e10cac-aeeb-448f-ab29-47594d64b023n%40googlegroups.com.

Ernie Prevost

unread,
Apr 2, 2021, 10:29:08 AM4/2/21
to ClusterHAT

Hi Tim,

                Thanks for your quick response.

                I am sure you are right in that I should just use the images Chris that has provided.

                As much as anything I was trying to understand the boot sequence process on the zero’s that setup the bridge and obtains an IP address from the DHCP server.

                I have tried your suggestion and edited the dhcpcd.conf file setting up a static address on the usb0 interface without success. I don’t see an ethpiX interface being created on the controller side. I am not sure what bit of the configuration on the zero I am missing.

                Thanks again.

 

Ernie

Tim Wood

unread,
Apr 3, 2021, 3:22:10 AM4/3/21
to clust...@googlegroups.com
Hi Ernie,

Heads up that because of gadget mode, all eth* interfaces are disabled - you can see that in the dhcpcd.conf file of any of the clusterctrl images, including CBRIDGE, look for "denyinterfaces".

If you're not getting connectivity between CBRIDGE and the Pi Zeros on a vanilla install, I'd be surprised. Check that you've not also installed anything that would impact port 22 (ie. something like OpenMediaVault).

Tim

Ernie Prevost

unread,
Apr 3, 2021, 7:07:42 AM4/3/21
to ClusterHAT

Hi Tim,

 Thanks again for your help and comments.

I have no problem if I use the standard controller image and Pi zero images it works fine. I am probably making it more complicated than it needs to be.

 Out of interest when I ssh from the controller to a pi zero I get the following warning message

                    -bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

 Have you seen this message?

 Thanks Ernie

Ciprian Manea

unread,
Apr 3, 2021, 11:03:06 AM4/3/21
to clust...@googlegroups.com
@Ernie try this fix

sudo raspi-config nonint do_change_locale en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LANGUAGE=en_US.UTF-8

Ernie Prevost

unread,
Apr 3, 2021, 11:24:03 AM4/3/21
to ClusterHAT

Hi Cipria / Tim,

 I was just about to put up a new post.

 I think I found the problem about the warning message. It was not a problem with the Pi Zero side but the controller side. For some reason the controller was set with a locale of ‘en_US.UTF-8’ so I assume when connecting to the Zero from the controller with ssh the warning was to do with a mismatch. I changed the locale on the controller and the message has gone.

 Thanks both for taking an interest in my problem.

 Ernie

Reply all
Reply to author
Forward
0 new messages