Is my SD card on the way out?

Hmm, looks like I have a failing SD card on my main receiver. I run an automated backup once a week and every couple of months, I check I can restore the image. I’ve just looked and my last six backup files are all around 500Mb instead of the 4-5Gb I’d expect. It’s been a couple of months since I last checked.

Looking at the backup logs, I see this:

dd: error reading '/dev/mmcblk0': Input/output error

This suggests to me that the card is dying and it frustrates me that it happened and I’ve not noticed it so all my backups are effectively useless. I should check my backups more often.

Now this Pi is 30ft up in the air and it’s a major exercise to get to it.

I could edit /boot/cmdline.txt and add

fsck.mode=force

Which will force a filesystem check on boot.

But that feels like quite a risk. However, if it works then I’d make the effort to get the mast down and swap out the card. If it doesn’t work, it could kill the card and then I’m knackered. I’m seriously thinking that if it doesn’t work, I can’t be arsed to go through the whole process to rebuild things. It’s been so long since I did any work that I simply can’t remember the process and starting again with zero graph history, instead of five years worth, feels a little sad.

I’m not sure what I’m asking for here. I have two options, try and fix it or don’t :smiley:

1 Like

yep that card is on the way out indeed.

next stage will probably being the card switching to readonly mode.
ption could be to use an SSD drive connect to the Pi in the mast, that willl have a lot less wear and tear then the SD card.

1 Like

You can backup the graphs separately without backing up the entire image.
If the image is still 32bit and you want to go to an 64bit image, the graph data can be changed up and i can help with that if necessary (there is scripting and some documentation though so it’s not super hard).
Don’t you have a separate pi … you could give that a fresh image and copy over the graph data.
Once that’s done, would still eventually require switching the sd-cards.

I’m always a fan of not running pis where they are hard to access but there is pros and cons.

Or you could use one of the older backups and then transplant the graph data onto that if you don’t want a new image.
If graphs1090 is configured with the defaults, all that’s needed is copying over /var/lib/collectd/rrd/localhost.tar.gz
Well before placing it on the new pi, stop collectd service, move the file into place and start the collectd service again.

2 Likes

I feel lucky. All my hardware including antennas and Pi’s are indoor, at arms reach without using a ladder. :wink: :slightly_smiling_face:

2 Likes

One option is to network boot them assuming they are fed by ethernet not wifi. The pi doesn’t even need an SD card in it for that. Then you only need to get access if there’s a hardware problem.

3 Likes

How true. I also power them using PoE as there is no need for an electric outlet.

2 Likes

Tell us more about network boot please…

2 Likes

Raspberry Pi PXE Boot - Network booting a Pi 4 without an SD card - Linuxhit

1 Like

Is a network boot a one line command?

No. It needs some setting up including making sure the pi bootloader is configured to enable network booting and having a TFTP server correctly configured to host the OS image. It’s a bit of a process to do it, but there are quite a few tutorials about.

1 Like

Appreciate the feedback. Sounds like a handful and you would have to roll up your sleeves on this one.

Thanks for the link - will have a play at some point. Appreciated @tech0

Right, sorry there’s been nothing more from me, it’s been a tricky few weeks.

I didn’t have a spare Pi of the same type, now I do. I figured I’d just use the latest lite version of Raspbian if everything is still supported and that’s 64bit.

I’ll build what I can in advance and then hopefully it’s just a case of swapping the card out. I don’t have a spare Airspy so I’m not sure what’ll work and what won’t work before I put the card in the mast Pi.

It’s been so long, I can’t remember what the build procedure from scratch is. I’m not going to get complicated this time, just want to get a Flightaware feed set up with the graphs (including keeping the existing ones) and nothing else.

Is it basically this guide, replacing dump1090-fa with readsb and then the airspy drivers?

Thanks.

If you currently have 32bit, converting the graphs is a bit annoying but possible.

https://github.com/wiedehopf/adsb-wiki/wiki/Raspbian-Lite:-ADS-B-receiver
Anyhow i suppose same same in regards to what you said.

Considering how FA doesn’t always give MLAT results for ModeS planes you receive perfectly fine, i’d go with at least one of the other sites that provide MLAT results.
(adsb.lol, .fi, airplanes.live, adsbexchage … whatever)

But that can easily be added later.

If you have an rtl-sdr, just grab that in the meantime, set it up and try and use the graphs file so you can see if the history transfers fine.
But yeah not much more to it.

Did you find the localhost.tar.gz file? Copy it somewhere before going further, just in case the sd-card is finally done.
If the current system is 32bit, you can use this procedure: https://github.com/wiedehopf/graphs1090?tab=readme-ov-file#backup-and-restore-different-architecture-for-example-moving-from-rpi-to-x86-or-the-other-way-around

See, I’d completely forgotten about tar1090!

Also, note to self - Are there drivers for the PoE hat?

I don’t have any full backup file anywhere, so I’ve just got to get off what I can.

Having said that, I’ve just run the command to get xml.tar.gz and copied that off so worst case scenario, I’ve got the graphs up to today. I’m hoping to do this at the weekend, weather permitting.

I’ve also taken a copy of airspy_adsb.

I’m sure I’ve tweaked tar1090 so I’ve taken a copy of /usr/local/share/tar1090/html/config.js

I’m sort of brain dumping here :slight_smile:

AFAIK PoE is plug and play. There are no drivers for PoE hats. I have PoE on 4’s and 5’s. The 3 doesn’t have a PoE hat, but the 3+ does. I use PoE on every device that allows it.

1 Like

Thanks. I was thinking about the fan - I know there are control lines in /boot/firmware/config.txt but couldn’t remember if I needed to install anything for them.

If it’s 64bit …
check

dpkg --print-architecture

Then you can just copy

/var/lib/collectd/rrd/localhost.tar.gz

To the new system.

Well on the new system, systemctl stop collectd … place the file and start up collectd again.

Anyhow good you got a current copy via the xml stuff. Couple days gap never hurt anyone! :slight_smile:

If you care less and want easier maintenance, you could always run coax to the bottom of your mast and have your box there.

1 Like

It’s not, I know it’s not. When I built it, I don’t even think Raspbian had a 64 bit version available.

Thanks, this is what I’ve done so far.

Plugged in flightaware dongle
Install readsb
Test tar1090
Install airspy-conf and restore airspy_adsb
Graphs1090 and restore config.js
Restore graphs data
Install flightaware

Obviously I’m not seeing anything on the map like this but everything appears to be loading and working as intended. I don’t think there’s much more to do before it goes in the Pi up the top.

Planefinder or FR24 good for those?