VOISS - Booting
Written by Rich Morin.
Precis: thoughts on the booting of VOISS systems
Note: As of early 2020, the VOISS project and F123Light were discontinued. For details, see VOISS - Status.
The Raspberry Pi 3 Model B+ (aka 3B+) can boot from either the microSD card or a USB-based storage device (e.g., flash drive, solid state disk). The VOISS - Storage page speculates about ways that this capability could be used in a VOISS system. However, it might be possible to go quite a bit further in this direction.
Note: Everything on this page is highly speculative (i.e., Science Fiction), based on my light reading of a number of web pages. It is also extremely specific to the 3B+, which has a particular set of hardware and firmware. Trying to extrapolate from anything said here to any other model is risky business, at best.
Raspberry Pi 3 Model B+
The product page for the 3B+ indicates that it is planned as a long-lived product, with a stable design:
- The final revision of our third-generation single-board computer
- Raspberry Pi 3 Model B+ will remain in production until at least January 2026
This seems like a firm foundation for a system such as the VOISS. More to the point, if we want to take advantage take advantage of details in the RasPi’s approach to booting, we definitely need some stability!
According to the documentation I’ve read, nothing special needs to be done to the hardware in order to boot the 3B+ from a USB-based storage device. (Although some earlier models do not support this feature by default, the 3B+ does.) However, it appears that the operating system image also has a role to play:
Starting with the 2017-04-10 release of Raspbian you can install a working Raspbian system to a USB mass storage device by copying the operating system image directly onto your USB device, in the same way that you would for an SD card. …
Boot your Raspberry Pi from the USB mass storage device
Attach the USB mass storage device to your Raspberry Pi and power the Pi up. After five to ten seconds, the Raspberry Pi should begin booting and show the rainbow splash screen on an attached display.
— USB mass storage device boot
According to a posting in the Raspberry Pi forums:
All 4 USB ports are connected to a single port on the SoC (through a hub chip), so there is no boot priority. It’s more device dependent. Whichever one gets ready first will be seen first.
So, if multiple, bootable flash drives are available via USB, it’s pretty much a crap shoot which one will be booted. My take-away from this is “don’t try to boot the 3B+ with more than one bootable USB device plugged in”. That said, there should be no problem booting up on on device and then plugging in another.
I don’t know exactly what the operating system needs to do in order to take advantage of this feature. However I do know that, while the current version of Raspbian boots from a USB flash drive, the current version of F123Light does not.
Here is the procedure I followed (successfully), in getting a 3B+ to boot Raspbian from a USB flash drive:
- Downloaded Raspian Buster (full) - July 2019
- Used balenaEtcher to write a 32 GB flash drive.
- Moved the flash drive to the RPi and powered up.
- After a few seconds, Raspbian booted and ran.
When I tried the same approach with F123Light, the system never booted. I’m hopeful that Arch Linux ARM, upon which F123Light is based, has implemented whatever support is needed. If so, this may be basically an F123Light build issue.
So, I’m currently trying to replicate the problem
using the current Arch Linux release.
Unfortunately, balenaEtcher says that my downloaded file
of the current release is an “Invalid Image”:
.../ArchLinuxARM-rpi-3-latest.tar.gz is not a supported image type.
I found a recent article on how to do this manually: How to Install Arch Linux on Raspberry Pi. However, the article contains about a dozen commands have to be run as root. I find this to be rather daunting, so I’m hoping to find a safer and easier approach.
Arch Linux ARM (project web site)
ArchLinux Install Guide (from eLinux)
ARMv8 Raspberry Pi 3 (root filesystem archive file)
Downloads (root filesystem archive files)
How do you make a bootable SD card? (forum thread)
https://public.f123.org (downloads directory)
https://public.f123.org/F123Light-19.09.12.img.xz (sample image archive file)
https://public.f123.org/F123Light-19.09.12.img.xz.sha1sum (sample image archive checksum)
BCM2837B0 (processor used by 3B+)
Pi4 Bootflow (WIP)
Raspbian (downloads directory)
To be continued …