Can't install SMB V2 on NSA325

Options
Hi everyone,

Thanks to Mijzelf, I've been trying to install Entware-ng for long hours (to be able to use SMB2) but I'm running into trouble and starting to lose hope.

MetaRepository installed correctly, and when I try to install Entware-ng it activates but the logs are empty and the packages give a 404 error.
I then have to deactivate then reactivate Entware-ng to finally obtain the following logs with errors:

[03:53:07]     --03:53:07--  https://metarepository.tk/Users/Mijzelf/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24
[03:53:07]     => `/opt/lib/ld-2.22.so'
[03:53:07]     Resolving metarepository.tk... 188.40.49.47
[03:53:07]     Connecting to metarepository.tk[188.40.49.47]:443... connected.
[03:53:07]     
[03:53:07]     Unable to establish SSL connection.
[03:53:07]     
[03:53:07]     Unable to establish SSL connection.
[03:53:07]     --03:53:07--  https://metarepository.tk/Users/Mijzelf/Entware-ng/binaries/armv5/installer/libc-2.22.so-2.6.24
[03:53:07]     => `/opt/lib/libc-2.22.so'
[03:53:07]     Resolving metarepository.tk... 188.40.49.47
[03:53:07]     Connecting to metarepository.tk[188.40.49.47]:443... connected.
[03:53:07]     
[03:53:07]     Unable to establish SSL connection.
[03:53:07]     
[03:53:07]     Unable to establish SSL connection.
[03:53:07]     Info: Basic packages installation...
[03:53:07]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[03:53:07]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[03:53:07]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[03:53:07]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[03:53:07]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[03:53:07]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[03:53:07]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[03:53:07]     /opt/usr/lib/locale/locale-archive: No such file or directory
[03:53:07]     Info: Congratulations!
[03:53:07]     Info: If there are no errors above then Entware-ng was successfully initialized.
[03:53:07]     Info: Found a Bug? Please report at https://github.com/Entware-ng/Entware-ng/issues
[03:53:07] Execute /opt/etc/init.d/rc.unslung start
[03:53:07]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/etc/init.d/rc.unslung: not found
[03:53:07] Done /opt/etc/init.d/rc.unslung start
Closed logfile at Thu Dec 15 03:53:07 GMT 2022

When I log in by SSH as root and try the opkg update command, I get the error :
sh: opkg: not found

and if I try the command /opt/bin/opkg I get the error :
sh: /opt/bin/opkg: Input/output error


I don't know if this correlates, but my NSA says it's version 325 in the web interface, but on the NAS directly it says NSA325v2. I have already tried to install the firmware update for this model, it does not pass, but no problem for the update with the NSA325 model.

Do you have an idea? I despair...

Accepted Solution

  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options
    Oh sorry, I misread your listing. I assumed it was opkg which was failing, but it is the installer.
    Disable Entware-ng in the webinterface, then delete the contents of /usr/local/zy-pkgs/opt/. (This will trigger a new install after enabling Entware-ng again)
    Then edit /usr/local/zy-pkgs/etc/init.d/Entware-ng. Directly below the header there are 2 lines,
    The content of this lines is dynamically changed by MetaRepository, so I don't know exactly what is there in your script, but I think the latter is https://metarepository.tk/User/Mijzelf. That should be http:// . PKG_FIRMWARE should be 4, and I don't think that is wrong here.
    After you changed the lines enable Entware-ng again, it should install.
    Also, how can I install the profile-hook package from your repository? The opkg command does not work and I cannot find the package in the list :

    It is installed automatically by the installer. If not, execute
    /opt/bin/opkg update 
    /opt/bin/opkg install profile-hook

    The listing in the webinterface is a redirect to the Entware-ng package page. It doesn't show 3rth party repositories.

«134

