I have a Raspberry Pi which is run from a micro SD card. It boots fine and dandy, but there's something peculiar going on. If I for instance create a new file and reboot, the file is not there. For example:

$ ls
$ echo 'bar' > foo.txt
$ ls

$ ls

When I run other commands, e.g. sudo apt-get update && sudo apt-get upgrade, it always installs the same updates. For some reason there's no persistence whatsoever - the file system has frozen in-place.

How do I fix this? There's nothing of value on the SD card, so I'd be comfortable with wiping it and re-installing the OS. However, when I tried to dd a new image to the card, it proceeded as expected, but when I booted up the Pi, the old OS still persists.

  • I have the same problem quite often. Your SD card is "old" and the filesystem gets corrupted often. A fsck.ext3 often solves it until it corrupts again. Best advice is buying a new one. – Willian Paixao Nov 10 '16 at 11:56

Your partition is probably corrupted. Run fsck from your desktop:

fsck.ext3 /dev/sdb1

Where sdb1 is your root partition in the SD.

  • Did my answer solves your problem? @manabreak – Willian Paixao Nov 11 '16 at 18:42
  • It didn't work for me. – hnicke Jul 29 '18 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.