Experimental
I have finally created a working overlay filesystem for the root filesystem. For those who have no idea what that means it allows to mount a writable filesystem over the root filesystem that is read-only. With that you can then create files and directories on the root filesystem
without actually modifying the filesystem. Thus you keep the original filesystem unchanged and you can safely revert back simply by removing the overlay.
Currently it works only with Kindle Touch (both 5.0.0 and 5.0.3), other Kindles were not tested.
EDIT: Don't even try that on other Kindles. It won't work (for one thing they use upstart instead of SysV init).
To test this un-tar the attached files into /mnt/us (wile keeping the directory they're in) and run the included runme.sh (manually or use a jailbreak). After the operation finishes you will have bootstrap-overlay.log in /mnt/us too.
On real / it will change only /sbin/init (adds a line to run /sbin/pre_init) and creates a new file /sbin/pre_init. It will then create the filesystem for the overlay in /mnt/us/rootfs.img. The initial size is 30MB, you can use resize2fs to expand it later if needed.
I tried to make the startup process as safe as possible. But it's still experimental so I expect everyone to have at least a ssh access and basic linux experience.
If something goes wrong you can simply remove (rename) the rootfs.img file and restart the device.
There are also two files that you can create to prevent using the overlay:
/NO_PRE_INIT
/mnt/us/NO_OVERLAY
If you decide to use the overlay again, be sure to remove both files (NO_PRE_INIT will be created automatically if NO_OVERLAY exists or rootfs.img is missing) if you decide to use the overlay again.
Final notes:
Sometimes when comes the moment your screen flashes and progress bar should appear it takes quite long. Before the progress bar appears your screen is just black. But for me it never took more than 20 seconds.
The sources to build the mini_fo kernel module come from OpenWRT project (they include patches for newer kernels)
You can find all the files together with the build script for mini_fo here:
http://hg.nyoxi.net/kindle-packages/
EDIT: Later when the overlay is more tested I plan to create single install tool that will setup the overlay and put opkg there so that anyone can install new packages easily. (More about opkg here:
https://www.mobileread.com/forums/sho...d.php?t=167579)
EDIT: I forgot to mention a fact that it is safe to run the runme.sh multiple times. You can safely use just to create new overlay filesystem.
EDIT: But don't do that while you are using another overlay because md5sum checks will fail.