YESSS.
Thank you! This is exactly what I need. I have a bunch of random boards I am always mucking around with.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
For Example
We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.
Useful Lists
YESSS.
Thank you! This is exactly what I need. I have a bunch of random boards I am always mucking around with.
For your case, you might want to switch to overlay rootfs and mount /boot as read-only, your sd card won't get changed at all.
Please elaborate how to overlay rootfs.
Configure your raspberry pi os properly, then use raspi-config to switch to overlay root filesystem. You can switch back (using raspi-config) if you want to make changes to your os.
See https://learn.adafruit.com/read-only-raspberry-pi/overview
Nice
This is a great idea. Regarding not ending up in an unusable state if your internet connection goes down, you could consider running the flashing steps in a background subshell with nohup or similar. Or double-fork the shell.
Great!
It would even be easier to get the DISK_ID
directly in the script, at its beginning (but after the check about being root):
DISK_ID=$(sfdisk --disk-id /dev/mmcblk0)