New [test] image - usbboot/rpiboot (booting Pi Zeros without SD cards)

411 views
Skip to first unread message

Chris Burton

unread,
Aug 3, 2017, 7:38:35 AM8/3/17
to ClusterHAT
Hi,
 I've released a TEST image which supports booting the Pi Zeros with usbboot/rpiboot (sends the kernel, /boot files, initramdisk, etc.), then mounts the root filesystem over an internal (Controller/Pi Zeros) network and obtains an external address (as normal with Cluster HAT images) over the Controllers Ethernet interface eth0.

I've had over 2000 successful boots using the image but please remember it's a test image so I expect some things won't work properly or require more effort than they should - but please do let me know here on the forum of success/issues/questions/suggestions.


And repeating an important part of the guide above - SSH is ENABLED by default on the Controller/Pi Zeros, the "pi" users password is set to "clusterhat" (without quotes).

Chris.

Chris Burton

unread,
Aug 7, 2017, 7:33:49 AM8/7/17
to ClusterHAT
Hi,
 I've uploaded a video showing how easy it is to use this image with the Cluster HAT + Pi Zero [W] (without SD cards) booting over USB :).


Once they've booted up it works in the same way as the standard images, gets IPs over the local network on the Controller, power on/off, reboot or shutdown, etc. all work as you'd expect but just remember the filesystem is coming from the Controller Pi so use a fast >=16GB SD card and understand disk access may be a little slower with 5 Pi running off the same SD card.

As also shown in the video accessing the Pi Zero filesystems (in /var/lib/clusterhat/nfs/p1 to p4) from the Controller is really easy so you can copy or alter scripts, files, configs etc. with ease especially if the files are owned by the Pi user otherwise you'd need to use "sudo" as normal.

Chris.

Chris Burton

unread,
Aug 8, 2017, 10:22:39 AM8/8/17
to ClusterHAT
I've updated the test image as somehow I didn't use the latest version of rpiboot so it gets stuck after booting the first Pi Zero (basically it stays in the loop waiting to send files even after the USB device no longer exists).

If you've already downloaded it then run the following to update the code. 

sudo sh -c "cd /var/lib/clusterhat/usbboot/;git pull;make"

Thanks to t3chguy on IRC for helping to figure this out.


Chris.

melanrz1

unread,
Aug 11, 2017, 1:36:13 PM8/11/17
to ClusterHAT
Thank you Chris

melanrz1

unread,
Aug 11, 2017, 1:44:20 PM8/11/17
to ClusterHAT
zip with image have crc error,can you test it??


Il giorno martedì 8 agosto 2017 16:22:39 UTC+2, Chris Burton ha scritto:

Chris Burton

unread,
Aug 11, 2017, 3:36:59 PM8/11/17
to ClusterHAT
Hi,


On Friday, 11 August 2017 18:44:20 UTC+1, melanrz1 wrote:
zip with image have crc error,can you test it??

The file ClusterHAT-2017-07-05-lite-2-usbboot.zip on the website had been truncated, I've uploaded it again.

The file should be 1.5GB (1594377193 bytes) when you download it and the zip file should have an md5sum of d4db04414eefcf0938c60158240e298e / sha1sum 53ae27705e577e8e9fdd1ccd57c2ea7dccfc846d

Chris.

melanrz1

unread,
Aug 11, 2017, 4:57:18 PM8/11/17
to ClusterHAT
now is ok,tahanks

melanrz1

unread,
Aug 11, 2017, 5:20:43 PM8/11/17
to ClusterHAT
user pi pass raspberry not match

melanrz1

unread,
Aug 11, 2017, 5:21:33 PM8/11/17
to ClusterHAT
i get it,is ok

David Glaude

unread,
Aug 11, 2017, 5:27:39 PM8/11/17
to Chris Burton, ClusterHAT
Hi,

I had partial success last week with previous image.
Pi1 and Pi4 booted OK the first time. Pi2 and Pi3 never showed up.
Even if not fully working, it is really impressive to see.

At second attempt, only Pi1 (or 4) showed up, or nothing.
I tried turning them on one by one, and all simultaneously.
I used the screen command to try to see what was going on.

I was a bit unsure how it was supposed to work.
I tried to shuffle the PiZero, tried with W and non W version (by the way, is it suppose to work with Pi 1.2?).
I did not knew if it was a connection issue, a problem with my Pi.

I gave up, with not enough information to troubleshoot anything over here.
I will try again with the new image.

Regards

David Glaude

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/clusterhat/4de9d880-9e2a-404e-8765-00023dcc4a84%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Chris Burton

unread,
Aug 12, 2017, 2:44:48 PM8/12/17
to ClusterHAT, bur...@gmail.com
Hi, 
I had partial success last week with previous image.
Pi1 and Pi4 booted OK the first time. Pi2 and Pi3 never showed up.
Even if not fully working, it is really impressive to see.

At second attempt, only Pi1 (or 4) showed up, or nothing.
I tried turning them on one by one, and all simultaneously.
I used the screen command to try to see what was going on.

This sounds exactly what the update/new image should fix.
 
I was a bit unsure how it was supposed to work.

It should "just work" - plug Pi Zeros into Cluster HAT without SD cards, boot controller with the new image, login and run "clusterhat on" and after a few minutes they should boot up and accessible over the eth0 connected network as normal with "p1.local" etc.
 
I tried to shuffle the PiZero, tried with W and non W version (by the way, is it suppose to work with Pi 1.2?).
I did not knew if it was a connection issue, a problem with my Pi.

I've been using it with a mix of Pi Zero 1.2/1.3 and Pi Zero W 1.1.

Chris. 

David Glaude

unread,
Aug 12, 2017, 6:45:22 PM8/12/17
to Chris Burton, ClusterHAT

Thank you Chris,


Now it is working fine for me.


I take the liberty to share the transcribe of your command in the YouTube video:

ssh-keygen -t rsa -N '' -f /home/pi/.ssh/id_rsa

mkdir -p /var/lib/clusterhat/nfs/p{1,2,3,4}/home/pi/.ssh/

cat /home/pi/.ssh/id_rsa.pub >> /var/lib/clusterhat/nfs/p1/home/pi/.ssh/authorized_keys

cat /home/pi/.ssh/id_rsa.pub >> /var/lib/clusterhat/nfs/p2/home/pi/.ssh/authorized_keys

cat /home/pi/.ssh/id_rsa.pub >> /var/lib/clusterhat/nfs/p3/home/pi/.ssh/authorized_keys

cat /home/pi/.ssh/id_rsa.pub >> /var/lib/clusterhat/nfs/p4/home/pi/.ssh/authorized_keys

Once that is done, you want to manually ssh to be able to accept the ECDSA key in the list of known hosts:

ssh p...@p1.local

ssh p...@p2.local

ssh p...@p3.local

ssh p...@p4.local

(That is not visible on the video, as it must have been done before)

To shutdown all the Zero, I used this (modified from your command to launch the Blinkt! example):

for I in 1 2 3 4 ; do echo $I;(ssh pi@p$I.local "sudo shutdown now -h &"&) ;done


Also because I killed the rpiboot by mistake (here is the line used in /etc/rc.local that start the screen):

/usr/bin/screen -S rpiboot -d -m /var/lib/clusterhat/usbboot/rpiboot -d /var/lib/clusterhat/boot/ -o -l -v


Now the ClusterHat take all it's value, without having to dedicate one microSD per PiZero.


David Glaude


--
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+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages