Zyxel326 lost settings after reboot and other

nikolae
nikolae Posts: 13  Freshman Member
edited December 2019 in Personal Cloud Storage
Hello,

NAS Zyxel 326, don't know what version of linux is installed:
Linux storage 3.10.39 armv7l GNU/Linux

I have ssh access and after logon I see this message:
BusyBox v1.19.4 built-in shell (ash)

First I notice that, when I made some changes - crontab, edit config file, after nas reboots, changes are lost.
Is there any way to prevent this or somehow to put my settings at system startup?

For example I would like to use daily reports for my hdd smart status.
I make script to receive report and put in to crontab

11 18 * * * /path/hddreport.sh && /bin/cat /path/`date +\%Y-\%m-\%d`-hdd.txt | /usr/sbin/msmtp -a mailjet my@email
I make registration in maiiljet for this purpose. Everything works fine.

From other side, when nas is rebooted it's remember settings - disk volumes, ip's, users and etc...
I found this file, where there is a lot of options setting up, during reboot, but it is Read-only file system.

Have you got any idea, where I can make changes, so after reboot, they will be kept and worked?

Thanks in advance !


#NAS_Dec_2019

Best Answers

  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    Answer ✓
    The NAS is embedded linux system, which has it's own rules. The rootfilesystem is basically an achive embedded in the kernel, which is extracted to a ramdrive. So yes, every change is lost after reboot.
    There are several ways to get around. The most easy way is to install Tweaks, which gives you a way to add cron entries, and RandomTools, which gives you a way to run custom scripts.
    /i-data/sysvol/.PKG/RandomTools/etc/custom_startscripts/ behaves more or less like a 'normal' /etc/init.d/
    To install these packages first install MetaRepository.
  • nikolae
    nikolae Posts: 13  Freshman Member
    Answer ✓
    Hello,
    I put with wget http://http//zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/web_prefix 
    into /i-data/0...../admin
    Then login using web gui, select apps - all apps - refresh button twice, but Metarepo 
    doesn't show for install, only this message:Download List Success
    Can I put manually this file somewhere?
    http://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/NAS326/zypkg/5.21/MetaRepository_20181001_arm_015.zpkg
    and repo be loaded from there?
    So.. can you help me somehow to install it?

    Thanks in advance ! 
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    Answer ✓
    Any idea where I should put these line for example?

    That's a profile command. You have (at least) 2 options. If you login as admin or root and have installed Tweaks you can give the user a persistent homedir with the 'Change Homedir' tool, and put a .profile there, or, when you installed RandomTools you can put a file in /i-data/sysvol/.PKG/RandomTools/etc/profile.d/, as you can read in the end of /etc/profile


All Replies

  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    Answer ✓
    The NAS is embedded linux system, which has it's own rules. The rootfilesystem is basically an achive embedded in the kernel, which is extracted to a ramdrive. So yes, every change is lost after reboot.
    There are several ways to get around. The most easy way is to install Tweaks, which gives you a way to add cron entries, and RandomTools, which gives you a way to run custom scripts.
    /i-data/sysvol/.PKG/RandomTools/etc/custom_startscripts/ behaves more or less like a 'normal' /etc/init.d/
    To install these packages first install MetaRepository.
  • nikolae
    nikolae Posts: 13  Freshman Member
    Answer ✓
    Hello,
    I put with wget http://http//zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/web_prefix 
    into /i-data/0...../admin
    Then login using web gui, select apps - all apps - refresh button twice, but Metarepo 
    doesn't show for install, only this message:Download List Success
    Can I put manually this file somewhere?
    http://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/NAS326/zypkg/5.21/MetaRepository_20181001_arm_015.zpkg
    and repo be loaded from there?
    So.. can you help me somehow to install it?

    Thanks in advance ! 
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    You have to put the web_prefix file in \\<NAS>\admin\zy-pkgs\, or /i-data/../admin/zy-pkgs/
  • nikolae
    nikolae Posts: 13  Freshman Member
    edited December 2019
    For zyxel 326 it says:

    NAS326

    (Firmware 5.10+ only) On this NAS there is no subdirectory zy-pkgs in \\<NAS>\admin\. Just add it.

    I notice that should be in "zy-pkgs" folder - thanks !

    I put this files here: /i-data/040781d8/admin/zy-pkgs 
    ZYPKGS
    ZYPKG_INFO.tgz
    control.tar.gz  data.tar.gz (extracted)
    web_prefix

    Also in MetaRepository trying to add this line
    /i-data/sysvol/admin/zy-pkgs/ local
    but still can't see in apps or "Tweaks"

    So.. when metarepo is installed, other apps are stop working like "zcloud"  and "transmission" or I can remove zy-pkg folder it is only for install?

    /i-data/sysvol/.PKG/MetaRepository/etc/init.d
    this is folder that  I should use?
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    I put this files here:
    It doesn't hurt, but the only file needed is web_prefix. (Which, btw, is overwritten by MetaRepository). The rest of the files is ignored. MetaRepositorty creates a subdirectory here which contains it's own database.

    Also in MetaRepository trying to add this line
    /i-data/sysvol/admin/zy-pkgs/ local
    So you have it installed? In that case you only need to refresh the package list. If that doesn't show up more packages, there should be a logfile in \\<NAS>\admin\zy-pkgs\MetaRepository\, showing it's attempts to merge the repo's.
    Unless you have overwritten web_prefix after MetaRepository installed, in that case disable and enable MetaRepository to get the right web_prefix again.

    So.. when metarepo is installed, other apps are stop working like "zcloud"  and "transmission" or I can remove zy-pkg folder it is only for install?
    Nothing stops by default. MetaRepository is just a way to merge the ZyXEL repo with one or more other repos. So you get more packages, not other.
    And no, you can't remove the zy-pkgs folder. The web_prefix file is a detour for the firmware's package system, which is initially used to get MetaRepository installed, but the MR uses it to point to itself.

  • nikolae
    nikolae Posts: 13  Freshman Member
    Somehow with enable/disable it works. Now I can see both packages - zyxel and 3rd party.
    Crontab is working.
    Any idea where I should put these line for example?
    alias ll="ls -al" 


  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    Answer ✓
    Any idea where I should put these line for example?

    That's a profile command. You have (at least) 2 options. If you login as admin or root and have installed Tweaks you can give the user a persistent homedir with the 'Change Homedir' tool, and put a .profile there, or, when you installed RandomTools you can put a file in /i-data/sysvol/.PKG/RandomTools/etc/profile.d/, as you can read in the end of /etc/profile


  • nikolae
    nikolae Posts: 13  Freshman Member
    Using "change home dir" tool worked. Second method was not successful. 

    Thank you very much for the support !

Consumer Product Help Center