Linux Debian 5 on Slug NSLU2

I have just got around to blowing D5.0Beta2 (as recommended by Martin Michlmayr) on to a Slug and installed WD.

First off I installed into /usr/local/src/ and then to /home/USER/ but when I run ./GoWdconsole.sh from either of these i get;

“./GoWdconsole.sh: line 27: ./consolewd: No such file or directory”

Line 27 is “$DIR_PATH/consolewd” so presumably I have installed to or am running from the wrong dir. Any ideas?

is there the consolewd application in the same folder as where the goconsolewd.sh file is?
you could try manualy…copy the library files in the deploy folder to the /usr/lib/ folder (as root)
then run the consolewd directly from where installed
./consolewd

(although the goconsolewd.sh is supposed to allow the program to be installed anywhere)

ATM working in /usr/local/src/consolewd/ where everything is is 0777.

Have copied lib files from deploy to /usr/lib (but I don’t think that was the problem because that is called before line 27).

There is a file “consolewd”.

Still the same problem though for ./GoWdconsole.sh and ./consolewd simply returns “-bash: ./consolewd: No such file or directory” run both as the user and root.

I changed line 27 in ./GoWdconsole.sh for /usr/local/srs/consolewd/consolewd but now I get;

./GoWdconsole.sh: line 27: /usr/local/src/consolewd/consolewd: No such file or directory

It seems to not like the file to consolewd. I have tried renaming and reinstalling but get the same result.

Just in case there was a problem with moving the tar.gz from a windoze PC I have also tried downloading to a SuSE box, moving it on to the slug and then extracting it but makes no difference.

I have also tried creating simple bash and shell scripts containing “ls $DIRECTORY” and they both run OK from same location. So I edited ./GoWdconsole to run these instead of consolewd and it worked fine.

you have downloaded the ARM version of consolewd?
does the consolewd file show up in the files in the download OK?
also try installing to a directory that is not called consolewd
that might be confusing things

Yes consolewdarm.tar.gz and the file consolewd is in the bundle.

As I said I also downloaded from a Linux box, copied the tar.gz on to the slug using a samba share and then untarred it in situe.

I will try renaming the directory tomorrow but I am not sure that it will make a difference as I tried copying consolewd and running that with its new name and essentially got the same result.

I can’t see that Debian 5 could be causing the problem over 4 as everything else works.

Nope - same problem.

If you have a minute can you compile a “helo world” executable to test the device / OS with and drop it to me on an email.

what shows in the directory when you do a
ls

?

For completeness this is;

@/usr/local/src/consolewd$ ls -l

total 1324
-rwxrwxrwx 1 root root 751 Aug 11 08:05 GoWdconsole.sh
-rwxrwxrwx 1 root root 2120 Aug 9 12:42 config.txt
-rwxrwxrwx 1 root root 407255 Aug 9 12:24 consolewd
-rwxrwxrwx 1 root root 277807 Jun 28 21:48 croncwop
-rwxrwxrwx 1 root root 317843 Jun 28 21:49 cronftp
-rwxrwxrwx 1 root root 293503 Jun 28 21:48 cronwu
drwxrwxrwx 2 root root 4096 Jun 28 21:49 datafiles
drwxrwxrwx 2 root root 4096 Jun 28 22:04 deploy
drwxrwxrwx 2 root root 4096 Jun 28 21:49 logfiles
-rwxrwxrwx 1 root root 381 Jun 28 21:56 readme.txt
-rwxrwxrwx 1 root root 1365 Jun 28 21:56 tagslist.txt
-rwxrwxrwx 1 root root 219 Jun 29 20:15 wdconsole.ini

try, when in that directory
./consolewd

I get same as before “-bash: ./consolewd: No such file or directory”

I get the same for the other executables ; croncwop, cronftp, cronwu.

Yet other bash comands are fine.

The lib files are copied into /usr/lib and look like;

