Alpine Linux 3.15 boot from USB

175 views
Skip to first unread message

lin...@gmail.com

unread,
Dec 21, 2021, 12:44:57 AM12/21/21
to ClusterHAT
Had ClusterHat[2.3] for couple of years. I used an old Pi 2b as controller. Got it outfitted with 2 pi zero w + 2 pi zero. Also added UPS[2x18650] and a 5" LCD. It's a nice tight package that I can move around without worrying about losing power. 

For software, I always wanted to get Alpine Linux running in diskless mode on pi zero. Finally got time to do it after losing my job due to layoff.

Code is on Github if anyone wants to try out. Happy to answer any questions.  

Build script was tested on both cbridge and cnat controller. However, in cbrige mode, public IP is missing after boot up. Need to run "udhcpc -i usb0" to obtain an IP. 

After some clean-up and playing with overlayfs to save space, final image only takes up little over 50MB total. Not too bad compare to 1.2GB per pi zero with the lite usbboot image.  

Now it's super easy for me to start from scratch on any pi zero by simply replacing the overlay file. All I need is to figure out a real world applications. Open to suggestions.


20211220_232020.jpg

michael...@netscape.net

unread,
Dec 21, 2021, 5:46:08 PM12/21/21
to ClusterHAT
Wow!  That looks nice and neat.   

My cluster looks like something out of Borg cube, has 10 nodes and an Eclectic mix of Linux distributions (Raspbian, Hypriot O/S and Armbian)
 

Dmitry E. Borisoglebsky

unread,
Dec 22, 2021, 11:14:58 PM12/22/21
to ClusterHAT
>   All I need is to figure out a real world applications. Open to suggestions

There are several properties to this system: (1) small size, (2) small energy costs, (3) multiple cores on multiple boards, (4) small computational powers. The size, energy, #core, #flops are absolute measures; 'small' is a relative measure (e.g. smaller than most of its alternatives). The applications can be clustered these characteristics; meaning, that a ClusterHat-based system:
* can be put on a small box of an unused space because of its small size;
* this box can serve regardless of energy bills because of its small power consumption;
* assuming you have monitoring and automation control, it is a partially stable server (stable because can automatically restart crashing apps, partially because of multiple single-point failures, e.g. single power source, single host-RPi, maybe single points of failures in the clusterhat itself. 
* the services benefit from and from parallel computing,

As you can see, these are used in non-functional definition of applications, yet these can stimulate idea generation and selection of the functional apps to address personal needs. In any case, if you would work systematically, you would have to measure your system according to a sub-set of these criteria, e.g. is hardware fitting for the app. If you do not have functional ideas, you can familiarise yourself with testing hardware computational limits, build a model to check if this hardware would be fitting for a hypothetical app, familiarise yourself with generic app orchestration (e.g. https://microk8s.io/ ). 

Thus my suggestion is: if you do not know the specific product, then go for the generic technology. It will make you a stronger engineer, and you'll have a better toolbox for functional work in the future, maybe in smart-home or industrial automation that require these non-functional requirements.


Kind regards,
Dmitry.

Andy Piper

unread,
Dec 23, 2021, 6:05:26 AM12/23/21
to clust...@googlegroups.com
I love posts like this, describing customisations!

Can you tell us more about the hardware? I assume that's a UPS add on mounted underneath the Pi, and the LCD below that? I'm trying to figure out how it all connects up!

--
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/eb0c0202-6b29-4cb6-9947-4bceca5dba30n%40googlegroups.com.


--
Andy Piper | Kingston upon Thames, London (UK)
about: https://about.me/andypiper  | twitter: @andypiper 

lin...@gmail.com

unread,
Dec 23, 2021, 2:05:44 PM12/23/21
to ClusterHAT
There are 4 layers not counting pi zeros, connected via standoff screws that came with the parts.
1) LCD: Bigtreetech pitft50.  This is connected to Pi 2B's DSI connector via a ribbon cable.
2) UPS: Geeekpi 18650 UPS with RTC, connected via POGO pin to underside of Pi 2B
3) Pi: Raspberry Pi 2B
4) ClusterHat.
5) Pi zeros: 2x pi zero w + 2x pi zero.  I soldered 90 degree angle female connectors on Pi zero to avoid short circuit, and it's easier to connect to breadboard using jumper wires. However, only really used to connect serial port between pi zeros for easier debugging when creating initramfs. 

The LCD can't be turnoff without shutting down Pi zero. One more hardware mod I haven't got around doing is connecting one of the pins that controls backlight brightness on LCD to any GPIO Pin on Pi. 

Reply all
Reply to author
Forward
0 new messages