Issue installing Entware on NAS540 from Github wiki
![gsshelton](https://us.v-cdn.net/6029482/uploads/defaultavatar/nN4PAQRO7TCNP.jpg)
![](https://www.zyxel.com/library/assets/zyxel-forum/freshman_member.png)
![Third Anniversary](https://us.v-cdn.net/6029482/uploads/badges/ZAPPM3HN1WUA.png)
![First Comment](https://us.v-cdn.net/6029482/uploads/badges/MBNFIRD87YVH.png)
![Friend Collector](https://us.v-cdn.net/6029482/uploads/badges/HNJASEUSC535.png)
I have this firmware installed: V5.21(AATB.6)C0 which is the latest on the Zyxel site. The guide says firmware V5.21(BHAG.6)C0 or later is required. I'm not sure how the versioning works, but it would seem that the latest in on the Zyxel site is older than the required one?
This is the result of mount command after creating the two files and restarting:
Accepted Solution
-
I think you borked up your /i-data/.system/zy-pkgs/USRPKG_DEPS_START.If I take the scriplet I posted above, and assume that the contents of USRPKG_DEPS_START is---------------------------------------------------touch
<empty line>---------------------------------------------------then the output is exactly---------------------------------------------------- starting package "touch" ...
grep: /i-data/.system/zy-pkgs/touch: No such file or directory
---> Error: start-up program "/etc/init.d/touch" is not existed or not excutable
killall: zyxel_thumb_creator: no process killed
BusyBox v1.19.4 (2020-06-04 10:09:11 CST) multi-call binary.
Usage: basename FILE [SUFFIX]
- starting package "" ...
/etc/init.d/zypkg_controller.sh: line 411: /etc/init.d/: Permission denied
---> start "" failed.--------------------------------------------------So check it:cat /i-data/.system/zy-pkgs/USRPKG_DEPS_STARTIt should show entware
0
All Replies
-
I'm not sure how the versioning works
AFAIK the version string is major.minor(deviceid.revision)C0. That C0 is always C0, although it can be something different for a router, or something like that. Each NAS model has it's own deviceid, so the difference between V5.21(AATB.6)C0 and V5.21(BHAG.6)C0 can be NAS540 and NAS542.
(The deviceid is stored in flash, as part of the bootloader environment. When flashing firmware the flash script checks the stored deviceid against the id in the new firmware, and if it doesn't match, it errors out. It is possible to change the stored id to cross-flash firmwares. Of course you should only do that if you know what you are doing)
What is the output when you run (as root)
sh -x /i-data/.system/zy-pkgs/entware
0 -
Thanks again for helping me.
I ran the command sh -x /i-data/.system/zy-pkgs/entware and this is what was returned:+ VOL=ea6cc4e6+ mkdir -p /i-data/ea6cc4e6/opt+ mkdir -p /opt+ mount -o bind /i-data/ea6cc4e6/opt /opt+ /opt/etc/init.d/rc.unslung start+ echo export PATH=$PATH:/opt/bin:/opt/sbin+ exit 0I then ran mount again and it came back with the right file paths./i-data/ea6cc4e6/opt on /opt type none (rw,bind)
I get to the reboot step and when I run mount, the path is gone from the results.0 -
Hm. The instructions seem a bit faulty, to me. It's based on the start script /etc/init.d/zypkg_controller.sh, which does (on firmware V5.21(AASZ.0), but it has been this way since firmware 5.00) among other actions:
# - start to startup packages according to ${USRPKG_DEPS_START}
while read zypkg; do
bname=`basename ${zypkg}`
zypkg=${ZYPKG_PKG_SRC_PATH}/${bname}
Processed_Packages=${Processed_Packages}:${bname}
write_log "- starting package \"${bname}\" ..."
#ckeck ZYPKG_DEPS format
CHKVERSION=`grep "/i-data/" ${zypkg}`
if [ "$?" != "0" ]; then
PKGVOLPATH=`grep ${bname} ${PKGSTATUSFILE} |grep "Installed-Rule" |awk -F":" '{print $2}' |sed 's/\/
$//g' |sed 's/ //g'`
zypkg=${PKGVOLPATH}/etc/init.d/${bname}
fi
if [ ! -x ${zypkg} ]; then
write_log "---> Error: start-up program \"${zypkg}\" is not existed or not excutable"
else
${zypkg} startup
if [ "$?" == "0" ]; then
write_log "---> start \"${bname}\" successfully."
else
write_log "---> start \"${bname}\" failed."
fi
fi
done < ${USRPKG_DEPS_START}
As you can see ${USRPKG_DEPS_START} doesn't need to be executable, as the wiki states, though it doesn't hurt either. The entware script needs to be executable (if [ ! -x ${zypkg} ]; then error), which I can't find back in the wiki.
0 -
I look at the file permissions and this is what is returned-rwxrwxrwx 1 root root 155 Feb 27 14:13 USRPKG_DEPS_STARTlrwxrwxrwx 1 root root 52 Jan 27 22:51 WordPress -> /i-data/ea6cc4e6/.PKG/WordPress/etc/init.d/WordPress-rwxrwxrwx 1 root root 7133479 Jan 27 22:49 WordPress_4.4.1_arm_005.zpkg-rwxrwxrwx 1 root root 10733 Feb 28 20:32 ZYPKGS-rwxrwxrwx 1 root root 414 Feb 28 20:32 ZYPKG_DEPS-rwxrwxrwx 1 root root 290 Feb 27 16:26 entware
I had followed your suggestion from another post to make the entware script executable.
In the guide it says:Put a line in that file called
entware
. This is the name of the script that the system will run when it boots.
touch /i-data/.system/zy-pkgs/USRPKG_DEPS_START chmod +x /i-data/.system/zy-pkgs/USRPKG_DEPS_START echo entware > /i-data/.system/zy-pkgs/USRPKG_DEPS_START
Is the the last line the line that is being referred to or do you have to have a line all by itself with the word entware? Also, would the fact that the entware-ng package from the MetaRepository had previously been installed be an issue?0 -
Is the the last line the line that is being referred to
The script loops through all lines in USRPKG_DEPS_START, strips the directory from it, and puts /i-data/.system/zy-pkgs/ before it. If that file exists, and is executable, and contains the string '/i-data/', it's executed with the argument 'startup'.
You can add several lines for several scripts.
Also, would the fact that the entware-ng package from the MetaRepository had previously been installed be an issue?I wouldn't know how.
You can try to restart the package system by hand (as root), to see if it spits some errors.
Stop the packages with
/etc/init.d/zypkg_controller.sh stop
And then start with
/etc/init.d/zypkg_controller.sh start
0 -
Result of stopping the packages
/etc/init.d/zypkg_controller.sh stopStarting "/etc/init.d/zypkg_controller.sh".Stopping all zypkgs via "/etc/init.d/zypkg_controller.sh" ...- shutdowning package "pyLoad" ...grep: pyLoad: No such file or directory---> Error: shutdown program "/etc/init.d/pyLoad" is not existed or not excutable- shutdowning package "Tftp" ...grep: Tftp: No such file or directory---> Error: shutdown program "/etc/init.d/Tftp" is not existed or not excutable- shutdowning package "NFS" ...grep: NFS: No such file or directory---> Error: shutdown program "/etc/init.d/NFS" is not existed or not excutable- shutdowning package "SqueezeCenter" ...grep: SqueezeCenter: No such file or directory---> Error: shutdown program "/etc/init.d/SqueezeCenter" is not existed or not excutable- shutdowning package "ownCloud" ...grep: ownCloud: No such file or directory---> Error: shutdown program "/etc/init.d/ownCloud" is not existed or not excutable- shutdowning package "gallery" ...grep: gallery: No such file or directory---> Error: shutdown program "/etc/init.d/gallery" is not existed or not excutable- shutdowning package "WordPress" ...grep: WordPress: No such file or directory---> Error: shutdown program "/etc/init.d/WordPress" is not existed or not excutable- shutdowning package "PHP-MySQL-phpMyAdmin" ...grep: PHP-MySQL-phpMyAdmin: No such file or directory---> Error: shutdown program "/etc/init.d/PHP-MySQL-phpMyAdmin" is not existed or not excutable- shutdowning package "NZBGet" ...grep: NZBGet: No such file or directory---> Error: shutdown program "/etc/init.d/NZBGet" is not existed or not excutable- shutdowning package "Transmission" ...grep: Transmission: No such file or directory---> Error: shutdown program "/etc/init.d/Transmission" is not existed or not excutable- shutdowning package "Memopal" ...grep: Memopal: No such file or directory---> Error: shutdown program "/etc/init.d/Memopal" is not existed or not excutable- shutdowning package "GoogleDriveClient" ...grep: GoogleDriveClient: No such file or directorykill: you need to specify whom to killkill: you need to specify whom to kill---> shutdown "GoogleDriveClient" successfully.- shutdowning package "myZyXELcloud-Agent" ...grep: myZyXELcloud-Agent: No such file or directory/i-data/ea6cc4e6/.PKG/myZyXELcloud-Agent/etc/init.d/myZyXELcloud-Agent: line 136: zyshclient: not foundresponse: {"result":"success"}Successkillall: start_cloudagent.sh: no process killedkillall: set_upnp_to_router.sh: no process killedkillall: get_xmpp_info.sh: no process killedkillall: zyxel_device_register: no process killedkillall: identify: no process killedkillall: ffmpeg: no process killedkillall: check_binding_failed_list.sh: no process killedkillall: delete_user_binding_has_no_share.sh: no process killedkillall: delete_user_binding: no process killed---> shutdown "myZyXELcloud-Agent" successfully.- shutdowning package "DropboxClient" ...grep: DropboxClient: No such file or directory---> Error: shutdown program "/etc/init.d/DropboxClient" is not existed or not excutable- shutdowning package "#Create" ...grep: /i-data/.system/zy-pkgs/#Create: No such file or directory---> Error: shutdown program "/etc/init.d/#Create" is not existed or not excutable- shutdowning package "touch" ...grep: /i-data/.system/zy-pkgs/touch: No such file or directory---> Error: shutdown program "/etc/init.d/touch" is not existed or not excutableBusyBox v1.19.4 (2020-06-04 10:09:11 CST) multi-call binary.Usage: basename FILE [SUFFIX]- shutdowning package "" .../etc/init.d/zypkg_controller.sh: line 411: /etc/init.d/: Permission denied---> shutdown "" failed.---> start "Darkstat" successfully.---> start "MetaRepository" successfully.Stopping Plex Media Server...done---> start "PlexMediaServer" successfully.---> start "RandomTools" successfully.---> start "Tweaks" successfully.Finish "/etc/init.d/zypkg_controller.sh".
Result of starting them:/etc/init.d/zypkg_controller.sh startStarting "/etc/init.d/zypkg_controller.sh".Starting all zypkgs via "/etc/init.d/zypkg_controller.sh" ...- starting package "PHP-MySQL-phpMyAdmin" ...grep: PHP-MySQL-phpMyAdmin: No such file or directory---> Error: start-up program "/etc/init.d/PHP-MySQL-phpMyAdmin" is not existed or not excutable- starting package "gallery" ...grep: gallery: No such file or directory---> Error: start-up program "/etc/init.d/gallery" is not existed or not excutable- starting package "WordPress" ...grep: WordPress: No such file or directory---> Error: start-up program "/etc/init.d/WordPress" is not existed or not excutable- starting package "SqueezeCenter" ...grep: SqueezeCenter: No such file or directory---> Error: start-up program "/etc/init.d/SqueezeCenter" is not existed or not excutable- starting package "ownCloud" ...grep: ownCloud: No such file or directory---> Error: start-up program "/etc/init.d/ownCloud" is not existed or not excutable- starting package "NFS" ...grep: NFS: No such file or directory---> Error: start-up program "/etc/init.d/NFS" is not existed or not excutable- starting package "Tftp" ...grep: Tftp: No such file or directory---> Error: start-up program "/etc/init.d/Tftp" is not existed or not excutable- starting package "pyLoad" ...grep: pyLoad: No such file or directory---> Error: start-up program "/etc/init.d/pyLoad" is not existed or not excutable- starting package "NZBGet" ...grep: NZBGet: No such file or directory---> Error: start-up program "/etc/init.d/NZBGet" is not existed or not excutable- starting package "Transmission" ...grep: Transmission: No such file or directory---> Error: start-up program "/etc/init.d/Transmission" is not existed or not excutable- starting package "Memopal" ...grep: Memopal: No such file or directory---> Error: start-up program "/etc/init.d/Memopal" is not existed or not excutable- starting package "GoogleDriveClient" ...grep: GoogleDriveClient: No such file or directory---> start "GoogleDriveClient" successfully.- starting package "myZyXELcloud-Agent" ...grep: myZyXELcloud-Agent: No such file or directory---> start "myZyXELcloud-Agent" successfully.killall: zyxel_device_register: no process killedkillall: zyxel_xmpp_client: no process killedkillall: zyxel_enet_bridge: no process killed- starting package "DropboxClient" ...grep: DropboxClient: No such file or directory---> Error: start-up program "/etc/init.d/DropboxClient" is not existed or not excutablekillall: zyxel_file_monitor: no process killed- starting package "touch" ...grep: /i-data/.system/zy-pkgs/touch: No such file or directory---> Error: start-up program "/etc/init.d/touch" is not existed or not excutablekillall: zyxel_thumb_creator: no process killedBusyBox v1.19.4 (2020-06-04 10:09:11 CST) multi-call binary.Usage: basename FILE [SUFFIX]- starting package "" .../etc/init.d/zypkg_controller.sh: line 411: /etc/init.d/: Permission denied---> start "" failed.---> start "Darkstat" successfully.---> start "MetaRepository" successfully.Starting Plex Media Server...done---> start "PlexMediaServer" successfully.ln: /bin/man: File exists---> start "RandomTools" successfully.---> start "Tweaks" successfully.killall: pkg_httpd: no process killedkillall: pkg_httpd: no process killedkillall: pkg_httpd: no process killedFinish "/etc/init.d/zypkg_controller.sh".0 -
I think you borked up your /i-data/.system/zy-pkgs/USRPKG_DEPS_START.If I take the scriplet I posted above, and assume that the contents of USRPKG_DEPS_START is---------------------------------------------------touch
<empty line>---------------------------------------------------then the output is exactly---------------------------------------------------- starting package "touch" ...
grep: /i-data/.system/zy-pkgs/touch: No such file or directory
---> Error: start-up program "/etc/init.d/touch" is not existed or not excutable
killall: zyxel_thumb_creator: no process killed
BusyBox v1.19.4 (2020-06-04 10:09:11 CST) multi-call binary.
Usage: basename FILE [SUFFIX]
- starting package "" ...
/etc/init.d/zypkg_controller.sh: line 411: /etc/init.d/: Permission denied
---> start "" failed.--------------------------------------------------So check it:cat /i-data/.system/zy-pkgs/USRPKG_DEPS_STARTIt should show entware
0 -
USRPKG_DEPS_START was the problem. The guide is confusing on this step. I thought the following needed to be what was in USRPKG_DEPS_START and not just the word entware.
touch /i-data/.system/zy-pkgs/USRPKG_DEPS_START chmod +x /i-data/.system/zy-pkgs/USRPKG_DEPS_START echo entware > /i-data/.system/zy-pkgs/USRPKG_DEPS_START
Thanks again for all of your help!0 -
I spoke too soon. On reboot mount doesn't show the file path anymore and opkg returns an error. So misunderstood the directions and included the following lines in USRPKG_DEPS_START:
touch /i-data/.system/zy-pkgs/USRPKG_DEPS_START chmod +x /i-data/.system/zy-pkgs/USRPKG_DEPS_START echo entware > /i-data/.system/zy-pkgs/USRPKG_DEPS_START
So I rm the file, rebooted, remade the file and tried again. But when I go back into the file it still contains the above code! What am I doing wrong?0 -
I removed everything and started over. I get the the step to reboot, the file path exists, I create the shutdown scripts and I'm able to update opkg and install some packages. But then I reboot and the file path is gone, opkg returns an error and USRPKG_DEPS_START has the same code as above.
touch /i-data/.system/zy-pkgs/USRPKG_DEPS_START chmod +x /i-data/.system/zy-pkgs/USRPKG_DEPS_START echo entware > /i-data/.system/zy-pkgs/USRPKG_DEPS_START
This is the result of # cat /i-data/.system/zy-pkgs/USRPKG_DEPS_STARTtouch /i-data/.system/zy-pkgs/USRPKG_DEPS_STARTchmod +x /i-data/.system/zy-pkgs/USRPKG_DEPS_STARTecho entware > /i-data/.system/zy-pkgs/USRPKG_DEPS_START~ #0
Categories
- All Categories
- 414 Beta Program
- 2.2K Nebula
- 130 Nebula Ideas
- 88 Nebula Status and Incidents
- 5.4K Security
- 166 USG FLEX H Series
- 255 Security Ideas
- 1.4K Switch
- 71 Switch Ideas
- 999 Wireless
- 36 Wireless Ideas
- 6.2K Consumer Product
- 233 Service & License
- 370 News and Release
- 77 Security Advisories
- 24 Education Center
- 5 [Campaign] Zyxel Network Detective
- 2.9K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 80 About Community
- 69 Security Highlight