Raspberry Pi: All changes gone after Reboot? This might help!
05/27/2019 (7791x read)
If you up- or downloaded something onto the Raspberry or changed some files and don’t see your changes after a reboot, there might be a problem which requires immediate action: Otherwise you could risk to loose your data on the mini computer!
One symptom of a failing SD card (or a micro SD card) is that it could become read-only: While still appearing normal to you and the Raspberry’s operating system, all changes are only made in the Raspberry’s cache. The SD card’s controller stopped saving new files or changes that you have made: After a reboot the Raspbian system loads the old data from the micro SD card again and all changes, edits or new files are gone.
Now it’s time to replace the Raspberry’s SD card: As long as you can still access the files, you can copy them one by one or make a complete SD card backup image: This worked with our dying SD card perfectly: After copying the image onto a new SD card, everything worked again (and new changes are saved again!).
This image shows a corrupted configuration file on a dying micro SD card. While trying to copy it (via FTP) it was not readable anymore:
It was, however, not problem to backup the whole SD card with an image backup tool. After copying the image on a new micro SD card everything worked and the corrupted file was usable again. If your Raspberry shows some similar problems, you should make sure to make a backup as fast as possible!
Save your data: Backup your Raspberry Pi files!
If you insert your SD or micro SD card in your Windows PC, you won’t be able to access the Raspberry’s files: Windows and macOS cannot read the Linux file system and it’s files. But: there are some tools to copy the files or make a full disk backup!
Open the Raspberry’s SD card with Windows
For Windows, there’s a small and free tool. It let’s you mount the Raspberry Pi’s SD card and gives access to the file system: You can see all files and directories and copy them onto your Windows pc.
You can download the ext2explore tool from SourceForge. After extracting the app, you have to make sure that you run it as administrator (right-click it and select „run as administrator“!). You can then access all the files and folders (read-only) and copy important files onto your pc.
Make a complete backup with Windows
To make a complete image of the Raspberry Pi’s SD card (or write the SD card’s image back to a new SD card) you can use the free tool Win32 Disk Imager.
On the left side you can choose where to save the image, on the right side you have to select the Windows‘ drive to backup as image. The Disk Imager will then create a backup from the SD card. After inserting a new SD card you can save the image back to the card and see if it works in the Raspberry Pi.
Make a complete backup with Mac OS
On a Mac, there’s a free tool called „Apple Pi Baker“. It is an easy to use tool to backup your SD card or save an img backup back to the card. Select „Create backup“ on the right side and choose a file to save it or choose restore backup to save your image file back onto a new card!