LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   cp: cannot stat; while installing inf via ndiswrapper (https://www.linuxquestions.org/questions/linux-software-2/cp-cannot-stat%3B-while-installing-inf-via-ndiswrapper-164746/)

lostlyre 03-31-2004 08:20 PM

cp: cannot stat; while installing inf via ndiswrapper
 
When I try to install a broadcom driver with ndiswrapper, I get the following error message.

ndiswrapper -i /home/david/Desktop/truemobile/bcmwl1.inf
Installing bcmwl1
cp: cannot stat `/home/david/Desktop/truemobile/bcmwl1.inf': No such file or directory

------------------------------------------------

Does anyone know what this means? ndiswrapper appeared to install correctly, but I could be wrong, here are the make install messages for ndiswrapper:

make install
make -C driver install
make[1]: Entering directory `/home/david/Desktop/ndiswrapper-0.6/driver'
make -C /lib/modules/2.6.3-4mdk/build SUBDIRS=/home/david/Desktop/ndiswrapper-0.6/driver DRV_VERSION=0.6 modules
make[2]: Entering directory `/usr/src/linux-2.6.3-4mdk'
*** Warning: Overriding SUBDIRS on the command line can cause
*** inconsistencies
make[3]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/asm-i386/asm_offsets.h
Building modules, stage 2.
/usr/src/linux-2.6.3-4mdk/scripts/Makefile.modpost:17: *** Uh-oh, you have stale module entries. You messed with SUBDIRS,
/usr/src/linux-2.6.3-4mdk/scripts/Makefile.modpost:18: do not complain if something goes wrong.
MODPOST
make[2]: Leaving directory `/usr/src/linux-2.6.3-4mdk'
mkdir -p /lib/modules/2.6.3-4mdk/misc
install -m 0644 ndiswrapper.ko /lib/modules/2.6.3-4mdk/misc
/sbin/depmod -a
make[1]: Leaving directory `/home/david/Desktop/ndiswrapper-0.6/driver'
make -C utils install
make[1]: Entering directory `/home/david/Desktop/ndiswrapper-0.6/utils'
install -m 755 loadndisdriver /sbin
install -m 755 ndiswrapper /usr/sbin
install -m 755 wlan_radio_averatec_5110hx /usr/sbin
make[1]: Leaving directory `/home/david/Desktop/ndiswrapper-0.6/utils'

-----------------------------
I'm running:
2.6.3-4mdk Mandrake 10
Dell Inspiron 8200 P4
Broadcom 4301 (truemobile 8200 wireless b internal PCI)

Thanks, David

Hangdog42 03-31-2004 08:25 PM

The error means that it can't find the bcmwl1.inf file. You need to check to make sure that is where the file is and that it is readable.

lostlyre 03-31-2004 08:28 PM

wow really sorry; the files were readable but I was typing the WRONG THING! :mad: Sorry I'm a major newb still getting the hang of this stuff. Could you please explain exactly what cp: cannot stat really means technically? I understand your help and I thank you,just trying to get a grip on these common messages. Or perhaps you could point me to a learning source that has messages like this? Thanks very much. David

lostlyre 03-31-2004 08:33 PM

ndiswrapper -l
Can't use string ("") as an ARRAY ref while "strict refs" in use at /usr/sbin/ndiswrapper line 318, <LS2> line 1.

Would anyone know what this means? I'm trying to list ndis drivers but this comes up

Hangdog42 03-31-2004 09:01 PM

Um, this is exactly why LQ has rules about posting more than one thread about the same thing. We now have our discussion crossing two threads.....


Both cp and stat are normal linux commands. cp is the copy command and stat gets info about a file (see the man entries for both if you want more details). I think the ndiswrapper program was making sure that bcmwl1.inf existed before it tried to do anything and when it couldn't find it, it complained. The important bit of that error message is the No such file or directory. That is the clue that it can't find what it wants.

As for your error, if you open the ndiswrapper program you'll see it is a perl script and the error is because the authors have the "use strict" declaration. That is something perl programmers use to avoid getting into trouble with, well, somewhat sloppy code. It may mean nothing and I would try using the module anyway and seeing if you can get wireless working.

lostlyre 03-31-2004 09:07 PM

Sorry about the double post, won't happen again. Thanks for your help. So, run the module anyway, eh? Ok, I'll give it a shot. Looks like it installed, upon checking iwconfig:

wlan0 IEEE 802.11b ESSID:"d11b"
Mode:Managed Frequency:2.462GHz Access Point: FF:FF:FF:FF:FF:FF
Bit Rate:11Mb/s Tx-Power:16 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-10 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:7 Missed beacon:0

Now, do I have to set WEP and SSID every time I think I'm in a new network? Is there some sort of manager I can use for this like Windows has or something? Kind of annoying to do all that with the console, especially at school.

Hangdog42 03-31-2004 09:43 PM

I've just got a script that runs at startup for my home network

Code:

#!/bin/bash
/sbin/modprobe ndiswrapper
/usr/sbin/iwconfig wlan0 key PutYourWEPKeyHere
/usr/sbin/iwconfig wlan0 essid PutYourESSIDNameHere
/sbin/dhcpcd wlan0

If you have a limited number of networks, you could just modify the script, save it under a new name and run it when you move between networks (you could leave the modprobe ndiswrapper out and just insert that from a startup script).

Unfortunately the programs I'm aware of that scan for networks (Airsnort, kismet) don't work through ndiswrapper. At least I haven't been able to get them to do so. Of course that may just be my ignorance.

lostlyre 03-31-2004 09:48 PM

sounds good, but...
 
Thanks for your help, hang. However, I already did ndiswrapper -m...is that going to be a problem with using those scripts? Do I need to remove any settings or anything? (BTW I got it working with my home's linksys router :) ) I really appreciate your help this has opened a new door for me and linux.

lostlyre 03-31-2004 09:50 PM

also
 
I don't seem to have the dhcpcd command available.

Also..what extension do those scripts use? It's no extension right? Just write it in kwrite or something?

Hangdog42 04-01-2004 07:42 AM

Quote:

I already did ndiswrapper -m
If I understand ndiswrapper correctly, that means you just have to leave the modprobe ndiswrapper line out of any of the scripts. I think that running ndiswrapper -m sets your startup scripts so that the module is loaded on boot. So all you would need to do is issue the iwconfig commands and then dhcpcd to get an IP address (if the networks you use are using DHCP).

Quote:

I don't seem to have the dhcpcd command available
It is there, but probably not in a directory that is on your PATH or you don't have the right privileges on the dhcpcd command (it may be root only). Have a look in your /sbin directory or run find / -name dhcpcd as root to find where it lives. Once you find it, there are a couple of ways around this problem. First, whenever you need to run a script with dhcpcd, become su and then run it. The second approach would be to use sudo to allow you to run it as a normal user. That is a touch more complicated (you have to set up your sudoers file to allow you to run dhcpcd), but probably a less annoying way in the long run.

Quote:

Also..what extension do those scripts use? It's no extension right? Just write it in kwrite or something?
You don't need exentsions for any script in linux unless you want it to help you keep track of what it may do. The important bit is that you make the file executable with the chmod command. And yes, any text editor will do to write it.

Quote:

BTW I got it working with my home's linksys router
Excellent! I'm glad it worked for you.

lostlyre 04-01-2004 09:58 AM

Please explain PATH
 
Your help has been invaluable, thanks a lot. I notice the term PATH being used a lot. What exactly is the path and in what form does it exist in Linux? How would I go about editing it, and are there any serious implications to doing so?

BTW I tried that find command you mentioned, nothing came up, and the prompt returned.

Hangdog42 04-01-2004 12:12 PM

The PATH is simply a list of directories that the system "knows" about for that user. One of the major uses is in finding programs. So when you type a command, the system searches all of the directories on the PATH for that command. If you want to see the directories for you, enter $PATH at the console.

Altering the path is easy and usually done in the .bashrc or .bash_profile file. Essentially all you do is create this line in the file:

PATH=$PATH:/new/directory

The $PATH keeps everything already in the path and then new paths (separated by a colon) are added. If you just did

PATH=/new/directory

Then /new/directory would be the only directory in PATH.


Quote:

nothing came up, and the prompt returned
That just doesn't make sense. Unless you are using static IP addresses on your LAN you need dhcpcd. As far as I know, it is the only way to communicate with a DHCP server. Were you su when you ran that search? Then again, maybe Mandrake has done something different.......

lostlyre 04-01-2004 02:35 PM

DHCPCD just isn't there
 
I was root when I searched, I also did an updatedb and locate. Nothing came up. Any ideas? if I dismantle the whole ndis solution and bring it back up I can reset my ip and get a new one. Sometimes though, when I bring it up, if I don't get an IP right away, I don't know how to ask for one manually. Any ideas?

Hangdog42 04-01-2004 02:50 PM

Hm. On Slackware, dhcpcd is part of the standard install. I guess that I had assumed it was standard for linux, not just Slackware.

I did a little googling, and you might try the dhcp-client command. So the syntax appears to be:

dhcp-client -i wlan0

Check out man dhcp-client for more details

lostlyre 04-01-2004 02:57 PM

bash: dhcp-client: command not found

I did a search and this is what I came up with.

locate dhcp-client
/usr/share/doc/iproute2-2.4.7/examples/dhcp-client-script
/usr/share/doc/dhcp-client-3.0
/usr/share/doc/dhcp-client-3.0/dhclient.conf

Crazy, eh? SOMEthing has to be driving some sort of dhcp function, because I'm on wireless at school, and someone's network just gave me an IP and I'm using the internet with it. ??

no manual entry for dhcp-client either. Kinda strange...


All times are GMT -5. The time now is 11:36 PM.