Many thanks for this script! I use it every day. It really does the trick.

I often remountrw or mount a scratch partition to store things across reboots. Of course, sometimes I forget to...