CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

Raspberry SD card read only mode.
https://forum.codesys.com/viewtopic.php?f=21&t=5890
Page 4 of 4

Author:  adv [ Thu Nov 09, 2017 10:47 am ]
Post subject:  Re: Raspberry SD card read only mode.

no i alreade changed this like you mentioned in your previous post:

Quote:
6.add/change to /etc/CODESYSControl.cfg

[SysFile]
FilePath.1=/etc/, 3S.dat
FilePath.2=/media/, *.app, *.crc

move CODESYSControl.cfg and 3S.dat to your new location - in my case /media/


I just change the entry to this:
Quote:
[SysFile]
FilePath.1=/etc/
FilePath.2=/media/, *.app, *.crc, 3S.dat


Still not working... :cry:

EDIT:
Missing license is just for Profinet right?!?!?

Author:  Edwin Schwellinger [ Thu Nov 09, 2017 11:16 am ]
Post subject:  Re: Raspberry SD card read only mode.

[SysFile]
FilePath.1=/media/, 3S.dat
FilePath.2=/media/, *.app, *.crc

if you see a message in the logger 'missing license file'
all fieldbus licenses/webvisu is missing.
You are using 3.5SP11 runtime - right?

BR
Edwin

Author:  adv [ Thu Nov 09, 2017 2:15 pm ]
Post subject:  Re: Raspberry SD card read only mode.

yes, 3.5.11.10:

Package-Info:
Code:
root
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=========================================
ii  codesyscontrol 3.5.11.10    all          V3.5.11.10, Do 10. Aug 12:28:26 CEST 2017


I recognize following and maybe that is a problem. In your instruction you said:
Quote:
5. change the runtime application directory to /media
sudo nano /etc/init.d/codesyscontrol
see screenshot
and change the location of PlcConfigFile
export PlcConfigFile=/media/CODESYSControl.cfg
and
cd /media/


In the screenshot i put my /etc/init.d/codesyscontrol.
I changed/added the yellow lines. The script is slightly diffrent then yours (see orange rectangle).
And i see that WORKDIR still pointing to /var/opt/codesys which is a unionfs (/var_org and /var_rw). So writing an boot image for example will not be stored remanent on the sd card (stored to /var_rw/opt/codesys which is a ramfs)?!?!

You said:
Quote:
...
2. all applications files are redirected to /media (Usb stick)
you should see Application.app, Application.crc visu directory etc on the USB Stick /media
...

and thats not the case. Maybe soming in the init.d script has changed which i have to pay attention on?!

Author:  Edwin Schwellinger [ Fri Nov 10, 2017 5:45 am ]
Post subject:  Re: Raspberry SD card read only mode.

Hi,

you mean everything works now (your license - missing license file) is solved?
I think the missing part is now:
Since 3.5SP11 the /etc/CODESYSControl.cfg is splittet in an fix part
CODESYSControl.cfg and Userpart CODESYSControl_User.cfg ... so if you do an download CODESYS add in CODESYSControl_User.cfg
the name of the Booproject for example.

[CmpSettings]
FileReference.0=SysFileMap.cfg, SysFileMap
FileReference.1=/etc/CODESYSControl_User.cfg

Maybe you addapt this already.

'and thats not the case. Maybe soming in the init.d script has changed which i have to pay attention on?!'
Could you please check if on your /media/PlcLogic Directory after downloading the application you see Application/Application.app and Application.crc?



BR
Edwin

Author:  adv [ Fri Nov 10, 2017 9:38 am ]
Post subject:  Re: Raspberry SD card read only mode.

no, license still dont work! :cry: :cry: :cry:


Quote:
Since 3.5SP11 the /etc/CODESYSControl.cfg is splittet in an fix part
CODESYSControl.cfg and Userpart CODESYSControl_User.cfg ... so if you do an download CODESYS add in CODESYSControl_User.cfg
the name of the Booproject for example.


1.) I changed the WORKDIR variable in the init.d script to /media/var/opt/codesys. Then i created the directorys and copied all files from /var/opt/codesys to it.

2.) I copied the file /etc/CODESYSControl_User.cfg to /media/CODESYSControl_User.cfg

3.) I changed the path /etc/CODESYSControl_User.cfg to /media/CODESYSControl_User.cfg in the configuration file /media/CODESYSControl.cfg

After reboot CODESYS starts normally, but still with the licence issue. Downloading an application successfully creates the directoy /media/var/opt/codesys/PlcLogic/Application and the files "Application.app and Application.crc".
As expected, in the directoy /var/opt/codesys/PlcLogic nothing is created.

After 2nd reboot i can go online and the application is running!

So "only" the license issue is still a problem... :cry:

Author:  Edwin Schwellinger [ Fri Nov 10, 2017 5:17 pm ]
Post subject:  Re: Raspberry SD card read only mode.

