Re: PKGBase and Embedded Systems

From: Karl Denninger <karl_at_denninger.net>
Date: Tue, 12 Aug 2025 13:55:16 UTC
On 8/12/2025 08:51, Bob Bishop wrote:
> Hi,
>
>> On 12 Aug 2025, at 12:40, Karl Denninger<karl@denninger.net> wrote:
>>
>> Well, ok, "sort-of" embedded systems.  Think firewalls.
>> Right now I build a USB stick-based setup for these on NanoBSD and, for some other hardware in somewhat-similar applications (e.g. home control, etc.) for the PI series using Crochet.
>> /var is volatile on both where /usr/local/etc has a "save" mechanism (along with /etc) in both environments; that is, its volatile while running, but can be instructed to sync with the saved copy thus on a reboot/reset/powerloss the last-saved is retained.
>> A couple of times I've concluded the "best" way to deal with things that dump state they'd like to keep in /var somewhere (usually in /var/db), where the "thing" doesn't have a command-line switch to change that, is to move that directory to /usr/local/etc/db and then symlink it during the setup, thus it becomes "volatile but subject to save" as with anything else in /usr/local/etc.
> We used to do that kind of thing. Now that storage, RAM and 64bit boxes are cheap we just use a full install on ZFS and make everything except the volatile bits read-only…

Its not so much a "how cheap is the resource" problem (yes, that's 
gotten a lot cheaper over time) its a "the box MUST come back online 
after an unsolicited power event."

That in turn means the physical volume cannot be open for write, 
particularly in the instance of a volume that co-mingles various 
metadata that is internal to the device itself (e.g. an SSD which does 
its own internal wear leveling and such.)  95% of the time IMHO isn't 
good enough.

-- 
Karl Denninger
karl@denninger.net
/The Market Ticker/
/[S/MIME encrypted email preferred]/