Settings lost on reboot

Added by Rafa Tv almost 8 years ago


I got set Tvheadend to run on my computer and it works fine.

My problem is when the computer restarts, for some reason the settings are lost on reboot and I have to configure everything again every time when I turn the computer on.

I save the changes when the program is configurated but the computer loses the settings at start.

The TV-Tuner is new and I can return it to the store if I have problems but I can only do this a few days after purchased, so it is urgent.

Please, Can you help me?

Replies (6)

RE: Settings lost on reboot - Added by Andreas Timmer about 7 years ago


I have the same issue on a Thecus NAS N5550 and TVHeadEnd Version "3.5.65~gddc466c-dirty" (the most recent module I found).

It looks like the module is running as user root and the directory /root/.hts is recreated after NAS boot (appears to be ramdrive, but haven't checked it).
Does someone khow, how to change the configuration path to a save location like the module directory or how to start the module with a different user?


Andreas Timmer

Version Details:
HTS TvHeadEnd
Version :
Update Date : 2013-07-31
Developer : Stéphane
OS : ThecusOS 5 64bit

RE: Settings lost on reboot - Added by Rob Rob about 7 years ago

Sounds like a permissions issue and tvheadend hasn't been granted the required permissions to save to config file.

RE: Settings lost on reboot - Added by Andreas Timmer about 7 years ago

That was my first Suggestion. So I checked the Contents of the configuration.
  • After configuration of TVHeadEnd I found the file config and approximate 6 directories in "/root/.hts/tvheadend".
  • After a reboot I found only 1 directory in "/root/.hts/tvheadend". The remaining directory holds the Access configuration of TVHedEnd. Inside this directory there is the default access entry (User * is admin) only.

-> This doesn’t looks like a permission issue.

RE: Settings lost on reboot - Added by Rob Rob about 7 years ago

I don't mean a login issue/tvheadend access issue. I mean permission issues, as in file permissions/ownership on your system.

Make sure the hts user has been added to all relevant groups and has read/write access.

RE: Settings lost on reboot - Added by Andreas Timmer about 7 years ago

That I don't understand.

TVHeadEnd successfully create and change its configuration in "/root/.hts". I can see and open the configuration files. During configuration the following folders and files are created and can be opened:
  • /root/.hts/tvheadend/config
  • /root/.hts/tvheadend/accesscontrol/1 - 3
  • /root/.hts/tvheadend/autorec/1 - 4
  • /root/.hts/tvheadend/dvbadapters/_dev_dvb_adapter0_Sundtek_DVB_C__III_
  • /root/.hts/tvheadend/dvbmuxes/_dev_dvb_adapter0_Sundtek_DVB_C__III_/ ~30 files
  • /root/.hts/tvheadend/dvbtransports/ ~30 subfolder
  • /root/.hts/tvheadend/dvr/config + log folder
  • /root/.hts/tvheadend/epggrab/otamux

This is the proof, that the TVHeadEnd has all needed permissions to save it's configuration.

All files and folders are created from TVHeadEnd Web Configuration with root as owner and group. This show me TVHeadEnd is running as root user. This isn't my prefered user, but it has full access permission to the file system.
-> Where is the permission issue you mentioned?

I have TVHeadEnd installed on a NAS as module. The NAS module installation process uploaded the mod file and installed the module in one sequence without options to configure. For modules the NAS interface provide controles to start, stop, deinstall and install new modules only. For module configuration the TVHeadEnd module provide the web configuration on port 9981. There is no option to create or assign a module service user. I can configure the access to TVHeadEnd Web GUI only.

In NAS account management I can create user and groups. But there is no task to bind these NAS users to installed modules. To set another running account for the TVHeadEnd module I suggest I must change some start skripts. But I don't know which and where.

On startup of the NAS some POST messages show the folder /root is bound to device /dev/ram0. This show my suggest /root is mapped to a ram drive is true. This explains why the configuration is last after each shutdown or reboot.

Does anyone know, how to change the module installation to gain persistant configuration saves.

RE: Settings lost on reboot - Added by Rafa Tv about 7 years ago

Hello friends.

Finally I could solve my problem a long time ago. I do not even remembered this post.

I only had to disable the tvheaden service with the command:

# systemctl stop tvheadend

Followed by:

# systemctl disable tvheadend

Then you only have to configure tvheadend for be launched automatically at the system startup:

Good luck!