A temporary work-around to having the database in a read-only file system type.
Make a directory in writable file space:
Code:
[root@kindle root]# mkdir kdb
[root@kindle root]# cd kdb
[root@kindle kdb]# cp -a /etc/kdb.src/* .
[root@kindle kdb]# pwd
/tmp/root/kdb
[root@kindle kdb]# cd ..
Over-mount the cramfs mount point:
Code:
[root@kindle root]# mount --bind /tmp/root/kdb /etc/kdb.src
[root@kindle root]# df /etc/kdb.src
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 32768 1740 31028 5% /var
Now play with making changes to the OTA update settings:
Code:
[root@kindle root]# kdb get system/daemon/otaup/TRANSFER_TIMEOUT_SEC
126000
[root@kindle root]# kdb set system/daemon/otaup/TRANSFER_TIMEOUT_SEC 60
[root@kindle root]# kdb get system/daemon/otaup/TRANSFER_TIMEOUT_SEC
60
Since the 'bind mount' isn't in /etc/fstab - it will go-away on a re-boot.
The writable copy of the database is in tmpfs - it will also go-away on a re-boot.
Which gives a bit of protection from bricking the Kindle (push the power button to recover).
And when happy with the changes, we can create a replacement cramfs image:
Code:
[root@kindle root]# mkcramfs
usage: mkcramfs [-h] [-e edition] [-i file] [-n name] dirname outfile
-h print this help
-E make all warnings errors (non-zero exit status)
-e edition set edition number (part of fsid)
-i file insert a file image into the filesystem (requires >= 2.4.0)
-n name set name of cramfs filesystem
-p pad by 512 bytes for boot code
-s sort directory entries (old option, ignored)
-v be more verbose
-z make explicit holes (requires >= 2.3.39)
dirname root of the directory tree to be compressed
outfile output file
Isn't it nice that Lab126 provides utilities that have no reason for being on the system?