What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Entware broken after reboot

rnemec

New Around Here
Hi,

yesterday I've installed EntWare and in EntWare the imapfilter utility. Everything works fine until reboot. After reboot I've this line in syslog:

Jun 28 23:40:47 admin: Could not start Entware

and I noticed some broken symlinks like /opt which points to non-existing /tmp/opt. Also imapfilter is not working, if I try to run /tmp/mnt/sda1/entware/bin/imapfilter the error:

-sh: /tmp/mnt/sda1/entware/bin/imapfilter: not found

occurs. Can anyone tell me what need to be repaired and what need to be done for EntWare to survive reboot?
My firmware is last stable, i.e. 380.66_6.
 
Hi,

yesterday I've installed EntWare and in EntWare the imapfilter utility. Everything works fine until reboot. After reboot I've this line in syslog:

Jun 28 23:40:47 admin: Could not start Entware

and I noticed some broken symlinks like /opt which points to non-existing /tmp/opt. Also imapfilter is not working, if I try to run /tmp/mnt/sda1/entware/bin/imapfilter the error:

-sh: /tmp/mnt/sda1/entware/bin/imapfilter: not found

occurs. Can anyone tell me what need to be repaired and what need to be done for EntWare to survive reboot?
My firmware is last stable, i.e. 380.66_6.
How did you install Entware? Do you have a link to the tutorial?

From the error message 'Could not start Entware' I can tell that the start scripts are in the right place.
What's likely is that your USB device 'sda1' changed it's assigned name on the router.
If you look at the file /jffs/scripts/post-mount you'll see a line like this:
Code:
if [ "$1" = "/tmp/mnt/<device name>" ];then
<device name> should be your USB device (sda1 or whatever it is now).
Change it and reboot the router to apply.

If this is the case, I strongly recommend to give that USB device a label to make it unique, say 'thumbdrive' or so. Then change <device name> to whatever you set it and reboot the router.
 
I had the same problem a while ago.
Adding "sleep 30" at the beginning of services-start fixed the issue.
Seems like the usb thumbdrive wasn't mounted fast enough .
 
I had the same problem a while ago.
Adding "sleep 30" at the beginning of services-start fixed the issue.
Seems like the usb thumbdrive wasn't mounted fast enough .
A standard Entware entry in services start already has a 'sleep' function. It's the i=30 in this part:
Code:
i=30
until [ -x "$RC" ];do
   i=$(($i-1))
   if [ "$i" -lt 1 ];then
       logger "Unable to start Entware"
       exit
   fi
   sleep 1
done
The 30 which is the number of retries to find the device, while the 'sleep 1' is the one second sleep between the tries.
Increasing '30' to a higher number will do the same as adding another sleep before the function as you apparently did.

As for OP's problem, I'm sure they have another USB device plugged in and when rebooting the first device detected gets sda1, while the second gets sdb1 and so forth.
I have seen this many times with users of AB-Solution.
 
Checked /jffs/scripts/post-mount, there was sdb1. Labeled USB via tune2fs and after reboot everything is fine...Many thanks.
Haha, I was right!
 
A standard Entware entry in services start already has a 'sleep' function. It's the i=30 in this part:
Code:
i=30
until [ -x "$RC" ];do
   i=$(($i-1))
   if [ "$i" -lt 1 ];then
       logger "Unable to start Entware"
       exit
   fi
   sleep 1
done
The 30 which is the number of retries to find the device, while the 'sleep 1' is the one second sleep between the tries.
Increasing '30' to a higher number will do the same as adding another sleep before the function as you apparently did.

As for OP's problem, I'm sure they have another USB device plugged in and when rebooting the first device detected gets sda1, while the second gets sdb1 and so forth.
I have seen this many times with users of AB-Solution.

I did know that there was a sleep integrated in the NetWare startup. However for some reason my rt-ac56u take it's time to boot up everything. For my part, the only thing that really fixed it was adding the sleep time at start, before entware was started, to make things go smooth . I'll edit this post with the link to my old post where we found the solution appropriated to me.
Edit : here it is : www.snbforums.com/threads/entware-services-not-autostarting.23263/#post-171300
https://www.snbforums.com/threads/entware-after-reboot.10933/page-3
 
Last edited:
I did know that there was a sleep integrated in the NetWare startup. However for some reason my rt-ac56u take it's time to boot up everything. For my part, the only thing that really fixed it was adding the sleep time at start, before entware was started, to make things go smooth . I'll edit this post with the link to my old post where we found the solution appropriated to me.
This Entware entry in services-start has been debated several times.
Opinions differ on the merit of it being in that file and the sleep function being so high.
My experience and the users with thousands of installations through AB-Solution clearly speak for themselves. All installers, including AB's are doing it right, which is services-start and the 30 variable.
But then, there's always an exception with heavy user scripts additions.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top