3 ms·
From https://cattlepi.com/flow/ https://cattlepi.com/flow/ > because of how the root filesystem is built, any changes made to the filesystem will reside in the
by ivan_ah 8y ago
From https://cattlepi.com/flow/ https://cattlepi.com/flow/
> because of how the root filesystem is built, any changes made to the filesystem will reside in the upper layer of the union [fs] and will be lost on reboot. This is good, because it means that all the state you have on the device is expendable, and you can likely rebuild it after a reboot. If you rely on the state of the device, you will have to figure out a state to persist it outside of cattlepi.
This seems like a showstopper for me because I want to run a webapp with user registration, logs, etc. I'd certainly want to keep these things around after next reboot.
Can the user-writes be persisted on the device? Maybe on another partition?
- mirceal 8y agothank you for the feedback. there are a few things to consider here: the first one is that the main failure scenario for something like a pi running for a long time (that I've seen) is the SD card failing (long time here means months to years depending of your usage pattern); the second thing is that I made this choice for the first iteration - there isn't any technical reason why you wouldn't be able to have a 2nd partition that you mount RW. to achieve this you could hack it directly into a image you would build or you can leverage the bootcode and/or usercode hooks in the config. (see https://github.com/cattlepi/cattlepi/blob/a5ad6b57dc2831381980a910204f0c75335cea07/builder/resources/usr/share/initramfs-tools/scripts/cattlepi-base/helpers#L128 https://github.com/cattlepi/cattlepi/blob/a5ad6b57dc28313819... and https://github.com/cattlepi/cattlepi/blob/35eccb61029f46076cd5cdca0466bdc5af9c49d8/builder/resources/bin/bootstrap.sh#L26 https://github.com/cattlepi/cattlepi/blob/35eccb61029f46076c...) Ping me directly or comment on this thread if you want to give this a shot and you have trouble getting it to work.