2

When I create any file, like .bash_aliases for example, and then I reboot using sudo reboot, all my changes are lost. I don't know if the card is read-only (I can actually create files).

I am running under Raspbian Jessie and I've been looking around for a solution. One I tried that did not work was to add a 'rw' before the waitreboot in /boot/cmdline.txt.

Does anybody have another idea how to fix this?

7
  • 1
    Did you do as the top said and press enter when saving? I wasn't saving my file for a while until I learned how to do it.
    – Dylan
    Commented Mar 22, 2016 at 18:23
  • What editor are you using to create the files?
    – joan
    Commented Mar 22, 2016 at 18:48
  • I use nano, and I ctrl-x / Y to save and quit. I have reinstalled Raspbian, I'll test tonight and report here after I've tried again!
    – Flag
    Commented Mar 23, 2016 at 7:05
  • I have same problem on all small file (seems to be a cache problem): all change are lost after reboot. I try different SD cards but same issue. Very simple to test: change same lines in /boot/config.txt, save and reboot... result: all change lost.
    – user44606
    Commented Apr 8, 2016 at 10:23
  • Anybody got a workaround for this?
    – Peter
    Commented Aug 3, 2017 at 13:33

2 Answers 2

1

Ok, so according to this post it seems that can happen when the card gets corrupt.

2
  • Could you please include relevant information from the link in your answer, in case the link breaks in the future.
    – Darth Vader
    Commented Feb 19, 2018 at 9:02
  • Well that's it really, the card is corrupt :) Just get a new one.
    – Flag
    Commented Feb 20, 2018 at 10:40
0

Another reason when changes to the file system do not persist after reboot is the Overlay File System option is enabled. I accidentally enabled that option, and after disabling it via

sudo raspi-config

4 Performance Options > P3 Overlay File System > No

changes to the files system were stored to the SD card again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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