Good morning,
I have been cloning Raspberry Pi's SD Cards for a "write heavy" software that I have programmed. This leads to the SD Card being unable to write, making it "readonly".
What I mean in the above sentence is that the SD Card with the Raspbian (NOOBS) system image still works, it can make read operations, I can actually log into the raspberry pi with my account and do things like surf the web, ping some IP and other things. When I say that the card is unable to "write to persistent memory", I mean that whatever is written or created gets automatically deleted each time the Raspberry is rebooted or shutdown.
As an example:
1) I boot the Raspberry, works correctly and I can use it with default login pi
2) I surf the internet
3) I need to write something in a txt file, so I create the file:
touch newfile.txt
which is on the desktop, I know I created it because if I "ls -la
" it's right there, I can open it, I can write things with nano
and I can CTRL+X
save it.
4) If I re-open the file, the contents are still there.
5) I reboot the Raspberry and everything I have created inside the Raspberry a moment ago is now erased from it, probably because it lived on the memory (RAM) and not in the persistent memory (SD). Also, this applies not only to new files or folders but also to all the modifications I make to old files, those modifications are never actually saved and only persist as long as the raspberry pi is turned on, so I guess they really live on the RAM.
6) The SD Card is probably unable to write anymore, also I am unable to ssh pi@my-pi-ip-address but I can ping it, which happens when the write cycles of the SD Card are finished.
Since I can still copy / interact with the SD Card, I have made a clone image of it and I would like to know:
1) Is cloning the SD Card image safe?
2) Considering that the SD Card is now unable to write to persistent memory, but only to read from it, will the new SD Card be readonly?
3) If I clone an SD Card with, say, 1000 writes left, to a new SD Card that I just took out of the box, will I get just 1000 writes or all the possible writes from the new card?
4) What is the safest way to clone an image and retain all the writes from the new card while still having a backup of the SD Card image installed?
Thanks a lot.