Hi,
you mean only the fieldbus licenses are the problem or do you mean the plc license (2h Limitation)
ist still not working?

BR
Edwin

Author:  adv [ Mon Nov 13, 2017 7:26 am ]
Post subject:  Re: Raspberry SD card read only mode.

Only the Profinet (and OPC-UA, which i dont use).... The Raspy was running through the weekend and i just logged in without problems... These are the warning and errors from the log (screenshot):

EDIT:
2nd screenshot with information entries... (note the "runtime licensed" entry at line 5...)

P.S.: The timestamps are not correct, because the clock of the Pi are not set correctly (no RTC, no internet connection)...

Author:  Edwin Schwellinger [ Mon Nov 13, 2017 7:29 am ]
Post subject:  Re: Raspberry SD card read only mode.

Hi,
license file 3S.dat is still not accessible...
did you move/copy it from /etc/ to your new runtime location?
BR
Edwin

Author:  adv [ Mon Nov 13, 2017 7:43 am ]
Post subject:  Re: Raspberry SD card read only mode.

Yes!

My new location is /media (mounted to the rw-partition):
Code:
:/media# ls -la
total 56
drwxrwxrwx  5 root root  4096 Oct 29  2017 .
drwxr-xr-x 25 root root  4096 Oct 26 08:53 ..
-rw-r--r--  1 root root   158 Jan 19  2017 3S.dat
-rw-------  1 root root    47 Sep  7 17:06 .bash_history
-rw-r--r--  1 root root   570 Sep  7 17:06 .bashrc
-rw-r--r--  1 root root   760 Oct 29  2017 CODESYSControl.cfg
-rw-r--r--  1 root root   242 Oct 26 08:57 CODESYSControl_User.cfg
drwx------  2 root root 16384 Sep  7 16:26 lost+found
drwxr-xr-x  2 root root  4096 Sep  7 17:06 .nano
drwxr-xr-x  3 root root  4096 Oct 26  2017 opt
-rw-r--r--  1 root root   148 Sep  7 17:06 .profile


I also tried both CODESYSControl.cfg:
Code:
:/media# cat CODESYSControl.cfg
[SysFile]
FilePath.1=/etc/, 3S.dat
FilePath.2=/media/, *.app, *.crc
PlcLogicPrefix=1

...


and

Code:
:/media# cat CODESYSControl.cfg
[SysFile]
FilePath.1=/etc/,
FilePath.2=/media/, *.app, *.crc, 3S.dat
PlcLogicPrefix=1

...



License dont work either... :cry:

Author:  Edwin Schwellinger [ Mon Nov 13, 2017 9:51 am ]
Post subject:  Re: Raspberry SD card read only mode.

Hi,
this should work if the 3S.dat is in /etc

[SysFile]
FilePath.1=/etc/, 3S.dat
FilePath.2=/media/, *.app, *.crc
PlcLogicPrefix=1

BR
Edwin

Author:  adv [ Tue Nov 14, 2017 7:30 am ]
Post subject:  Re: Raspberry SD card read only mode.

Finally it woks! Thank you!

But then your instructions are wrong Mr. Schwelliger?!

You wrote:
Quote:
6.add/change to /etc/CODESYSControl.cfg

[SysFile]
FilePath.1=/etc/, 3S.dat
FilePath.2=/media/, *.app, *.crc

move CODESYSControl.cfg and 3S.dat to your new location - in my case /media/

I moved that files! Thats the reason because 3S.dat was not in /etc/ anymore...


Also i did not understand why changing the CODESYSControl.cfg (see below) not worked?!
Code:
:/media# cat CODESYSControl.cfg
[SysFile]
FilePath.1=/etc/,
FilePath.2=/media/, *.app, *.crc, 3S.dat
PlcLogicPrefix=1


Anyhow, thank you for your support!

Regards,
adv

Author:  Carsten [ Fri Jun 22, 2018 7:57 am ]
Post subject:  Re: Raspberry SD card read only mode.

Hi all,

ist this procedure still working with actual versions of codesys / Raspbian?

I am experiencing a defective linux installation after power off, and would
like to make the system read-only too. I am not, however, very familiar with
linux systems.

Author:  syoma [ Wed Jul 04, 2018 11:24 am ]
Post subject:  Re: Raspberry SD card read only mode.

Also would like to see a final instruction for Raspberry to make it read only for all cases, or better include such option in Codesys Runtime for PI directly.

Author:  Andreas_K [ Wed Nov 13, 2019 4:39 pm ]
Post subject:  Re: Raspberry SD card read only mode.

Dear Mr. Schwellinger

Is there an instruction from start to finish available?
Would be very interested since i want to use the RPi the same way with Codesys.

Thank you very much.

Andreas Kleiner

Page 4 of 4 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/