Issues in installing SMBv2 on NSA325V2

Options

Hello,

i am failing in installing SMBv2 on my NSA325v2. I followed the instructions given here:

, but i am not able to run opkg:

admin@NAS:~$ su
Password:
root@NAS:/home/shares# cd /opt/bin
root@NAS:/opt/bin# ./opkg update
sh: ./opkg: Input/output error

Looking at the logfiles provided by entware-ng, from my understanding entware-ng has not installed properly:

Opened logfile at Fri May  3 19:33:49 CEST 2024
Flushing memory buffer
    Starting up
    mv /usr/local/zy-pkgs/opt/var/log/Entware-ng.log.2.gz /usr/local/zy-pkgs/opt/var/log/Entware-ng.log.3.gz
    mv /usr/local/zy-pkgs/opt/var/log/Entware-ng.log.1.gz /usr/local/zy-pkgs/opt/var/log/Entware-ng.log.2.gz
Flushing done
[19:33:49] Create symlink /opt -> /usr/local/zy-pkgs/opt
[19:33:49] /opt/etc/init.d/rc.unslung is not available, start installer
[19:33:49]     Warning: Folder /opt/usr exists!
[19:33:49]     Warning: If something goes wrong please clean /opt folder and try again.
[19:33:49]     Warning: Folder /opt/bin exists!
[19:33:49]     Warning: If something goes wrong please clean /opt folder and try again.
[19:33:49]     Warning: Folder /opt/etc/init.d exists!
[19:33:49]     Warning: If something goes wrong please clean /opt folder and try again.
[19:33:49]     Warning: Folder /opt/lib/opkg exists!
[19:33:49]     Warning: If something goes wrong please clean /opt folder and try again.
[19:33:49]     Warning: Folder /opt/sbin exists!
[19:33:49]     Warning: If something goes wrong please clean /opt folder and try again.
[19:33:49]     Warning: Folder /opt/share exists!
[19:33:49]     Warning: If something goes wrong please clean /opt folder and try again.
[19:33:50]     Warning: Folder /opt/tmp exists!
[19:33:50]     Warning: If something goes wrong please clean /opt folder and try again.
[19:33:50]     Warning: Folder /opt/var/lock exists!
[19:33:50]     Warning: If something goes wrong please clean /opt folder and try again.
[19:33:50]     Warning: Folder /opt/var/run exists!
[19:33:50]     Warning: If something goes wrong please clean /opt folder and try again.
[19:33:50]     Info: Opkg package manager deployment...
[19:33:50]     --19:33:49--  http://pkg.entware.net/binaries/armv5/installer/opkg
[19:33:50]     => `/opt/bin/opkg'
[19:33:50]     Resolving pkg.entware.net... 158.160.45.54
[19:33:50]     Connecting to pkg.entware.net[158.160.45.54]:80... connected.
[19:33:50]     HTTP request sent, awaiting response... 200 OK
[19:33:50]     Length: 127,636 [application/octet-stream]
[19:33:50]     
[19:33:50]     0K .......... .......... .......... .......... .......... 40%  466.27 KB/s
[19:33:50]     50K .......... .......... .......... .......... .......... 80%  924.86 KB/s
[19:33:50]     100K .......... .......... ....                            100%  359.44 KB/s
[19:33:50]     
[19:33:50]     19:33:50 (542.27 KB/s) - `/opt/bin/opkg' saved [127636/127636]
[19:33:50]     
[19:33:50]     --19:33:50--  http://pkg.entware.net/binaries/armv5/installer/opkg.conf
[19:33:50]     => `/opt/etc/opkg.conf'
[19:33:50]     Resolving pkg.entware.net... 158.160.45.54
[19:33:50]     Connecting to pkg.entware.net[158.160.45.54]:80... connected.
[19:33:50]     HTTP request sent, awaiting response... 200 OK
[19:33:50]     Length: 142 [application/octet-stream]
[19:33:50]     
[19:33:50]     0K                                                       100%    1.35 MB/s
[19:33:50]     
[19:33:50]     19:33:50 (1.35 MB/s) - `/opt/etc/opkg.conf' saved [142/142]
[19:33:50]     
[19:33:50]     --19:33:50--  http://pkg.entware.net/binaries/armv5/installer/libgcc_s.so.1
[19:33:50]     => `/opt/lib/libgcc_s.so.1'
[19:33:50]     Resolving pkg.entware.net... 158.160.45.54
[19:33:50]     Connecting to pkg.entware.net[158.160.45.54]:80... connected.
[19:33:50]     HTTP request sent, awaiting response... 200 OK
[19:33:50]     Length: 55,220 [application/octet-stream]
[19:33:50]     
[19:33:51]     0K .......... .......... .......... .......... .......... 92%  431.03 KB/s
[19:33:51]     50K ...                                                   100%    6.23 MB/s
[19:33:51]     
[19:33:51]     19:33:51 (462.42 KB/s) - `/opt/lib/libgcc_s.so.1' saved [55220/55220]
[19:33:51]     
[19:33:51]     --19:33:51--  http://downloads.zyxel.nas-central.org/Users/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24
[19:33:51]     => `/opt/lib/ld-2.22.so'
[19:33:51]     Resolving downloads.zyxel.nas-central.org... failed: Host not found.
[19:33:51]     --19:33:51--  http://downloads.zyxel.nas-central.org/Users/Entware-ng/binaries/armv5/installer/libc-2.22.so-2.6.24
[19:33:51]     => `/opt/lib/libc-2.22.so'
[19:33:51]     Resolving downloads.zyxel.nas-central.org... failed: Host not found.
[19:33:51]     ln: ld-linux.so.3: File exists
[19:33:51]     ln: libc.so.6: File exists
[19:33:51]     Info: Basic packages installation...
[19:33:51]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[19:33:51]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[19:33:51]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[19:33:51]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[19:33:51]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[19:33:51]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[19:33:51]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
[19:33:51]     /opt/usr/lib/locale/locale-archive: No such file or directory
[19:33:51]     Info: Congratulations!
[19:33:51]     Info: If there are no errors above then Entware-ng was successfully initialized.
[19:33:51]     Info: Found a Bug? Please report at https://github.com/Entware-ng/Entware-ng/issues
[19:33:51] Execute /opt/etc/init.d/rc.unslung start
[19:33:51]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/etc/init.d/rc.unslung: not found
[19:33:51] Done /opt/etc/init.d/rc.unslung start
Closed logfile at Fri May 3 19:33:51 CEST 2024

