I have a couple of Raspberry Pis (3B and 3B+) running volumio in the house and wanted to migrate them from booting off of the microSD slot to USB or network boot. I have a “server” RaspberryPi 4 I could use to serve up an NFS partition for them if I went that route.
I’d love to be able to do this with a basic OS image burned to microSD to make the configuration change. Neither Pi has a display connected and one of them is hardwired to the speaker cables making it difficult to pull out if needed. If there’s a configurable OS image that can do this switch without needing a network connection that would be even better.
Just wondering if anyone has any hot tips on doing this without booting them into RaspberryPiOS to make the switch? My ideal scenario would be to image the microSD cards that are installed currently and use those as the basis for the USB or NFS drive I’d be booting from for each device.
Thanks for any advice. I’ll continue researching and post back if I come up with anything useful.
Volumio doesn’t use the upstream Raspbian initramfs, so it isn’t going to be as simple as flashing Volumio to a USB drive and it Just Works™. Since it uses a Readonly squashfs + a overlayfs, things are a bit more… involved when it comes to the intiramfs. There are some discussions over on Volumio/Build about how to support USB boot – do check them out
@ashthespy so after reading through the issue and PR it sounds to me like it’s a matter of hardcoded references to the sd card device.
Having a first class build target of a USB drive on /dev/sda feels like a relatively “easy” fix without knowing the details of Volumio’s build system, existing number of targets, and CI/CD pipeline. This would of course mean that some other configurations might not work as expected, if another mass storage device is occupying that slot or … any number of other variables.
Netboot images could be another option though would require a user to configure their nfs partitions prior to boot somehow. Maybe what we need is an external configuration tool that can write to /boot, wherever it might live.
It is admittedly a funny problem, though later versions of RaspiOS and Ubuntu seem to get it right.
@robcee Indeed - the Volumio init scripts could use some love. @gkkpch has been working on a much more modular system for the init scripts, which could be extended for the Raspberry, and should make supporting USB boot simpler. But ofcourse we need to take into account a lot of non-standard use cases such as firmware updates via USB and other such things. So can’t give you an ETA on when that lands
But please feel free to explore the installer part here
Some devices like the Khadas VIM boards vim1, vim2, vim3, vim3l can boot volumio images from usb devices without any issues.
Once we have the main lot of board build scripts moved to buster I intend to tackle the init redesign.
Though it will help for PI’s to boot from devices other than mmcblk0, the real problem starts before the kernel gets loaded, I do not know (yet) how that part works with PI.
It does not use u-boot like other arm devices we know, this part will be crucial.
yes, afaik, it’s a UEFI bootloader, probably stored in firmware. I don’t have a strong grasp of the Pi’s bootsequence yet, but presumably it knows to look for boot partitions on the microSD (mmcblk0) and on later hardware, /dev/sd*.
afaik there are 2 things to be considered.
First the PI4 has to be able to boot from usb. There appear to be instructions on the raspberry knowledge sites on how to check the capability and enable it, just google.
Secondly we need to adapt the volumio boot configuration as currently Volumio assumes the boot device is always mmcblk0.
We have already prepared ways to find the Volumio device and partitions. Most of the community portings already use that when the board also offers emmc. This is not a big thing, but takes a little time and needs to be tested thoroughly, incl. OTA updating