Author Topic: Update of station / remote login  (Read 8151 times)

PaulRuskin

Update of station / remote login
« 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

Admin

Re: Update of station / remote login
« Reply #1 on: December 08, 2017, 06:08:40 pm »
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.

Quote
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

Quote
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
« Last Edit: December 08, 2017, 06:10:23 pm by Admin »

PaulRuskin

Re: Update of station / remote login
« Reply #2 on: January 18, 2018, 09:04:20 am »
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

Admin

Re: Update of station / remote login
« Reply #3 on: January 18, 2018, 12:12:30 pm »
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

PaulRuskin

Re: Update of station / remote login
« Reply #4 on: January 18, 2018, 12:31:39 pm »
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


Admin

Re: Update of station / remote login
« Reply #5 on: January 18, 2018, 01:28:44 pm »
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

PaulRuskin

Re: Update of station / remote login
« Reply #6 on: January 18, 2018, 03:12:03 pm »
Thanks.

Low on the priority list though - it's just housekeeping.  I'll work around.

Paul

PaulRuskin

Re: Update of station / remote login
« Reply #7 on: January 18, 2018, 05:43:37 pm »
Found it.

It's in /etc/rc.local


    /usr/bin/hostnamectl set-hostname "ognpaw"
    /etc/init.d/avahi-daemon restart

Admin

Re: Update of station / remote login
« Reply #8 on: January 18, 2018, 08:59:33 pm »
Oh excellent
I will add this to a standard install, and make it configurable from the install script
Great find Paul

Thx
Lee

Admin

Re: Update of station / remote login
« Reply #9 on: January 19, 2018, 02:55:37 pm »
oh durrrhh
I already had this in the /etc/local - misunderstood you.

I will add this as part of the startup script

Thx
Lee

PaulRuskin

Re: Update of station / remote login
« Reply #10 on: January 27, 2018, 12:21:52 pm »
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

Admin

Re: Update of station / remote login
« Reply #11 on: January 28, 2018, 10:13:25 am »
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

PaulRuskin

Re: Update of station / remote login
« Reply #12 on: January 28, 2018, 11:13:55 am »
OK, thx

Are you doing anything special with the OGN software that means that a conventional OGN update would break it?

Paul

Admin

Re: Update of station / remote login
« Reply #13 on: January 28, 2018, 11:17:47 am »
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
Quote
50002  pi   /home/pi/rtlsdr-ogn  ./PilotAware-OGN.exe

Thx
Lee

Ben Smith

  • Engineering
  • Newbie
  • *
  • Posts: 39
  • Total likes: 1
  • Glider pilot, electronics engineer and Beekeeper.
    • View Profile
Re: Update of station / remote login
« Reply #14 on: January 28, 2018, 01:24:10 pm »
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.