Can somone tell my where the reference to downloads.zyxel.nas-central.org is originated from and where it can be fixed to a proper URL?

All Replies

  • Mijzelf
    Mijzelf Posts: 2,638  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    The reference to downloads.zyxel.nas-central.org is in /usr/local/zy-pkgs/etc/init.d/Entware-ng. It is supposed to be exchanged by MetaRepository to the origin of the Entware package, but that fails when the package was cached. (Then MR doesn't know the origin).

    You can change it in the script, at line 23, (it should be http://zyxel.diskstation.eu/Users/Mijzelf, judging to line 485), clear the content of /opt, and dis- and enable the Entware package. It should re-install.

  • FR12
    FR12 Posts: 4
    Friend Collector First Comment
    Options

    Hi @Mijzelf ,

    thanks for your answer. Unfortuntely I still cannot get it working. I modified the script a you described:

    Then I disabled the entware package, cleared /opt/* and enabled the package again. The logfile states that the setup is using a malformed URL. For me it looks like an escaping issue, but I can't figure where it comes from:
    Opened logfile at Sat May 4 15:28:48 CEST 2024

    Flushing memory buffer
    
        Starting up
    
    Flushing done
    
    [15:28:48] Create symlink /opt -> /usr/local/zy-pkgs/opt
    
    [15:28:48] /opt/etc/init.d/rc.unslung is not available, start installer
    
    [15:28:48]     Info: Opkg package manager deployment...
    
    [15:28:48]     --15:28:48--  http://pkg.entware.net/binaries/armv5/installer/opkg
    
    [15:28:48]     => `/opt/bin/opkg'
    
    [15:28:48]     Resolving pkg.entware.net... 158.160.45.54
    
    [15:28:48]     Connecting to pkg.entware.net[158.160.45.54]:80... connected.
    
    [15:28:48]     HTTP request sent, awaiting response... 200 OK
    
    [15:28:48]     Length: 127,636 [application/octet-stream]
    
    [15:28:48]     
    
    [15:28:48]     0K .......... .......... .......... .......... .......... 40%  433.65 KB/s
    
    [15:28:48]     50K .......... .......... .......... .......... .......... 80%  856.82 KB/s
    
    [15:28:48]     100K .......... .......... ....                            100%  286.66 KB/s
    
    [15:28:48]     
    
    [15:28:48]     15:28:48 (480.09 KB/s) - `/opt/bin/opkg' saved [127636/127636]
    
    [15:28:48]     
    
    [15:28:48]     --15:28:48--  http://pkg.entware.net/binaries/armv5/installer/opkg.conf
    
    [15:28:48]     => `/opt/etc/opkg.conf'
    
    [15:28:48]     Resolving pkg.entware.net... 158.160.45.54
    
    [15:28:48]     Connecting to pkg.entware.net[158.160.45.54]:80... connected.
    
    [15:28:49]     HTTP request sent, awaiting response... 200 OK
    
    [15:28:49]     Length: 142 [application/octet-stream]
    
    [15:28:49]     
    
    [15:28:49]     0K                                                       100%    1.35 MB/s
    
    [15:28:49]     
    
    [15:28:49]     15:28:49 (1.35 MB/s) - `/opt/etc/opkg.conf' saved [142/142]
    
    [15:28:49]     
    
    [15:28:49]     --15:28:49--  http://pkg.entware.net/binaries/armv5/installer/libgcc_s.so.1
    
    [15:28:49]     => `/opt/lib/libgcc_s.so.1'
    
    [15:28:49]     Resolving pkg.entware.net... 158.160.45.54
    
    [15:28:49]     Connecting to pkg.entware.net[158.160.45.54]:80... connected.
    
    [15:28:49]     HTTP request sent, awaiting response... 200 OK
    
    [15:28:49]     Length: 55,220 [application/octet-stream]
    
    [15:28:49]     
    
    [15:28:49]     0K .......... .......... .......... .......... .......... 92%  430.49 KB/s
    
    [15:28:49]     50K ...                                                   100%    5.28 MB/s
    
    [15:28:49]     
    
    [15:28:49]     15:28:49 (461.41 KB/s) - `/opt/lib/libgcc_s.so.1' saved [55220/55220]
    
    [15:28:49]     
    
    [15:28:49]     --15:28:49--  http://zyxel.diskstation.eu/Entware-ng/binaries/armv5/installer/ld-2.22.so-2.6.24
    
    [15:28:49]     => `/opt/lib/ld-2.22.so'
    
    [15:28:49]     Resolving zyxel.diskstation.eu... 158.101.164.98
    
    [15:28:49]     Connecting to zyxel.diskstation.eu[158.101.164.98]:80... connected.
    
    [15:28:49]     HTTP request sent, awaiting response... 404 Not Found
    
    [15:28:49]     15:28:49 ERROR 404: Not Found.
    
    [15:28:49]     
    
    [15:28:49]     --15:28:49--  http://zyxel.diskstation.eu/Entware-ng/binaries/armv5/installer/libc-2.22.so-2.6.24
    
    [15:28:49]     => `/opt/lib/libc-2.22.so'
    
    [15:28:49]     Resolving zyxel.diskstation.eu... 158.101.164.98
    
    [15:28:49]     Connecting to zyxel.diskstation.eu[158.101.164.98]:80... connected.
    
    [15:28:49]     HTTP request sent, awaiting response... 404 Not Found
    
    [15:28:49]     15:28:49 ERROR 404: Not Found.
    
    [15:28:49]     
    
    [15:28:49]     Info: Basic packages installation...
    
    [15:28:49]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
    
    [15:28:49]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
    
    [15:28:49]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
    
    [15:28:49]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
    
    [15:28:49]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
    
    [15:28:49]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
    
    [15:28:49]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/bin/opkg: Input/output error
    
    [15:28:49]     /opt/usr/lib/locale/locale-archive: No such file or directory
    
    [15:28:49]     Info: Congratulations!
    
    [15:28:49]     Info: If there are no errors above then Entware-ng was successfully initialized.
    
    [15:28:49]     Info: Found a Bug? Please report at https://github.com/Entware-ng/Entware-ng/issues
    
    [15:28:49] Execute /opt/etc/init.d/rc.unslung start
    
    [15:28:49]     /usr/local/zy-pkgs/etc/init.d/Entware-ng: line 596: /opt/etc/init.d/rc.unslung: not found
    
    [15:28:49] Done /opt/etc/init.d/rc.unslung start
    
    Closed logfile at Sat May 4 15:28:49 CEST 2024
    


  • FR12
    FR12 Posts: 4
    Friend Collector First Comment
    Options

    I think I did break up something 😱:

    Opened logfile at Sat May  4 16:11:15 CEST 2024
    
    Flushing memory buffer
    
        Starting up
    
        mv /usr/local/zy-pkgs/opt/var/log/Entware-ng.log.1.gz /usr/local/zy-pkgs/opt/var/log/Entware-ng.log.2.gz
    
    Flushing done
    
    [16:11:15] FATAL: /opt is a directory
    

    Closed logfile at Sat May 4 16:11:15 CEST 2024
    Any help how to fix this is appreciated

  • Mijzelf
    Mijzelf Posts: 2,638  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    My bad. I overlooked the 'dirname' on line 485:

    local MIJZELF_URL=$( dirname $( dirname ${PKG_DOWNLOAD_URL} ) )/Entware-ng/binaries/${CURARCH}
    

    It calls dirname twice, which means it strips the last two subdirectories from the URL. So http://zyxel.diskstation.eu/Users/Mijzelf should be http://zyxel.diskstation.eu/Users/Mijzelf/dir1/dir2

    The called URL http://zyxel.diskstation.eu/Entware-ng/binaries/armv5/installer/libc-2.22.so-2.6.24should be http://zyxel.diskstation.eu/Users/Mijzelf/Entware-ng/binaries/armv5/..., as you can see in your browser. So indeed 2 directories are skipped.

    About the 'FATAL: /opt is a directory', just reboot. The root filesystem is a ramdrive, so this won't survive.

  • FR12
    FR12 Posts: 4
    Friend Collector First Comment
    Options

    Thank you so much for your help @Mijzelf, now it is working and I was able to install SMBv2

    Just one more question:

    When I bought this NAS (~10years ago) I installed some Software on a USB-Drive and I installed some tool that did shut down the NAS after 15 minutes of inactivity. I have no idea how it used to work, but now it does not work anymore. Do you have any idea about that?

  • Mijzelf
    Mijzelf Posts: 2,638  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options

    The Tweaks package has an option to shutdown the NAS on inactivity. If that is still installed, but doesn't work anymore, have a look at the status of the Shutdown Daemon. It should tell why it doesn't shutdown the box.

Consumer Product Help Center