[oe] Making /var/lib persistent
Jamie Lenehan
lenehan at twibble.org
Thu Apr 19 01:49:50 UTC 2007
On Wed, Apr 18, 2007 at 07:24:15AM -0700, Koen Kooi wrote:
[...]
> Sound like a good idea, do you have a patch for this?
Try this out:
http://twibble.org/dist/oe/var-volatiles-1.patch
I've tested it locally both with and without tmpfs mounted on
/var/volatile and all seems to work as expected.
I modified the base-files recipe to create the /var/volatile
directory and the various subdirectories in it and to create symlinks
from /var for those directories. This means that even if your not
using tmpfs these will still point into the volatile directory. It
was rather difficult to make it wotk without doing this.
So on the target I end up with this:
root at titan:/$ find /var -exec ls -ld {} \;
drwxr-xr-x 7 root root 288 Apr 19 2007 /var
drwxr-xr-x 4 root root 96 Apr 19 2007 /var/lib
drwxr-xr-x 2 root root 168 Apr 19 2007 /var/lib/ipkg
-rw-r--r-- 1 root root 196192 Apr 19 2007 /var/lib/ipkg/nynaeve-titan
-rw-r--r-- 1 root root 14408 Apr 19 2007 /var/lib/ipkg/nynaeve-all
-rw-r--r-- 1 root root 2670761 Apr 19 2007 /var/lib/ipkg/nynaeve-sh4
drwxr-xr-x 2 root root 48 Apr 19 2007 /var/lib/misc
lrwxrwxrwx 1 root root 12 Apr 19 2007 /var/log -> volatile/log
lrwxrwxrwx 1 root root 12 Apr 19 2007 /var/run -> volatile/run
lrwxrwxrwx 1 root root 17 Apr 19 2007 /var/tmp -> volatile/tmp
lrwxrwxrwx 1 root root 13 Apr 19 2007 /var/lock -> volatile/lock
lrwxrwxrwx 1 root root 14 Apr 19 2007 /var/cache -> volatile/cache
drwxr-sr-x 2 root root 48 Apr 19 2007 /var/local
drwxr-xr-x 2 root root 48 Apr 19 2007 /var/spool
drwxr-xr-x 2 root root 48 Apr 19 2007 /var/backups
drwxr-xr-x 7 root root 140 Jan 1 00:32 /var/volatile
drwxrwxrwt 2 root root 40 Jan 1 00:32 /var/volatile/tmp
drwxr-xr-x 2 root root 60 Jan 1 00:32 /var/volatile/run
-rw-rw-r-- 1 root root 0 Jan 1 00:33 /var/volatile/run/utmp
drwxr-xr-x 2 root root 60 Jan 1 00:32 /var/volatile/log
-rw-rw-r-- 1 root root 0 Jan 1 00:33 /var/volatile/log/wtmp
drwxrwxrwt 3 root root 60 Jan 1 00:32 /var/volatile/lock
drwxr-xr-x 2 root root 40 Jan 1 00:32 /var/volatile/lock/subsys
drwxr-xr-x 2 root root 40 Jan 1 00:32 /var/volatile/cache
root at titan:/$ mount | grep var
tmpfs on /var/volatile type tmpfs (rw)
root at titan:/$
--
Jamie Lenehan <lenehan at twibble.org>
More information about the Openembedded-devel
mailing list