ZyXEL NSA325v2 how to install new Samba (Entware-ng) and where to find it

24

All Replies

  • Mijzelf
    Mijzelf Posts: 2,980 image  Guru Member
    250 Answers 2500 Comments Friend Collector Eighth Anniversary

    Ouch. You are now hitting a weak spot of MetaRepository. As you know the download URL has changed some times. MR can handle that because it reads the installation logfiles, and exchanges the string downloads.nas-central.org by the URL where the package was downloaded. This way it's easy to set up just another mirror.

    Problems arise when you uninstall and reinstall a package. In that case the firmware package manager doesn't download the package, but re-uses the already downloaded zypkg file. Which means there is no URL in the logfile, and nothing is exchanged.

    No you have to either remove the zypkg file and reinstall Entware, or manually edit the startfile. I think the zypkg file is located in /home/admin/zy-pkgs/, and the startscript can be found in /usr/local/zy-pkgs/etc/init.d/.

  • tonytogna
    tonytogna Posts: 16 image  Freshman Member
    First Comment Friend Collector

    Hello, I tried by deleting the ZYPKGS, but I have the same problem.

    I tried to check the script, but I don't know where to change it. Ithink it goes wrong on these 2 wget

    local OKV=""

    if [ $PKG_OLDKERNEL -eq 1 ] ; then

    URL=${MIJZELF_URL}/installer

    OKV="-2.6.24"

    fi

    wget $URL/ld-2.22.so${OKV} -O /opt/lib/ld-2.22.so

    wget $URL/libc-2.22.so${OKV} -O /opt/lib/libc-2.22.so

  • Mijzelf
    Mijzelf Posts: 2,980 image  Guru Member
    250 Answers 2500 Comments Friend Collector Eighth Anniversary

    No. The problem is here, line 507:

    echo "Info: Basic packages installation..."
    [ $PKG_OLDKERNEL -eq 1 ] && sed -i "2isrc/gz Mijzelf ${MIJZELF_URL}" /opt/etc/opkg.conf
    /opt/bin/opkg update
    

    The 'sed' command here adds a line to the repository list of Entware-ng. That line contains a variable MIJZELF_URL, which has the wrong content. When you look upward, you can see this variable is extracted with some command line magic from PKG_DOWNLOAD_URL, which is set on line 23. That variable should have been changed by MetaRepository.

    This should be changed in 'http://zyxel.ddnss.eu/Users/Mijzelf/fw4' .

    And then there is a variable PKG_OLDKERNEL=0 on line 455. This should be 1, but I can't remember what is responsible doing so. It's not in this script, so somehow MR is responsible for that too. You should also change that.

  • tonytogna
    tonytogna Posts: 16 image  Freshman Member
    First Comment Friend Collector

    Thanks for your patience, I corrected line 23, line 455 was already correct. But I still have the problem.

    Looking at the log, it seems that it is not entering Mijzelf after Users, and therefore doesn't find the binaries.

    It seems is not doing this, but OLDKERNEL is set to 1, or may be MIJZELF_URL is not set correctly

        local MIJZELF_URL=$( dirname $( dirname ${PKG_DOWNLOAD_URL} ) )/Entware-ng/binaries/${CURARCH}
    
       local OKV=""
    if [ $PKG_OLDKERNEL -eq 1 ] ; then
    URL=${MIJZELF_URL}/installer
    OKV="-2.6.24"

    [15:41:18] --15:41:18-- http://zyxel.ddnss.eu/Users/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24

    [15:41:18] => `/opt/lib/ld-2.22.so'

    [15:41:18] Resolving zyxel.ddnss.eu... 158.101.164.98

    [15:41:19] Connecting to zyxel.ddnss.eu[158.101.164.98]:80... connected.

    [15:41:19] HTTP request sent, awaiting response... 404 Not Found

    [15:41:19] 15:41:19 ERROR 404: Not Found.

    [15:41:19]

    [15:41:19] --15:41:19-- http://zyxel.ddnss.eu/Users/Entware-ng/binaries/armv5/installer/libc-2.22.so-2.6.24

    [15:41:19] => `/opt/lib/libc-2.22.so'

    [15:41:19] Resolving zyxel.ddnss.eu... 158.101.164.98

    [15:41:19] Connecting to zyxel.ddnss.eu[158.101.164.98]:80... connected.

    [15:41:19] HTTP request sent, awaiting response... 404 Not Found

    [15:41:19] 15:41:19 ERROR 404: Not Found.

  • Mijzelf
    Mijzelf Posts: 2,980 image  Guru Member
    250 Answers 2500 Comments Friend Collector Eighth Anniversary

    You are right.

    dirname $( dirname ${PKG_DOWNLOAD_URL} )
    

    strips the mostright slash and what follows twice. So PKG_DOWNLOAD_URL should be 'http://zyxel.ddnss.eu/Users/Mijzelf/fw4/' . The difference is the added last slash.

  • tonytogna
    tonytogna Posts: 16 image  Freshman Member
    First Comment Friend Collector

    Finally thanks to You I managed to get Entware installed, but I had to add also a blank space after the last slash, I did in this way:

    $( dirname $( dirname ${PKG_DOWNLOAD_URL}' ' ) )
    

    But now I am getting a problem on 'libgnutls.so.28'

    I ran opkg update, it seems it went fine but when I ran opkg install zyxel-samba-replacement I got the error below, and now if I try also with the option update I get the same error on wget of libgnutils.so.28, can You please help me?

    root@NASAT :/usr/local/zy-pkgs/opt/bin# ./opkg update

    Downloading http://pkg.entware.net/binaries/armv5/Packages.gz

    Updated list of available packages in /opt/var/opkg-lists/packages

    Downloading http://zyxel.ddnss.eu/Users/Mijzelf/Entware-ng/binaries/armv5/Packages.gz

    Updated list of available packages in /opt/var/opkg-lists/Mijzelf

    root@NASAT :/usr/local/zy-pkgs/opt/bin# ./opkg install zyxel-samba-replacement

    Installing zyxel-samba-replacement (3.6.25) to root...

    Downloading http://zyxel.ddnss.eu/Users/Mijzelf/Entware-ng/binaries/armv5/zyxel-samba-replacement_3.6.25_all.ipk

    wget: can't load library 'libgnutls.so.28'

    Collected errors:

    * opkg_download: Failed to download http://zyxel.ddnss.eu/Users/Mijzelf/Entware-ng/binaries/armv5/zyxel-samba-replacement_3.6.25_all.ipk, wget returned 16.

    * opkg_install_pkg: Failed to download zyxel-samba-replacement. Perhaps you need to run 'opkg update'?

    * opkg_install_cmd: Cannot install package zyxel-samba-replacement.

  • Mijzelf
    Mijzelf Posts: 2,980 image  Guru Member
    250 Answers 2500 Comments Friend Collector Eighth Anniversary
    Answer ✓

    Now that is strange. gnuTLS is a TLS library, which provides encryption, and which for instance can be used for https connections. Didn't know wget could use it at all. But in your case it tries to download a file from a http server, so it shouldn't be needed.
    What happens if you download it manually and install it?

    wget http://zyxel.ddnss.eu/Users/Mijzelf/Entware-ng/binaries/armv5/zyxel-samba-replacement_3.6.25_all.ipk

    opkg install zyxel-samba-replacement_3.6.25_all.ipk

  • tonytogna
    tonytogna Posts: 16 image  Freshman Member
    First Comment Friend Collector

    With these commands it worked fine, and I assume Samba 2 is installed.

    However, I tried to see if the NAS was visible from Win 11, but even after running this enabling command, the NAS is not visible in the network.

    Set-SmbServerConfiguration -EnableSMB2Protocol $true

    Then on another PC with Win 10, I tried to disable SMB1, and at tht point it can non longer see te NAS shares.

    Is there a way to see if Samba 2 is really active on the NAS, please?

    Thanks

  • Mijzelf
    Mijzelf Posts: 2,980 image  Guru Member
    250 Answers 2500 Comments Friend Collector Eighth Anniversary

    If you have installed Tweaks, you have a 'Process Monitor' in the webinterface of Tweaks, which shows all running processes, including the full path of the running command. If /usr/sbin/smbd runs, it's the firmware samba. If it's /opt/sbin/smbd, it's Entware Samba.

    What do you mean by 'visible'? AFAIK the nas doesn't automatically popup in Explorer. You can only access it by typing \\<ip-of-nas>\ in the address bar (or, depending on your router \\<nas-name>\). Or you can create shortcuts or favourites pointing to that URL. Don't ask me how, when my W7 PC on some bad day suddenly run W8, I ditched Windows.

  • tonytogna
    tonytogna Posts: 16 image  Freshman Member
    First Comment Friend Collector

    Tweaks actually confirmware that the Samba replacement is running

    3264

    1

    root

    S

    5252

    1.0

    0.0

    /opt/sbin/smbd -D -s /opt/etc/samba/ZyXELSambaReplacement.conf

    3261

    1

    root

    S

    5212

    1.0

    0.0

    /opt/sbin/nmbd -D -s /opt/etc/samba/ZyXELSambaReplacement.conf

    At this point the issue moves to Win11, becauase on Win10 I see the shares.

    Thanks anyway for having helped me.

Consumer Product Help Center