I think my SD card died, how to restart again as quickly as possible?

I received several emails this morning, that my feeds were out.
I rebooted the Rpi3 a couple of times, but it doesn’t even show up in my network.
(I’ve even tried ethernet).

The RPi also only has the red LED on and on boot I think I saw the other green LED flash twice or so.
So I’m afraid my SD-card is dead and also lost all the data on it (including for example graphs).

I don’t want to lose my streak (just over 2800 days) so I’m in a hurry to get things going again.
What would be my best strategy?

EDIT: I placed the SD-card in my laptop and it does show up. So SD maybe not dead yet.

Burn a new image of the piaware SD card

Start with step 2
from there on you will need to reregister your orignal station ID

Then you can reinstall Graphs1090 again.

Lastly, set the gain correctly for your station as you had it in the previous install.

Your SD card might not be dead but your software installation could be corrupted. This might indicate the card is on the brink of going dead ( my expierence)

2 Likes

Will try that. If I can remember all the websites I feed.

If I can still access files on my old SD card, are there any files I should copy? For example, can I copy some files for graphs so I can have all the old history back?

EDIT: never mind. No such files are accessible. Only boot is accessible.

FA, FR24 and ADSBexchange I think I’ve seen you on.
Maybe Radarbox as well ?

I’m only feeding FA and FR24 but no others. If you search on the forum you can also find help for other feeder installations.

Well I’ve managed to get FR24, Flightaware and Radarbox running. So my streak there is not yet over.
I know I feed Planefinder but their instructions are incomplete (no way to find their latest version).
Will work through my other feeders.

I’m happy my streak seems to be okay, but I’m sad my old graphs history is now gone. That was several years worth of information.

When I have more time I may try this instead: ADSB.im

1 Like

For installing latest version of Planefinder data feeder, please visit the thread linked below, and scroll down to item STEP 3- Installation of Planefinder’s Data feeder :

Raspberry Pi (B+, Zero, RPi2, RPi3 & RPi4) - Installation instructions for Raspbian, Dump1090 & Data Feeder

 

NOTE:
If you are using 64-bit Raspberry Pi OS, the dpkg command will fail due to missing dependencies. The fix for it is that after installation fails, issue following command:

sudo apt --fix-broken install

 

Yes, but that link (https://planefinder.net/coverage/client) does not provide the latest version.
And version 5.0.161 is from 2021 so I can’t use that either. :wink:

That is the latest version.

2 Likes

@LawrenceHill Thank you. I thought it would be an older version looking at the date, but apparently not.

I think I have all the feeders back online.
So thanks to all of you. Was in a bit of a panic; I didn’t have much time when I found out and I didn’t want to lose my streak (now 2805 days). I’m lucky I had some spare SD card around since I probably didn’t have the time to get to a store to buy a new one.

Still sad I probably lost all (years worth of) graph data :frowning_face:

2 Likes

Try mounting the old SD card on a Linux system.
You may be able to copy the graphs backups.
The boot partition is the only one readable under Windows but Linux should be able to read both partitions on the card. I have used the Raspberry Pi image with the full GUI in order to recover the graphs from a failed SD card in the past. I used a USB card reader and put the failed card in that.

3 Likes

Raspberry Pi running LITE image (no GUI) can also be used to access files & folders in root partition of the microSD card in the card reader plugged into usb port of RPi.

STEP-1:

Issue command lsblk to list the partions of operating microSD card. It will list partitions as follows:

mmcblk0 179:0 0 7.4G 0 disk
├─mmcblk0p1 179:1 0 512M 0 part /boot/firmware
└─mmcblk0p2 179:2 0 6.9G 0 part /

Click on Screenshot to See larger Size

 

STEP-2:

Insert microSD card to be read in USB card reader, and plug-in the card reader in USB port of RPi. Now again issue command lsblk. All partitions of OS microSD card as well as that of microSD card to be read (plugged into USB port) will be displayed.

sda - Old microSD card in USB slot
├─sda1 - boot partition of Old microSD card in USB slot
└─sda2 - root partition of Old microSD card in USB slot

mmcblk0 - Operating microSD card
├─mmcblk0p1 - is the /boot partition of Operating microSD card - Do NOT touch it
└─mmcblk0p2 - is the root partition of Operating microSD card - Do NOT touch it

 

 

STEP-3: (With microSD card to be read plugged into USB port of RPi)

lsblk   
sudo mkdir old-root   
sudo mount /dev/sda2 old-root  
sudo systemctl daemon-reload  
cd old-root   
ls  

Click on Screenshot to See larger Size

 

1 Like

Indeed it can, however using the GUI is much simpler for someone who may not be too familiar with the linux command line. You can mount the old card, drag and drop the files, all without needing to know anything about the command line.

2 Likes

I don’t have a Linux machine available (apart from 1 very old 1st gen Rpi model B).
But I found this software: Linux File Systems for Windows | Paragon Software

This gives/gave me access to the files, but the card often drops/crashes, so card is obviously dying.
But I have managed to backup the /var/lib/collectdd/rrd directory to my laptop.
The last auto backup file is from week 10 made on 8 March 23:42 and the localhost.tar.gz is from 9 March 23:42 so something wasn’t working correctly there.

But either of those files should give me back the graphs data until that date right?
I don’t mind loosing data from week 11 till today.

If I copy one of those files (I reckon the auto backup one) to /var/lib/collectd/rrd and then do:

cd /var/lib/collectd/rrd
sudo systemctl stop collectd
sudo tar --overwrite -x -f auto-backup-2024-week_10.tar.gz
sudo systemctl restart collectd graphs1090

Then I should get the old data back, apart from the last 7 weeks right?

1 Like

You are 100% right about ease in using GUI.

For those who are not conversant or comfortable with Linux commandline, using GUI is just like using Windows: drag, drop, click, double click, right-click etc etc.

However a large number of users have either piaware sd card image or raspbian lite image. Both these images dont have GUI. Such users can use their existing Lite OS to access root partition of old microsd card by method I have posted above.

Yes.

1 Like

I use a hand program FileZilla to connect to other file systems. It works very well in Windows.

1 Like

I don’t know what’s going wrong, but I did exactly that and graphs is still showing graphs from yesterday/today instead of the old data after a refresh (Ctrl+F5) of graphs page

I feel you need @wiedehopf 's help / advise

It looks like the data directory has moved to /run/collectd since I last did a restore.
I think you will need to copy the .tar.gz file to this directory and then run

cd /run/collectd
sudo systemctl stop collectd
sudo tar --overwrite -x -f auto-backup-2024-week_10.tar.gz
sudo systemctl restart collectd graphs1090

@wiedehopf Is this correct?

Stop collectd and overwrite /var/lib/collectd/rrd/localhost.tar.gz with whichever backup tar.gz you want.
Then start collectd.

If you were using an armhf image and are now using an arm64 image the restore won’t work due do different data formats.
Then you’d need an armhf image to do an XML export … well it’s quite annoying.

4 Likes