COMPACT FLASH LINUX STRATEGY ######################################################################## OVERVIEW /varcp is a normal directory that just holds a normal backup of /var. This is what is loaded into the production RAM /var at boot time. At bootup, we mount RAM partition /tmpfsvar, load it with a copy of the /varcp branch, then overmount /var with /tmpfsvar. The normal /var branch on the root disk will contain updates only from bootups before the overmounts. ######################################################################## No swap space. (Will Suse install permit?) Just / and /boot partitions on both primary and backup flash disks. Make 2 RAM partitions (from fstab:) none /tmpfsvar tmpfs noauto,size=20M 0 0 none /tmp tmpfs size=5M 0 0 The latter is handled 100% automatically. The former requires care. For RH, edit /etc/rc.d/rc.sysinit right after "mount -f /proc" to add: action $"Loading /tmpfsvar:" mount /tmpfsvar && cd /varcp && find . -depth -print | cpio -pdVm /tmpfsvar && action $"Overmounting /var:" mount --bind /tmpfsvar /var (Looks like for Suse, I would edit /etc/rc.d/boot.localfs right after "mount... /dev/shm": echo 'Loading /tmpfsvar:' mount /tmpfsvar && cd /varcp && find . -depth -print | cpio -pdVm /tmpfsvar && echo 'Overmounting /var:' && mount --bind /tmpfsvar /var ################################################### TODO: Make sure that perf initialization occurs AFTER the remount. TODO: Immediately before /tmpfsvar load, rsync /var/log/ to /earlylog. Add to /etc/init.d/halt: runcmd $"Saving contents of /var to NV memory" rsync -avH /var/ /varcp SUSE: Put it in halt.local. CRONJOBS Sync RAM to production flash disk like every 5 minutes rsync -avH /var/ /varcp > /dev/null Sync to backup flash disk daily /usr/local/bin/syncflash -l CF<-->IDE converters Drive is only recognized about 50% of bootups when 2 drivers are done this way. I am testing now whether it is more reliable with just 1 CF drive. Legacy 40-conductor cables seem to work better than Ultra cables. SATA (mb/adapt) -> SATA<-->IDE-convert -> IDE<-->CF-converter does not work. (Linux can't see the driver).