DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-03-12 23:18:45

haim
Member
Registered: 2010-01-13
Posts: 83

Optware/lib folder missing on reboot.

I've had optware installed for a while, with a few things installed.

Then suddenly I couldn/t run anything with it, getting

nano: can't load library 'libncurses.so.5'

So I had a look and the whole opt/lib directory was gone!

I reinstalled optware and things worked again, but now after a reboot the lib directory is gone again!!

Only thing I think i've done is install the firefly add-on, thats the official one with firmware 1.08.

Has anyone seen this before?

Offline

 

#2 2010-03-13 00:14:33

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: Optware/lib folder missing on reboot.

/opt folder only exist in ram. The optware howto describes howto recreate it on boot.

Offline

 

#3 2010-03-13 00:45:42

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Optware/lib folder missing on reboot.

The contents of /opt are actually on the hard disk.
You have to do at least the following:

Code:

# Hook up Optware
mkdir -p /opt
mount --bind /mnt/HD_a2/ipkg/opt /opt

I have the above lines in my /ffp/etc/fun_plug.local script.  They create the /opt mount point that you are missing.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#4 2010-03-13 11:53:24

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Optware/lib folder missing on reboot.

The mount point is still there.  I've got
mkdir -p /opt
mount --bind /mnt/HD_a2/ipkg/opt /opt

in my fun_plug script on the root volume_1

It seems that a reboot by the terminal doesn't make it disappear and a hard reboot does....though that may be coincidental.

Wheres the best place to look for logs, I only know about ffp.log and I get this

**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****
Sat Mar 13 07:03:30 GMT 2010
ln -snf /mnt/HD_a2/ffp /ffp
* Running /ffp/etc/fun_plug.init ...
* Running /ffp/etc/rc ...
* /ffp/start/syslogd.sh inactive
* /ffp/start/SERVERS.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/unfsd.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/ntpd.sh inactive
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh inactive
* /ffp/start/sshd.sh ...
Starting /ffp/sbin/sshd
* /ffp/start/rsyncd.sh inactive
* /ffp/start/optware.sh ...
    ln -snf /mnt/HD_a2/ipkg/opt /opt
* /ffp/start/mediatomb.sh inactive
* /ffp/start/kickwebs.sh inactive
* /ffp/start/lighttpd.sh inactive
* /ffp/start/inetd.sh inactive
*  OK


%%%%%%%

Can't see anything about my start up scripts in optware running so perhaps the lib folder is already gone.
Note that all the other opt folders look fine, .conf and script files made by me are still there.

I really don't get why this folder is disappearing.  I haven't got any auto backups running that my sync it away and I don't see how the firefly server could be removing it.  I'll try that next, stopping and removing firefly and see if the lib folder will stay there.  First gotta reinstall optware though!!

Offline

 

#5 2010-03-14 20:06:08

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Optware/lib folder missing on reboot.

Hmm, I must have not installed optware correctly, as I do not use the /ffp/start/optware.sh script.  I do most of what optware_start() does in my funplug_local script.  I can't remember why I did that; I might go back to using the optware start script.

I can't think of a reason why /opt/lib would vanish.

One odd thing is that you say you are doing the mount --bind onto /opt in the fun_plug script, but then you are also running /ffp/start/optware.sh which is doing "ln -snf /mnt/HD_a2/ipkg/opt /opt".  This seems conflicting, as both commands are doing something to /opt.  I can't say that it is the reason for the /opt/lib problem, but it is worth cleaning up.  I'd take the mount --bind out of fun_plug.

Your log shows that optware.sh is running and it prints out "ln -snf /mnt/HD_a2/ipkg/opt /opt".  The next thing that optware_start() does is run the scripts in /opt/etc/init.d.  You should get one line of log output for each script in there, either to say that the script is running or that it is inactive.  I don't see any output in your log.  And if there was not /opt/etc/init.d, you would have gotten an "optware not installed" message. 

So, I bet that doing the symlink and the mount of /opt is messing things up here.

Again, I would take out the mount in fun_plug and try it.  If that does not work, try changing OPTWARE_USE_SYMBOLIC_LINK="1" to 0 in optware.sh.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#6 2010-03-16 13:48:20

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Optware/lib folder missing on reboot.

Sorry, should have updated this.

Before your post I thought of the same issue.  I had been a lazy bugger and not looked at the start script for optware and didn't realise what it was up to.  Serves me right.

