Do a mount
command on its own - you will possibly find your root partition is marked, in the last group of words (in side parentheses like these), something beginning with (ro,...)
whereas you would expect it to be (rw,...)
! This is highly likely to mean that a file system error was detected and the standard kernel behaviour in this case (for a faulty FS) is to mark the file-system READ-ONLY to prevent further "corruption" {you may actually see the setting for that as the option errors=remount-ro
in the same area of the output from mount on other actual file-systems}.
An, ahem, "not suitable", Flash card is one possible cause of this type of error - though I venture to suggest it is not the only one! For example, even with journalled file-system types such as Ext4, it is not a good idea to remove power from a *nix system without flushing any pending writes out to the file-system - this is one of the steps that the shutdown
command will do as appropriate (I wanted to quote the *nix man page for shutdown(8)
to point out the -n
option which in the past said something like:
-n - bring the system down, quickly, by ourself - the system unit is ON FIRE!
but the standard text now just says it is "discouraged" to use that option. 8-P )
Recovery of the root partition is a bit more fraught than other cases because the fix requires running fsck
on the file-system which needs to be (IIRC must be) not mounted at the time. If you have a PC with a card reader and a Linux installation there it is easiest to use that to repair the SD card - (Try and prevent the SD card from being automatically mounted when you insert it into the PC as you´ĺl only have to un-mount it to do the same fsck
on it!) - once you have identified the added "disk" in your PC has the faulty partition/file-system.
sdtool-rpi
does not seem to be standard package. Are you doing something to access the SDcard?wget
to downloadsdtool-rpi
.dmesg
into your answer.