| Its true that buildroot/yocto-based immutable images are a lot more resilient and prevent regular sd-card death, for most one-off uses you can get 90% of the way by simply using the "overlay file system" option in raspi-config already built-into the Raspberrypi OS. Essentially, you start with your Rpi OS, configure it the way you want it - install services etc, and once you are done, just do "sudo raspi-config", select "Performance Options" and under that enable "overlay file system" (also select "read-only /boot" when asked). Reboot when prompted to complete this setup. This will cause all changes to go to a temporary ramfs - and these changes will be lost on reboot. Most importantly, this means your SDcard won't be written to at all during normal operation. Do note that if you are using one of the older Rpis with 1GB RAM, you might face issues with RAM availability - depending on the amount of changes you make while the overlay is enabled. RPI4 variants with 4GB/8GB ram work really well, though. If you do need to make persistent changes, just repeat the process starting with "sudo raspi-config", disable the overlay and read-only /boot, reboot, make changes, then renable the overlay. Its is a good idea to do an apt update/upgrade every month of so after disabling overlay. Another thing you can do is to simply use USB sticks or USB drives as boot media (on RPI4). Those have much better lifetimes than sdcards, and are much faster as well. While this does not compare to the performance/speed/safety/etc of a fully custom buildroot/yocto image, its a good compromise considering its almost effortless. Shameless plug: I build such custom OS images for RPI and other SBCs for a living. |
I havent seen anyone using a rpi to usb boot other pi's via a usb hub, do you think thats possible? :-)