That’s more or less impossible as the filesystem is active.
I mean maybe there are ways but i’m not aware of a practical solution.
That’s more or less impossible as the filesystem is active.
I mean maybe there are ways but i’m not aware of a practical solution.
The beauty of the FA image is that it literally takes minutes to download and deploy. I don’t see any advantage in the method you propose. If you already have the image file on your PC, it’s even faster.
The only thing that can speed things up a little is to save a copy of the working config file to your PC before re-imaging the card. In this case, all you have to do is replace the file created by the re-imaging of the SD card.
Thank you for your excellent replies. You’re right of course - and I shall save the configuration file as suggested.
Hugh
I have a text document saved with a list of the steps required (I prefer to write the latest Raspbian Lite and then install the additional bits manually) so it’s just a case of punching in all the commands one after another.
Of course, with various add-ons, there’s a fair bit to do (graphs, additional range ring, upintheair, gain script etc) but it still doesn’t take very long.
You can script it
True, just a list of commands in a .sh file
Maybe I’ll do that while my hair is drying next time I wash it
Been there, done that. My current interest is simply a radar to see what’s overhead, so plain vanilla FA image is all I use now.
While experimenting, I use fresh install by writing Raspbian image. As this is happening very frequently, I have written a script over a year ago, and use it every time I write Raspbian image. This script contains all the feeder-ids and keys, latitude and longitude etc, so I dont have to configure anything.
I am posting it below. If you want o use it, copy-paste it in a blank text file, replace all XXXXX by actual feeder-ids/keys, latitude, longitude etc, and save file.
It installs following. You may comment-out or delete code pertaining to feeders you dont want.
heywhatsthat.com
)#!/bin/bash
echo -e "\e[33mupdating.....\e[39m"
sudo apt-get update
## (1) DUMP1090-FA INSTALLATION
echo -e "\e[33minstalling dump1090-fa......\e[39m"
sudo wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.7.1_all.deb
sudo dpkg -i piaware-repository_3.7.1_all.deb
sudo apt-get update
sudo apt-get install -y dump1090-fa
echo -e "\e[32mInstallation of dump1090-fa completed ....\e[39m"
## (2) TERRAIN LIMIT RINGS
echo -e "\e[33mAdding Terrain Limit Ring ....\e[39m"
sudo wget -O /usr/share/dump1090-fa/html/upintheair.json "http://www.heywhatsthat.com/api/upintheair.json?id=XXXXXXXX&refraction=0.25&alts=12192"
## IMPORTANT NOTE: REPLACE XXXXXXXX BY YOUR HEYWHATSTHAT ID
## (3) PIAWARE INSTALLATION
echo -e "\e[33minstalling Piaware data feeder......\e[39m"
sudo apt-get install -y piaware
sudo piaware-config allow-auto-updates yes
sudo piaware-config allow-manual-updates yes
sudo piaware-config feeder-id XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
## IMPORTANT NOTE: REPLACE XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX BY YOUR ACTUAL FEEDER ID
sudo systemctl restart piaware
echo -e "\e[32mPiaware Data feeder Installation and configuration completed ....\e[39m"
## (4) WIEDEHOPF's GRAPHS INSTALLATION
echo -e "\e[33mInstalling wiedehopf's Graphs....\e[39m"
sudo bash -c "$(wget -q -O - https://raw.githubusercontent.com/wiedehopf/graphs1090/master/install.sh)"
echo -e "\e[32mInstallation of Graphs completed...\e[39m"
## (5) PLANEFINDER DATA FEEDER INSTALLATION
echo -e "\e[33minstalling Planefider data feeder.......\e[39m"
wget http://client.planefinder.net/pfclient_4.1.1_armhf.deb
sudo dpkg -i pfclient_4.1.1_armhf.deb
## Setting up pfclient configuration
PF_FILE="/etc/pfclient-config.json"
sudo chmod 666 $PF_FILE
sudo cat <<\EOT > $PF_FILE
{
"tcp_address":"127.0.0.1",
"tcp_port":"30005",
"select_timeout":"10",
"data_upload_interval":"10",
"connection_type":"1",
"aircraft_timeout":"30",
"data_format":"1",
"latitude":"XX.XXXX",
"longitude":"YY.YYYY",
"sharecode":"XXXXXXXXXXXX"
}
EOT
## IMPORTANT NOTE: REPLACE XXXXXXXXXXXX, XX.XXXX, and YY.YYYY BY YOUR ACTUAL VALUES
sudo systemctl restart pfclient
echo -e "\e[32mInstallation and configuration of PFClient completed.....\e[39m"
## (6) RB24FEEDER INSTALLATION
echo -e "\e[33mInstalling RadarBox24 feeder.....\e[39m"
sudo bash -c "$(wget -O - http://apt.rb24.com/inst_rbfeeder.sh)"
## Automatic configuration of RB24 feeder
RB24_FILE=/etc/rbfeeder.ini
sudo touch $RB24_FILE
sudo chmod 666 $RB24_FILE
sudo cat <<\EOT > $RB24_FILE
[client]
network_mode=true
log_file=/var/log/rbfeeder.log
key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
sn=
lat=XX.XXXX
lon=YY.YYYY
alt=ZZZ
sat_used=0
sat_visible=0
[network]
mode=beast
external_port=30005
external_host=127.0.0.1
[mlat]
autostart_mlat=true
EOT
## IMPORTANT NOTE: REPLACE XXXXXXXXXXXX, XX.XXXX, YY.YYYY, ZZZ BY YOUR ACTUAL VALUES
## (7) MLAT-CLIENT INSTALLATION (FOR RB24 FEEDER)
echo -e "\e[33mInstalling mlat-client for rb24 feeder.....\e[39m"
sudo apt-get install -y git curl build-essential debhelper python-dev python3-dev
cd /home/pi/
git clone https://github.com/mutability/mlat-client.git
cd /home/pi/mlat-client
sudo dpkg-buildpackage -b -uc
cd /home/pi/
sudo dpkg -i mlat-client_*.deb
echo -e "\e[32mInstalltion of mlat-client completed.....\e[39m"
## Restart rb24feeder
sudo systemctl restart rbfeeder
## (8) OPENSKY FEEDER INSTALLATION
echo -e "\e[33mInstalling Opensky-network Feeder .....\e[39m"
wget https://opensky-network.org/files/firmware/opensky-feeder_latest_armhf.deb
sudo dpkg -i opensky-feeder_latest_armhf.deb
echo -e "\e[32mInstallation of Opensky-network Feeder completed .....\e[39m"
## (9) FR24FEED INSTALLATION
echo -e "\e[33mStarting installation of FR24 feeder.....\e[39m"
## Configuration of FR24 feeder
FR24_FILE=/etc/fr24feed.ini
sudo touch $FR24_FILE
sudo chmod 666 $FR24_FILE
sudo cat <<\EOT > $FR24_FILE
receiver="beast-tcp"
host="127.0.0.1:30005"
fr24key="XXXXXXXXXXXXXXXX"
bs="no"
raw="no"
logmode="0"
windowmode="0"
mpx="no"
mlat="yes"
mlat-without-gps="yes"
use-http=yes
http-timeout=20
EOT
## IMPORTANT NOTE: REPLACE XXXXXXXXXXXX BY YOUR ACTUAL FR24KEY
## Installation of FR24 feeder
wget -O /home/pi/install_fr24_rpi.sh "https://repo-feed.flightradar24.com/install_fr24_rpi.sh"
sudo sed -i 's/AUTO_SIGNUP=1/AUTO_SIGNUP=0/' /home/pi/install_fr24_rpi.sh
sudo sed -i 's/fr24feed --signup/#fr24feed --signup/' /home/pi/install_fr24_rpi.sh
cd /home/pi/
sudo chmod +x install_fr24_rpi.sh
sudo ./install_fr24_rpi.sh
sudo systemctl restart fr24feed
echo -e "\e[32mInstallation and configuration of FR24 Feeder completed.....\e[39m"
echo -e "\e[31mREBOOT PI \e[39m"
I use rpi-clone.
I have a second sd card in a very small card reader, connected to a free USB port. Every night, (via a cron job) the whole card is re-imaged to to the clone. In the event of failure, all I have to do is take the clone, and put it in the SD port of the RPi. Put a fresh SD in the card reader, and the cycle starts again.
Now this is very interesting. It makes me want to buy a batch job of very small card readers and extra SD cards and make this part of my standard build so that every Pi is always taking a nighttime backup.
/edit - Something like this.
Can’t say I’ve ever seen them anywhere but it’s the sort of thing I expect I can buy ten on eBay for about thruppence from the Far East.
This is really useful, thanks.
I did start working on one before I saw this so it’s largely replicated what you’ve posted but I’ve picked up some useful tips from here, specifically pre-configuring the feeders.
Last year I purchased 6 of these from ebay for US$ 4.54 + Free Shipping
.
Perfect - I just bought five packs of two, so ten in total for less than a fiver!
That is the beauty of my script, as it saves repetitive work of configuration at every fresh install. It becomes a one-time effort to enter all feeder-ids/keys, latitude & longitude in the script, and save the file on Desktop/Laptop.
Whenever doing a fresh install next, simply copy-paste desktop file’s contents into a blank .sh
file in Pi, save, and run. When the script finishes, all your feeders are fully configured, up and feeding data.
Geeezzzz…you overpaid big time. They are 5 for 99 cents.
Don’t feel bad, I paid 99 cents for 4, one turned out to be bad, so make that 3.
That’s really good. What I’ll do is prepare three versions, one for each of my two feeders (the one in the loft and the one outside) and set up accounts for a third, test environment so that I can test using those accounts and then change to the live ones if the receiver gets moved into production.
I’m also working on automating the little tweaks, like dashing the line on the heywhatsthat range circle and changing the colour to blue. Little things but fiddly to do manually each time.
This is exactly what I have done for my 2 Pis: one script file for each Pi. The two scripts files are identical except for the feeder ids.