PilotAware
British Forum => OGN-R PilotAware => Topic started by: PaulRuskin on December 08, 2017, 04:18:00 pm
-
Hi All
Three questions:
1. Can anyone point me to an explanation of how the read only software is implemented for an OGN-R station? Specifically, I have a remote login approach which I use for OGN stations (reverse SSH tunneling) which I want to implement on OGN-R stations that I will be managing. How might I go about this?
2. When a new version of the OGN-R software is released, does the upgrade happen automatically, or is it manual?
3. In the event of an upgrade, will the additions in (1) survive?
Thanks
Paul
-
Hi Paul
Hi All
Three questions:
1. Can anyone point me to an explanation of how the read only software is implemented for an OGN-R station? Specifically, I have a remote login approach which I use for OGN stations (reverse SSH tunneling) which I want to implement on OGN-R stations that I will be managing. How might I go about this?
There is a short document describing the procedure - its pretty simple, basically you need to toggle the disk between RO / RW
There is a script which I think (off the top of my head) is
$ sudo /root/mount_rw.bash
# you are now in RW mode
$ sudo /root/mount_ro.bash
# you are now back in RO mode
Additionally you should be aware, if you plan on installing packages etc, that the /etc and /var are RAM disks - so do not persist
The persistant data is held under
/etc_org
/var_org
The copy on write data is held under
/etc_rw
/var_rw
and of course the merged data is in the RAM disk under
/etc
/var
So if you make changes to either /etc /var, remember to save the changes into /etc_org /var_org
a simple double ended tar through a pipe is a good idea, eg (as root)
$ (cd /etc_rw; tar cvf - *) | (cd /etc_org; tar xvf -)
The neat thing about this disk, its very resiliant to powerouts because it is in a flushed RO state for nearly all the time.
2. When a new version of the OGN-R software is released, does the upgrade happen automatically, or is it manual?
Its _almost_ there, you will notice a script to automate the loading of the new data (which also toggles RW described above)
what is not yet setup is a cronjob to do this automatically
3. In the event of an upgrade, will the additions in (1) survive?
yes, if the procedure above has been followed - I use this all the time.
thx
Lee
-
Lee - are you doing something that sets the hostname to ognpaw on startup? If so, where?
(It's the first thing I tried to change, and I couldn't understand why it wasn't working).
Paul
-
Lee - are you doing something that sets the hostname to ognpaw on startup? If so, where?
(It's the first thing I tried to change, and I couldn't understand why it wasn't working).
Paul
Hi Paul,
I had trouble changing the name previously and could not work out why.
I presume you are using the full installation image which uses the read only disk ?
Are you ensuring that after changing the hostname that you are saving the /etc files to /etc_org ?
(after making the disk RO -> RW -> RO)
Thx
Lee
-
Yes, I'm doing all that. It has changed in /etc_org. Something seems to be writing to /etc/hostname on start up - so there's a different version in /etc_rw on the ram disk.
Of course, I had to choose that as the thing I tested my understanding of the R/W system on. Very frustrating.
Paul
-
Hi Paul,
I remember looking into this and could not fathom where in the startup files the hostname was being set.
I think I changed it using raspi-config, all the usual places in /etc (ie /etc_org) but still itwould not stick
If I get a chance I will re-visit
Thx
Lee
-
Thanks.
Low on the priority list though - it's just housekeeping. I'll work around.
Paul
-
Found it.
It's in /etc/rc.local
/usr/bin/hostnamectl set-hostname "ognpaw"
/etc/init.d/avahi-daemon restart
-
Oh excellent
I will add this to a standard install, and make it configurable from the install script
Great find Paul
Thx
Lee
-
oh durrrhh
I already had this in the /etc/local - misunderstood you.
I will add this as part of the startup script
Thx
Lee
-
Hi Lee
Before I send out a bunch of new OGNR stations, can we just check what the update procedure is for
1. a new PAW version and
2. a new OGN version
Bearing in mind it needs to be done remotely via an SSH login.
Thanks
Paul
-
Hi Paul,
Good question.
For updating an OGN version - I do not have anything in place to do this automatically, any guidance on how we could do that would be welcome.
For PAW, there is a script which you can run. This will check ourt website for a newer version, if it exists, it will donwload and install. The process for doing this would be as follows - you can use ssh or shellinabox
$ ssh ognpaw.local
<enter credentials>
$ cd rtlsdr-ogn
$ ./PilotAware-OGN.update.sh
Thx
Lee
-
OK, thx
Are you doing anything special with the OGN software that means that a conventional OGN update would break it?
Paul
-
OK, thx
Are you doing anything special with the OGN software that means that a conventional OGN update would break it?
Paul
Hi Paul
No changes to ogn-rf or ogn-decode
I have a modification in the .conf file which starts the daemons, but only to add in a new process launch
50002 pi /home/pi/rtlsdr-ogn ./PilotAware-OGN.exe
Thx
Lee
-
Hi Paul,
Good question.
For updating an OGN version - I do not have anything in place to do this automatically, any guidance on how we could do that would be welcome.
For PAW, there is a script which you can run. This will check ourt website for a newer version, if it exists, it will donwload and install. The process for doing this would be as follows - you can use ssh or shellinabox
$ ssh ognpaw.local
<enter credentials>
$ cd rtlsdr-ogn
$ ./PilotAware-OGN.update.sh
Thx
Lee
How do we install the script? When I try running the command above it tells me “no such file or directory” I am running a pre compiled image from quite a while back.
-
Hi Ben
This was probably introduced after your installation
Here are the contents of the script
#!/bin/bash
#
# http://pilotaware.lode.co.uk/downloads/OGN/README.update
#
#
# Stop service
#
echo "Stopping OGN Services"
sudo service rtlsdr-ogn stop
#
# Write Enable
#
echo "Mounting Disk RW"
sudo /root/mount_rw.bash
#
# instructions as per README.install
#
echo "Download Updates"
sudo wget http://pilotaware.lode.co.uk/downloads/OGN/OGN-PAW.latest.tgz \
-O /tmp/OGN-PAW.latest.tgz
echo "Install Updates"
sudo tar --same-owner -Pxvf /tmp/OGN-PAW.latest.tgz
#
# Write Protect
#
echo "Mounting Disk RO"
sudo /root/mount_ro.bash
#
# Start service
#
echo "Start OGN Services"
sudo service rtlsdr-ogn start
Thx
Lee
-
Thanks Lee
I will create / run the script this evening
Ben.