I need urgent help.
2 days ago the Pi was showing a strange behaviour while booting up. A lot of error messages. (Sorry, I can't say anymore what exactly it said). Anyways... I have an automatic backup system... yeah. Just bad that I was setting it up wrong and it made only a backup of the first partition...
And the Odyssee startet.
I can still access the card. So the first thought was to take it out and make a complete image with dd. Well said. Did it. Then copying the image back to another SD 32GB card. But it wouldn't boot.
As I had a copy now, I tried to repair the card... don't ask me how, I found a Tutorial (many actually) and tried what I could find. (I am still a Linux beginner)
It found a lot of stuff and tried its best. After that, the original sd card was working again. The Pi startet and seemed ok. Until now I just found phpmyadmin not working... files were missing. So I guess the card is corrupt and the next failure can appear every minute.
The thing is I can't make an image or straight a copy to another sd card. It is not working. I have 2 more 32GB sd cards. But they are a little bit smaller... and at the end dd is complaining that there is no space left
I tried pishrink. This is complaining as well (something with sector which is not assigned)... tons of this messages.
So, again, I think the file system or partition system is corrupt already.
(Sorry that I can't provide detailed error messages or anything... I did so much in the last 2 days... I really can't remember)
Now the question: If I copy a new raspian image on a new sd card, then I get a fresh bootable card. (partition 1: boot, partition 2: 'data') And then just copy all files from the old SD card (partition 2) to the new SD card (partition 2 - 'boot' not touching)... would that work?
I mean would it still boot and would it be like the old system with all installed software, packages, configurations, files, etc.
Thank you very much in advance!