What's new

[SOLVED] Does entware setup create services-start correctly using a second USB?

  • 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!

lordtech

Occasional Visitor
Hi,

I've installed entware-ng in my second USB (sdb1), and I was able to use it. I installed/used pyLoad and other app w/o problems. But when I did the first router reboot after the installation I noticed that the installed services do not start up. If I execute, for instance the follow code:

/opt/etc/init.d/rc.unslung start

I get a error message:

rc.unslung: not found

I have two USB hard disk attached to the router: sda1, and sdb1 which is where I installed entware-ng

So seems to me that there are some error in the mount process. Any advice?
 
I have two USB hard disk attached to the router: sda1, and sdb1 which is where I installed entware-ng

So seems to me that there are some error in the mount process. Any advice?
Label the usb devices. You can do this on the router with tune2fs. Without labels, the mount points are named based on availability. Probably what has happened is that if the one mounts before the other, what was sdb1 became sda1 and vice versa. Labeling them will give you static mount points.
 
Label the usb devices. You can do this on the router with tune2fs. Without labels, the mount points are named based on availability. Probably what has happened is that if the one mounts before the other, what was sdb1 became sda1 and vice versa. Labeling them will give you static mount points.

Hi jrmwvu04, I found in the forum the command blkid.
I run the command blkid and this what I get from the system:

Code:
blkid

Code:
/dev/sda1: LABEL="NAS1" UUID="6fb202c7-a000-5efc-f689-13b2a460bc41"
/dev/sdb1: LABEL="NAS2" UUID="9c772219-3a99-4766-81e9-39e77a24af04"

Entware-ng was installed in the device sdb1 labeled as NAS2.

So seems to me that the USB hard disk are already labeled. Am I right or there is something I am missing?
 
So seems to me that the USB hard disk are already labeled. Am I right or there is something I am missing?
Yeah, that looks right. Are they mounting as /tmp/mnt/NAS1 and /tmp/mnt/NAS2? And if so, is the entware launching code (assuming the typical setup) in the post-mount script referring to the correct one?
 
Yeah, that looks right. Are they mounting as /tmp/mnt/NAS1 and /tmp/mnt/NAS2? And if so, is the entware launching code (assuming the typical setup) in the post-mount script referring to the correct one?

Hi jrmwvu04, I just back from a long trip and want to resolve this issue with my Asus router. Could you point me out where I can found the post-mounting script so I can check the launching code? I guess therein lies the problem.
 
Hi jrmwvu04, I just back from a long trip and want to resolve this issue with my Asus router. Could you point me out where I can found the post-mounting script so I can check the launching code? I guess therein lies the problem.
Code:
/jffs/scripts/post-mount
 
Code:
/jffs/scripts/post-mount

Well, there are 3 scripts:

Code:
drwxr-xr-x    2 lordtech root             0 May 19 22:39 .
drwxr-xr-x   12 lordtech root             0 Jun 28 23:29 ..
-rwxr-xr-x    1 lordtech root         21449 May 18 21:51 amtm
-rwxr-xr-x    1 lordtech root            52 Jun  9 15:13 services-start
-rwxr-xr-x    1 lordtech root            42 May 29 22:14 services-stop

and no post-mount script. Why?? :(:(
 
Well, I ran the following code I found in the forum:

Code:
ln -sf /tmp/mnt/NAS2/entware /tmp/opt

So, the problem is since I do not have the post-mount script, the system does not create symbol links for /opt

Is there any post-mount script that I can download and then edit?
 
Well, I ran the following code I found in the forum:

Code:
ln -sf /tmp/mnt/NAS2/entware /tmp/opt

So, the problem is since I do not have the post-mount script, the system does not create symbol links for /opt

Is there any post-mount script that I can download and then edit?
Code:
#!/bin/sh

if [ "$1" = "/tmp/mnt/your-usb-drive" ] ; then
  ln -nsf $1/entware /tmp/opt
  /opt/etc/init.d/rc.unslung start
fi

That's the basic script that the entware installer makes. Change /tmp/mnt/your-usb-drive to match your correct path.
 
Code:
#!/bin/sh

if [ "$1" = "/tmp/mnt/your-usb-drive" ] ; then
  ln -nsf $1/entware /tmp/opt
  /opt/etc/init.d/rc.unslung start
fi

That's the basic script that the entware installer makes. Change /tmp/mnt/your-usb-drive to match your correct path.

Great, that solved my issue. Thanks jrmwvu04 for you valuable help
 

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!
Top