sysconfig/backup is intended for X for the most part, but also is set to zero in the event the boot code
norestore exists if I'm speculating correctly. (Why make a backup if you're not going to restore it?)
Your argument as to using sysconfig/backup as the determining factor, though, has benefits and drawbacks. backup=1 is set in the event boot codes don't say otherwise. When doing an install, this will always be "1" unless you specify norestore regardless of there being X or not. Now, remote administration (ssh, for example) it's been customary here NEVER to update boot codes remotely unless direly necessary (as you can't SEE the results from the user's machine) so boot/loader is off limits for the most part. Having items in the file system tends to be safer and also makes admin as well as user modifications simpler as well.
Our "general" TC boot codes are:
quiet syslog norestore nodhcp tce=something opt=something...and if ~/ is needed, home=something is added as well.
This allows me to boot TC and implement the "merge" in /opt/.root making all machines virtually identical, we then check in with a server for updates (kernel, init image, /opt/.root updates, etc.) before any extensions are tended to, making administration quite a bit more automated. In a good number of cases, /home, local and /tce are mounted remotely (NFS, AoE, etc) so the "backup" system really doesn't work too well in these cases, especially for users with a TON of files (or simply large files) in their homes.
Imagine you have a user who likes surfing multimedia sites online (example using firefox). The caches are done in /home/user which on a flash drive, is hell on the drive AND tends to waste a large amount of space. If they're tab-mongers like I am (many tabs open at once) this impacts performance tremendously. If you were to back up ~/ ... God help you!
If you have users with persistent homes, be sure to link caching and other similar activities to /tmp or similar, thus your backup should only tag the link file as opposed to everything within it. (I never looked, but I have to assume filetool.sh doesn't follow symlinks - or at least I'd hope not!)
As for why /etc isn't mounted like /opt or /home... I can't speak for Robert and/or any others who decided this, but it's my
guess that it's the goal of the backup system so that you have a "clean" install at every boot --- including passwords (or the lack thereof) as people forget those things all the time. Since it's basically a single user environment from install, I imagine they weighed the thought and saw it being more problem than purposeful. It CAN easily be done, though:
Create a static directory on /mnt/sdXX/etc
in bootsync.sh as the first line of the file, add the line
mount --bind /mnt/sdXX/etc /etcThis probably is not recommended by the Tiny Core Team, but it's do-able if needed.
(I'd likely make it a bit more elaborate than that since sdXX isn't guaranteed on every machine, but it gives the concept.) Actually, this should work rather well with a static /tce:
tce=`readlink /etc/sysconfig/tcedir`
mnt=${tce:1:3}
dev=${tce:5:4}
if [ "$mnt" == "mnt" ];
if [ -d /mnt/$dev/etc ]; then
mount --bind /mnt/$dev/etc /etc
fi
fi
tce= gets the /mnt/sdXX/tce directory
mnt= tests to make sure we're using a device (/mnt/sdXX) instead of /tmp/tce
dev= gets just the "sdXX" portion of the device
if /mnt/sdXX/etc exists, we mount it on top of /etc (the old /etc is then "hidden" so to speak)
EDIT: The persistent sdXX/etc directory will have to be populated first otherwise you'll end up mounting an empty /etc which will cause all kinds of havoc. As such, you'd likely want to test /mnt/sdXX/etc for a file (such as sudoers) to make sure it already exists on sdXX/etc otherwise the system will fail to do much of anything. Due to specific permissions of /etc/sudoers I recommend running tar -zcf on /etc and extracting the zip file onto the persistent.