-rwxr-xr-x 1 root root 2896740 Aug 9 09:20 liblunar.so
-rwxr-xr-x 1 root root 53289 Aug 9 09:20 libusbdll.so
-rwxr-xr-x 1 root root 6981 Aug 9 09:20 libutils.so
-rwxr-xr-x 1 root root 6981 Aug 9 09:20 libutils.so.1
-rwxr-xr-x 1 root root 8382 Aug 9 09:20 serial_version.dat
-rwxr-xr-x 1 root root 8428 Aug 9 09:20 usb_version.dat
-rwxr-xr-x 1 root root 35977 Aug 9 09:20 libcom.so
-rwxr-xr-x 1 root root 31012 Aug 9 09:20 libcomold.so
-rwxr-xr-x 1 root root 58343 Aug 9 09:20 libhid.so
-rwxr-xr-x 1 root root 58343 Aug 9 09:20 libhid.so.0

there is something odd about your linux setup I think

will need some help from linux gurus

or, maybe, you need to set the executable as an executable file…i.e its not recognised as one?

or the cpu archeticture is different to what is expected

Yes I was rather hoping someone with a bit more experience of Linux than you or I might have stepped up to the plate by now. Here’s hoping :wink:

I suppose I could reinstall it as D4 but then that shouldn’t make any dif and we need to make it work on a current (albeit Beta2 but recommended by a head honcho) version.

The files are set as full 0777 so that should allow read, write and execute. I can’t think where else to tell them to be executable but bash definitely objects to something.

The processor shouldn’t be anything different as it is an out of the box NSLU2 with its Arm processor.

As an experiment I have just extracted the tar.gz to a SuSE 10.3.5 PC (i.e. not an Arm processor), set the permissions to 0755 but the result is “bash: ./consolewd cannot execute binary file” which at least is different to the response on the Slug.

Do a

file /bin/ls

and a ‘file’ on your consolewd

and post the result here.

Mike

Hi Mike

“file” does not exist on my D5 install. I am not sure if this is deliberate or something wrong. I sent it off to do an update and upgrade but that didn’t get me anything.

Aha (many hours later) Tasksel - and do a manual install of missing file. Does this mean there are other required utils or packages missing hence no WD? Is there a list of required packages or libs that we might be missing?

Anyhow (after manual install “file”);

/bin/ls: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, stripped

/usr/local/src/consolewd/consolewd: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), stripped

Also just noticed that /usr/lib now has a shed load of files (unlike above) see attached. These have even come from today’s “apt-get update & upgrade” or from installing “file”. But doesn’t help WD.


usrlib.txt (2.89 KB)

Sorry for the delay, I didn’t get notified of your reply?

I have no idea whats wrong :frowning:

I’ve attached a file to test with - hello.doc
(its not really a .doc its a gzipped tar file)

You will need to;

  1. copy this on the slug to /usr/local/src/consolewd
  2. cd into /usr/local/src/consolewd
  3. tar zxvf ./hello.doc
  4. ./hello

Let us know how it goes!!

Mike


hello.doc (11.3 KB)

No probs Mike

Result as root chmod to 0755;

Hello Weatherfront!!

Is there any way I can trap any more info about what is happening when I run ./consolewd?

BTW kernel for my Debian 5.0Beta2 is “Linux LKGA57091 2.6.25-2-ixp4xx #2 Wed Jul 16 07:37:56 UTC 2008 armv5tel GNU/Linux” but I guess something compiled for an earlier kernel should be OK?

You have just proven that a binary compiled for an earlier kernel is OK :smiley:

So there

This might help?

/usr/bin/ldd: line 116: ./consolewd: No such file or directory

You can trace whats happening when you run the binary like this

In the /usr/local/src/consolewd directory

strace ./consolewd

I’m not sure it will give us much…

Mike

Sorry it took a little while. strace not part of basic install. Anyhow this is what we get;

execve(“./consolewd”, [“./consolewd”], [/* 16 vars */]) = -1 ENOENT (No such file or directory)
dup(2) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), …}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001e000
_llseek(3, 0, 0xbe9cc9c0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, “strace: exec: No such file or di”…, 40strace: exec: No such file or directory
) = 40
close(3) = 0
munmap(0x4001e000, 4096) = 0
exit_group(1) = ?
Process 2002 detached