Community
OpenEnergyMonitor

Community

Stop EmonSD update on first boot


(Brian Orpin) #1

Hi Folks,

Could someone tell me how to stop EmonSD updating on first boot?

I’d like to get a 9.9.5 up and running first and then update it so I can test the upgrade to 9.9.7 issues.

Cheers

Brian


(Paul) #2

There is a file on the boot partition that contains the build version. This file is checked and only if the contents match with a hardcoded list in the emonpi firstboot updater will it run, you could fudge or delete that file content before inserting in the (emon)pi


(Glyn Hudson) #3

It’s a good idea to keep the emonSD build version present.

The first boot update looks for a file /home/pi/data/emonpiupdate.log, if you just manually create file (it can be empty) before booting for the first time then the first boot update won’t run. All the emonPi’s / emonBase we ship will have already run first boot update in the factory and won’t do it again.


(Brian Orpin) #4

Ok great

Useful to know but does that mean the nodes etc are created as well?

Done, I just wondered if it was something not to publicise!


(Glyn Hudson) #5

What do you mean by nodes are created?

No account is created in Emoncms at this stage therefore no Inputs will be present


(Brian Orpin) #6

Ah that may be an emonhub part of the process? So I see this when I update (although I have no idea what it is actually doing)

Start emonhub update script:

=================================
emonHub update started
=================================
emonhub.service already installed

Running emonhub automatic node addition script
EUID: 1000
EUID: 1000
[[5]]
Node 5 already present

(plus a whole load more nodes).

One of the problems I see, is that the update process does lots of different bits and understanding what is what is tricky!


(Paul) #7

Indeed, but only the FAT boot partition is accessible to all users before booting, you can only create that log file if you can mount the linux partition. Even windows users can edit the build version or rename the file and then put it back to how it was again, as the boot partition is editable on any PC.


(Brian Orpin) #8

There would be a benefit for testing of subsequent updates, if the auto update could be prevented. Perhaps a mechanism like the SSH enable, where a file could be created that the script checks for?

Just a thought.


(Glyn Hudson) #9

The node addition part of the emonhub update checks to see if any additional nodes need to be added to emonhub.conf. The latest image includes the latest version of emonhub.conf which includes the latest nodes. Therefore no additional node updates are required.