OK, so let's start with some history. On Monday night I did a full backup of my rootfs (and more) with rsync. I know what I'm doing.
On Tuesday I edited some files on rootfs, again, no problems.
Today around noon I launch Iceweasel, N900 freezes hard, I have to pull the battery (for the second time ever). I reboot, rootfs is damaged and mounted as read only, but no problem since I have backups.
Just now, I reflash rootfs, install rootsh+ssh client+rsync and start a restore process from Monday night. It goes well, I restart. Everything looks flawless at first.
But as a test I try writing to rootfs.
rootfs is damaged again and mounted as read-only WHAT THE F@#$!?!?!?!?
What the hell could cause this!? I'm going to try the process again. The screen did flash an extra time on the first reboot after restoring as I unplugged the charger, maybe that's related.
OK something more freaky is going on here. I ran this exact command on tuesday, NOT proceeded by sudo gainroot:
rootsh echo "set nowrap" > /etc/nanorc
this gives a permission denied error. But this:
sudo gainroot
echo "set nowrap" > /etc/nanorc
works fine after a fresh reflash and installing rootsh. I didn't try that after the restore. What could cause this change in behavior?
Hmm... what version of rootsh are you using? Try "dpkg -l rootsh" in terminal. If you use v1.8 then "rootsh" as a command does not work. Only "root" or "sudo gainroot" will give you root access.
Right now it shows 1.5, but I'm in the middle of the restore process. But as recently as Tuesday I was using rootsh like a password-less sudo.
Maybe the sudoers file did not get restored? Check /etc/sudoers.d/ if you have it there. But as you said.. something seams to be fishy. Have you checked your rsync backup?