Originally Posted by Nyoxi
I know it's not related to this thread but since it appeared here I add my word of advice to everyone. Do not rely on something else to do "mntroot ro" for you. If you want to keep your root filesystem clean do it yourself as soon as you're finished modifying. Moreover if you do that during boot. The upstart scripts have tendency to pollute the root filesystem (strangely even to the point of preventing subsequent boot).
I was not aware of the root pollution by upstart scripts. It seemed to me that because a RUNME.sh script can be called from a number of different locations, and you do not know if the partition was already writable without testing for it. If you make it ro when the startup code that indirectly launched RUNME.sh is expecting it to be rw, that could be a problem unless you check for rw first (touch /junk; [[ -f /junk ]] && rm /junk && echo "already rw"
). How future firmware updates react if the rw status changes under them could be a problem.
Also, it seems counterintuitive to me that startup scripts would write junk to root while ro, or the script could fail and take down upstart.
I suppose the safest thing to do is check for rw (like above) and only do the "mntroot rw; ... other code ...; mntroot ro
" if it *was* ro to begin with.