On 12/07/12 10:20, Mark Rogers wrote:
Thinking about this, a better solution would be to run a script like this (as root) on startup:
#!/bin/bash while [ -d /var ] ; do sleep 60; done echo b > /proc/sysrq-trigger
OK, I tried this, and the error occurred, and the script starts spewing /root/fswatchdog.sh: line 3: /bin/sleep: No such file or directory to the terminal; clearly /var is still there even though /bin/sleep isn't.
If I try: echo xxx > /var/xxx I get: -bash: /var/xxx: Read-only file system .. again suggesting that /var is there (the same is true when I test /bin, /etc, etc). I can't think of a way to look at the contents of any files though; cat, ls, etc are all gone at this stage so I can't see what the filesystem "looks like".
Any suggestions as to how I can investigate this further welcomed, for the time being I'm going to get the box rebooted and try "while [ -f /bin/sleep ] ; do" (or maybe -r ?) instead to see if that's any better.
[Note: my last email had ~/var in the script rather than /var, fixed above.]
Mark