My server running Debian lenny has just had a power cut recently and its come back up with the root partition in read only mode. I tried to remount the filesystem in read write mode with mount -n -o remount,rw /
which then gave the output mount: block device /dev/hda1 is write-protected, mounting read-only
.
But now the root filesystem isn't mounted at all so I can't run anything to mount the partition again or any other command for that matter such as shutdown because /bin/ isn't there.
Is there anything I can do remotely?
You might be able to use something in usr (assuming that's still mounted).
But one thing you can do is use magic SysRq keys if it's compiled into your kernel.
You should wait for around thirty seconds or so between commands (a few minutes after e).
This will terminate processes (e), kill any processes that haven't yet terminated (i), sync disks (s), unmount disks (u), and finally reboot your server (b). Hopefully that'll give you another chance at fixing it without needing physical access.