All Replies

  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    https://metarepository.tk/Users/Mijzelf/...
    Unable to establish SSL connection.

    If you try that address in a browser you get a certificate error, because it uses the certificate of zyxel.diskstation.eu. Apparently opkg doesn't ignore that. The remedy is to use http instead.

    When I log in by SSH as root and try the opkg update command, I get the error :
    sh: opkg: not found
    The Entware environment is not injected in the ssh shell. To get that you'll have to install the package profile-hook from my repository.
  • TonyRambo
    TonyRambo Posts: 9
    First Anniversary First Comment
    edited January 2023
    Options
    Hello Mijzelf, thank you for your reply.

    Indeed, via the browser I can add an exception to the certificate error easily, and the address zyxel.diskstation.eu still remains unreachable.

    Being a beginner, especially in a Linux environment, I do not see how to force the use of http, because I launch the installation of Entware-ng directly via the web interface of the NAS.

    Is there a command line method or an option that I missed in the package management interface?

    EDIT : I tried changing the address from https to http of your repo via /usr/local/zy-pkgs/opt/etc # vi opkg.conf, then I reinstalled Entware-ng, it didn't change anything, the installation always uses https.

    src/gz packages http://pkg.entware.net/binaries/armv5
    src/gz Mijzelf http://metarepository.tk/Users/Mijzelf/Entware-ng/binaries/armv5
    dest root /
    dest ram /opt/tmp
    lists_dir ext /opt/var/opkg-lists
    option tmp_dir /opt/tmp


    Also, how can I install the profile-hook package from your repository? The opkg command does not work and I cannot find the package in the list :


    I feel like with all the failed attempts and NAS resets, I messed up the samba directory architecture...

    I thank you in advance for your help.




  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options
    Oh sorry, I misread your listing. I assumed it was opkg which was failing, but it is the installer.
    Disable Entware-ng in the webinterface, then delete the contents of /usr/local/zy-pkgs/opt/. (This will trigger a new install after enabling Entware-ng again)
    Then edit /usr/local/zy-pkgs/etc/init.d/Entware-ng. Directly below the header there are 2 lines,
    The content of this lines is dynamically changed by MetaRepository, so I don't know exactly what is there in your script, but I think the latter is https://metarepository.tk/User/Mijzelf. That should be http:// . PKG_FIRMWARE should be 4, and I don't think that is wrong here.
    After you changed the lines enable Entware-ng again, it should install.
    Also, how can I install the profile-hook package from your repository? The opkg command does not work and I cannot find the package in the list :

    It is installed automatically by the installer. If not, execute
    /opt/bin/opkg update 
    /opt/bin/opkg install profile-hook

    The listing in the webinterface is a redirect to the Entware-ng package page. It doesn't show 3rth party repositories.

  • TonyRambo
    Options
    Mijzelf said:
    Disable Entware-ng in the webinterface, then delete the contents of /usr/local/zy-pkgs/opt/. (This will trigger a new install after enabling Entware-ng again)
    Then edit /usr/local/zy-pkgs/etc/init.d/Entware-ng. Directly below the header there are 2 lines,
    The content of this lines is dynamically changed by MetaRepository, so I don't know exactly what is there in your script, but I think the latter is https://metarepository.tk/User/Mijzelf. That should be http:// . PKG_FIRMWARE should be 4, and I don't think that is wrong here.
    After you changed the lines enable Entware-ng again, it should install.
    Many thanks Mijzelf, it worked, I finally have access to the share volume in Windows 11!

    I was close to giving up, thanks again for your help!

  • TonyRambo
    Options
    Hello Mijzelf, sorry to bother you again.

    I had to restart my NSA after a full shutdown, and since then I can't access Windows shares anymore.
    I also can't access the forum on https://metarepository.tk/ (the site appears offline), and like a simpleton, I didn't write down the commands to try to reinstall/activate the smb remplacement.

    Nevertheless, on Wayback Machine I found the following commands dating back to 2019:



    I tried, but unfortunately the access still does not work, do you have an idea why?




  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    There is some known bug, the installer is supposed to create an /opt/var/run symlink to /tmp (or /run, does that exist?), and for some reason that sometimes fails, in which case smbd doesn't start. Could that be your problem?
  • TonyRambo
    TonyRambo Posts: 9
    First Anniversary First Comment
    edited February 2023
    Options
    Thank you for your reply,
    Unfortunately I don't know how to check this, nor how to solve it (a total beginner).
    Do you have any further instructions?
    I promise this time I'm taking notes :#

    edit : I tried the command :
    ln -s /opt/var/run /tmp
    Then the commands :
    chmod a+x /opt/etc/init.d/S08samba
    /opt/etc/init.d/S08samba stop
    chmod a-x /opt/etc/init.d/S08samba
    /opt/etc/init.d/S09ZyXELSambaReplacement start

    With the result :
    Stopping Samba daemons: nmbd smbd.
    Unfortunately the share access still does not work.
    However, I haven't changed anything before or after restarting the NSA, I don't understand.
    I don't think so but is it related to the fact that I can no longer access the metarepository.tk link? (this blocks the opkg update command)








  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    The script /opt/etc/init.d/S08samba should be disabled:
    sh a-x /opt/etc/init.d/S08samba

    Can you post the output of
    /opt/etc/init.d/S09ZyXELSambaReplacement stop
    /bin/sh -x /opt/etc/init.d/S09ZyXELSambaReplacement start


    I don't think so but is it related to the fact that I can no longer access the metarepository.tk link? (this blocks the opkg update command)
    You are right, it's not related.



  • TonyRambo
    TonyRambo Posts: 9
    First Anniversary First Comment
    edited February 2023
    Options
    Hi Mijzelf, and thank you for your reply.
    Here are the results of the commands:
    - /opt/etc/init.d/S09ZyXELSambaReplacement stop :
    sh: can't kill pid 17424: No such process
    sh: can't kill pid 17427: No such process
    Starting Samba daemons: nmbd smbd.

    - /bin/sh -x /opt/etc/init.d/S09ZyXELSambaReplacement start :

    + prgmname1=/opt/sbin/nmbd
    + prgmname2=/opt/sbin/smbd
    + configfile=/opt/etc/samba/ZyXELSambaReplacement.conf
    + nmbdpid=/opt/var/run/nmbd-ZyXELSambaReplacement.conf.pid
    + smbdpid=/opt/var/run/smbd-ZyXELSambaReplacement.conf.pid
    + basename /opt/etc/init.d/S09ZyXELSambaReplacement
    + [ S09ZyXELSambaReplacement = samba.sh ]
    + startreplacement
    + [ -f /etc/init.d/samba.replaced.sh ]
    + sh /etc/init.d/samba.sh stop
    Stopping Samba daemons: nmbd smbd.
    + mv /etc/init.d/samba.sh /etc/init.d/samba.replaced.sh
    + basename /opt/etc/init.d/S09ZyXELSambaReplacement
    + ln -s /opt/etc/init.d/S09ZyXELSambaReplacement /etc/init.d/samba.sh
    + [ -f /var/run/smbd.pid ]
    + ln -s /opt/var/run/smbd-ZyXELSambaReplacement.conf.pid /var/run/smbd.pid
    + [ -f /var/run/nmbd.pid ]
    + ln -s /opt/var/run/nmbd-ZyXELSambaReplacement.conf.pid /var/run/nmbd.pid
    + [ ! -h /opt/var/lock ]
    + sh /etc/init.d/samba.sh start
    + exit
    The command "sh a-x /opt/etc/init.d/S08samba" does not work, did you mean "chmod a-x /opt/etc/init.d/S08samba" instead?
  • Mijzelf
    Mijzelf Posts: 2,645  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    The command "sh a-x /opt/etc/init.d/S08samba" does not work, did you mean "chmod a-x /opt/etc/init.d/S08samba" instead?
    Yes, indeed.

    The startscript log looks good. If you are sure that samba is not running, can you give the output of

    /opt/etc/init.d/S09ZyXELSambaReplacement stop
    /opt/etc/init.d/S09ZyXELSambaReplacement start
    /bin/sh -x /etc/init.d/samba.sh start

    Background: 'S09ZyXELSambaReplacement start' calls '/etc/init.d/samba.sh stop' to stop the firmware samba. Then it replaces /etc/init.d/samba.sh by a symlink to itself, and then it calls '/etc/init.d/samba.sh start' to start Entware samba. So actually it calls itself. On start it looks if the it is started through the samba.sh daemon, and then starts Entware samba.
    This whole construction is needed because the firmware starts, restarts and stops samba through the /etc/init.d/samba.sh script, and we need to intercept that.

Consumer Product Help Center