I can't see exactly what it might be doing to mess it up but figure that must be the problem.
I had removed my optware install and the bind stuff in the fun_plug script and then used optware.sh to install.  I had to play around with the script by hard coding the optware funplug file as the code to work out the file name wasn't working.  Then it installed successfully.  I didn't change the symbolic link to 0 as well as had seen in a forum this could be an issue.

Unfortunately I haven't had time since to check if this has solved the missing lib folder issue, but I'm guessing it should.

Thanks anyway karlrado, nice to get a confirmation that I'm thinking logically smile
I'll update this with solved when I've tested it so others don't get confused by it.

(perhaps that will teach me to blindly put in a script based on description!)

Offline

 

#7 2010-03-16 22:56:35

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Optware/lib folder missing on reboot.

Tested now and its working fine with just the optware.sh script.

Sorry about the noise, I should have checked that script before I put it in!

Offline

 

#8 2010-03-19 20:26:52

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Optware/lib folder missing on reboot.

OK, now its gone again.  How annoying.

I can't work out what could be doing it, but now I'm getting rid of the optware.sh and just using the hardcoded option in the funplug startup script.

If that regularly works without /opt/lib disappearing then I'll put a simplified optware.sh in that just tries to run the stuff in init.d

Weird though cos I can't see any reference to /opt/lib folder in any script that I think is trying to run and its the only folder going missing.

Maybe my 5 year old is a linux prodigy and is just trying to annoy me smile

Offline

 

#9 2010-03-19 22:11:46

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Optware/lib folder missing on reboot.

RIGHT! Finally worked it out.

The dlink official add-on for Firefly also sets up a /opt directory!!

In my first post I mentioned I had just added firefly via dlinks official add-ons, but couldn't see why this would be an issue.
Now after uninstalling optware and rebooting I noticed there was still a /opt directory in /Volume_1 even though the binds for optwares /opt had been removed from the start up scripts.

root@CampbellNAS:~# cd /opt
root@CampbellNAS:/opt# ls
firefly  lib
root@CampbellNAS:/opt# cd lib
root@CampbellNAS:/opt/lib# ls
chardetect.so
root@CampbellNAS:/opt/lib#

So now we have another /opt/lib in conflict.  (if interesting the firefly item is a link to the music folder set up for firefly)

I think this could be issue for others who decide to use the firefly plug in as I would think quite a number could also have optware installed, should I put something in the wiki for optware perhaps ?

So now I think I'll see if I can change the optware stuff to use a different bind folder /optware for example.

Offline

 

#10 2010-03-20 01:12:09

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Optware/lib folder missing on reboot.

Yikes!

I'm afraid that rebasing optware won't be easy.  I see a LOT of files that assume /opt.

If it were me, I'd explore leaving optware alone and looking at the other firefly options in the wiki howto.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#11 2010-03-20 08:30:56

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Optware/lib folder missing on reboot.

And you're spot on it seems karirado,

I had assumed that the /opt was just for convenience, but after changing the optware.sh references it still won't work, not loading the main lib.  Now there could be just one more I missed, I had looked around a few files and found no other refernces, but if you suggest there are more than one file then I'm getting worried.

I think thats a bit poo really, hardcoding the /opt (if thats the case) as really theres no reason not to have the path as a variable in an ini/conf file.

Anyway, i'll use fun_plug for firefly as you say, thats probably my easiest way forward.

Do you think it's worth pointing it out in the wiki howto for optware?

Offline

 

#12 2010-03-20 19:54:58

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Optware/lib folder missing on reboot.

I don't know what it would take to rebase optware.  I don't think that it is reasonable to expect that sort of flexibility for someone installing a pre-built package.  Some of the /opt dependencies might be compiled in.  As with most *nix software packages, one can probably specify a "root" or "install" directory in the build parameters and then rebuild the entire package.  This doesn't seem that hard to do.

If you mean documenting the conflict between optware and the D-Link firefly, yes, it is probably worth adding to the wiki.  I think that if you have a forum userid, you can also edit the wiki.  It is a good find.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#13 2010-03-23 23:12:22

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Optware/lib folder missing on reboot.

Final note.

I tried altering the scripts for the official dlink firefly addon, but wasn't successful.  Suspect there are some compiled in references to /opt there too.

Now I've removed the firefly addon and installed optware with the script as before.  Will look into firefly via funplug at some point.

I've put a note in the howto for optware about the conflict.

Thanks for the feedback Karlrado.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB