What's new

Entware after reboot

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

Jcconnell

Occasional Visitor
I seem to be having some trouble with entware. I've followed the wikis for enabling jffs, installing entware and also installing transmission. All of these installations proceed without a hitch...until I reboot.

After a reboot, the opkg command is no longer available and transmission is no longer available (either the daemon or the webgui).

When this first happened, I removed the directories in the /opt folder and attempted a reinstallation using the entware-setup.sh script. The script notified me of a previous installation (somewhat unexpected since i could not use opkg) and removed it. The installation script proceeded afterwards and completed successfully. I could then use opkg again until a reboot.

I installed entware on a 400mb ext3 partition of a 512mb thumdrive mounted as sdb. My only thought is that maybe the drive isn't mounted early enough in the boot sequence. I also have a 32gb microSD card installed as well.

Could anyone help me identify my problem?
 
Of course my answer was not for you, but for Jcconnell. After a firmware upgrade I had to reload the jffs scripts that I backed-up on my pc via winscp and then I tested them to be sure that the copies I used were ok.
At a subsequent boot they did not work and the reason was that I forgot to set the executable attribute. So it seems that, unlike in a standard linux terminal, in busybox from an ssh terminal it is possible to launch a script even if the exec attribute is not set.
 
Well, I determined that the jffs was being formatted on every reboot. I tried several things to fix it. I finally resolved the problem with the suggestion from post #3 of this thread: http://forums.smallnetbuilder.com/showthread.php?t=10425

I had not previously been aware of the script that was provided in the second post of this thread. Now that the jffs is working, I've tried using both it and the default one, yet I am still having issues.

After a reboot, I still cannot use opkg though. Any new ideas?
 
Sorry but no more ideas from me. Except for the problem I mentioned and that can't be addressed to anything else than my hurry, I never had a single problem with entware.
It looks like that you have a permission problem or an error in the boot mechanism. The last part has been developed by Merlin, as far as I know, so I guess that you should pose directly to him the question
 
Sorry but no more ideas from me. Except for the problem I mentioned and that can't be addressed to anything else than my hurry, I never had a single problem with entware.
It looks like that you have a permission problem or an error in the boot mechanism. The last part has been developed by Merlin, as far as I know, so I guess that you should pose directly to him the question

The script was actually created by ryzhov_al - I only did a few tweaks to it to make its output more informative.

Make sure you don't have multiple installations. Delete any asusware (and .asusware) file and folders that might be on your router from Download Master or Optware, as they would conflict.

Check file permissions for your scripts in /jffs/scripts. Make sure they are all executable.
 
I'm wondering if I'm using the services-start script incorrectly or if I haven't fully understood the examples.

Can anyone point me in another direction for examples?

Are there any relevant logs that I could check?
 
I'm wondering if I'm using the services-start script incorrectly or if I haven't fully understood the examples.

Can anyone point me in another direction for examples?

Are there any relevant logs that I could check?

Post the content of your script, along with its exact filename.

Also, did you make it executable?

Code:
chmod a+rx /jffs/scripts/services-start

You can test the script manually to ensure it does run. First, add a touch command to it (put it on the second line, after the initial shebang line):

Code:
touch /tmp/0000services-start

Then, run it manually:

Code:
/jffs/scripts/services-start

See if a file called 000services-start gets created in /tmp .
 
Thanks Merlin. I missed your posts until now. Before I could read them, I did a clean install. Wiped the NVRAM while powering on, and then again restored to factory defaults from the WebUI.

I reconfigured everything and attempted the Entware install. Still the same issue.

I noticed that there are no issues running the services-start script (default version) after an Entware installation but before rebooting. I get this error after trying to run the command again after a reboot: "/opt/etc/init.d/rc.unslung: line 34: /opt/bin/find: not found"
 
Did you check your disk for weak or bad sectors? You may try, instead of deleting the .asusware directory, to rename it to something else, such as .asusware_old and then reinstall entware and see if the error persists or at least changes.
 
On my RT-N66U with merlin firmware the find utility is located in /usr/bin so if that's the utility being executed then substitute the path /usr/bin/find for /opt/bin/find. BTW - I too cannot get Entware to start/load either.
 
I don't know if Merlin made any change to its wiki about entware, but Merlin assumed that the disk was formatted assigning it a label that is sdxx. If you formatted the disk on a linux system and not directly from the router using a gui application, as I did, the label is not automatically assigned, so in the Wiki instructions you have to substitute any reference to sdxx with the full path that is /tmp/mnt/......., or otherwise set a label that has the same name of the mount partition
 
Last edited:
I see in your first post that you have a micro sdhc card witch should be mounted as sda1 on every router reboot, I guess your 400mb ext3 partition of a 512mb thumdrive is not mounted as sdb1 every time, you should make some "mount" tests:
Code:
# mount
Code:
# reboot
Code:
# mount
again
Code:
# reboot
again
Code:
# mount
one more time.

If mount output is not always the same you should setup a script to mount your
400mb ext3 partition by device id.
Please post here your "mount" output.
Here is mine:
admin@RT-AC66U:/tmp/home/root# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
devfs on /dev type tmpfs (rw,noatime)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock5 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /tmp/mnt/sda1 type ext3 (rw,nodev,noatime,data=ordered)
nfsd on /proc/fs/nfsd type nfsd (rw)
admin@RT-AC66U:/tmp/home/root#
 
I continue to have issues and I can't figure out why.

I have now installed Entware using both methods listed in the Wiki, the easy and included script and the "old" way. It does not matter which method I use to install entware, after a reboot I can no longer call the opkg command.

I have checked for weak/bad sectors and the drive is good. I have also tried the installation on separate thumb drives and the problem is the same. I've formatted all the drives using gparted. I create two partitions on one drive- log and data. I install entware into the data partition. It usually mounts as /tmp/mnt/data.

"Find" is located in both /usr/bin as well as /opt/bin. Again, running the services-start script after the entware installation but prior to a reboot provides no errors. However, running it after a reboot provides the error shown above.

I have substituted steps from the wiki using sdx with the full path. As I said above, this path is typically /tmp/mnt/data.

To walk you guys through exactly what I'm doing:
-Fresh start from square one, clear nvram and restore factory default
-Enable JFFS, reboot
-SSH in to the router, cd to /tmp/mnt/data (partition 2 of the thumbdrive)
-entware-setup.sh
-choose /tmp/mnt/data to install too
-opkg list (to confirm installation)
-reboot
-On reboot, issue opkg list (this time, it's not available)

I've tried several variations of the above with no success. I don't know where to go next.
 
Here are the outputs of executing four mount commands. Looks like the /dev/sdb1 is always mounted as /tmp/mnt/data. Though, I still have suspicions that it's either taking too long to mount or perhaps /opt is not being mounted properly.

Mount #1:
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
devfs on /dev type tmpfs (rw,noatime)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /tmp/mnt/CRUZER16G type vfat (rw,nodev,noatime,fmask=0000,dmask=0000,codepage=cp437,iocharset=utf8,shortname=winnt,flush)
/dev/sdc1 on /tmp/mnt/Lexar type ext3 (rw,nodev,noatime,data=ordered)
/dev/sdb1 on /tmp/mnt/data type ext3 (rw,nodev,noatime,data=ordered)
/dev/sdb2 on /tmp/mnt/log type ext3 (rw,nodev,noatime,data=ordered)
Reboot.

Mount #2:
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
devfs on /dev type tmpfs (rw,noatime)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /tmp/mnt/CRUZER16G type vfat (rw,nodev,noatime,fmask=0000,dmask=0000,codepage=cp437,iocharset=utf8,shortname=winnt,flush)
/dev/sdb1 on /tmp/mnt/data type ext3 (rw,nodev,noatime,data=ordered)
/dev/sdb2 on /tmp/mnt/log type ext3 (rw,nodev,noatime,data=ordered)
/dev/sdc1 on /tmp/mnt/Lexar type ext3 (rw,nodev,noatime,data=ordered)
Reboot.

Mount #3:
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
devfs on /dev type tmpfs (rw,noatime)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /tmp/mnt/CRUZER16G type vfat (rw,nodev,noatime,fmask=0000,dmask=0000,codepage=cp437,iocharset=utf8,shortname=winnt,flush)
/dev/sdb1 on /tmp/mnt/data type ext3 (rw,nodev,noatime,data=ordered)
/dev/sdb2 on /tmp/mnt/log type ext3 (rw,nodev,noatime,data=ordered)
/dev/sdc1 on /tmp/mnt/Lexar type ext3 (rw,nodev,noatime,data=ordered)
Reboot.

Mount #4:
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
devfs on /dev type tmpfs (rw,noatime)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /tmp/mnt/CRUZER16G type vfat (rw,nodev,noatime,fmask=0000,dmask=0000,codepage=cp437,iocharset=utf8,shortname=winnt,flush)
/dev/sdc1 on /tmp/mnt/Lexar type ext3 (rw,nodev,noatime,data=ordered)
/dev/sdb1 on /tmp/mnt/data type ext3 (rw,nodev,noatime,data=ordered)
/dev/sdb2 on /tmp/mnt/log type ext3 (rw,nodev,noatime,data=ordered)
 
Well, by chance I have another RT-N66U arriving today. It's brand new.

I plan to open it up immediately to put the MicroSD card in there. Then flash Merlin's firmware and then attempt to install Entware.

I had previously installed download master on the current unit. I'm concerned that it is somehow causing my problems even after restoring factory settings. I'm hoping that starting with a brand new unit may yield better results.
 
Why don't you try to setup entware on microsd card only? remove all other usb devices.

This is how I have Entware installed on my development RT-N66U BTW. Never had any issue with it.

One thing I did however was to give a label to the SD card, to ensure it always gets mounted as /mnt/SD/ . Saves up a lot of trouble for scripts that will use absolute paths.
 

Sign Up For SNBForums Daily Digest

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