Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PCMCIA nic: getting it working with pcmcia-cs (for n00bs!)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Tue Dec 17, 2002 3:35 pm    Post subject: PCMCIA nic: getting it working with pcmcia-cs (for n00bs!) Reply with quote

After following the install docs to the letter and rebooting, there were still issues with pcmcia-cs. As far as I can guess, this should hold true for all users with pcmcia nics.

BTW, you might not need to do every step here, so if you know any step is unecessary, please say! Also, this is aimed at all skill levels, so apologies if you find parts of it patronising.



Preface

Assumptions:
  • You successfully completed the install docs and rebooted
    ie if you didn't 'emerge pcmcia-cs' then this same command which has to be repeated later won't work now - you have no network set up! By emerging it before you've downloaded the sources necessary to install it. If you didn't, go to the end for a quick how-to.

  • /usr/src/linux is a symlink to your linux kernel
    eg for me it's a symlink to /usr/src/linux-2.4.19-gentoo-r10 and you can check this using 'ls -l /usr/src/linux' and, if needed, correct it using 'ln -sf /usr/src/linux-your-version /usr/src/linux'
Notes:

My machine is called gentoo1



Kernel preparation

Code:
gentoo1 / # cd /usr/src/linux
gentoo1 linux # make menuconfig


Since we're using pcmcia-cs, we don't need the kernel's specific pcmcia modules, so make sure they're deselected:

Code:
General setup --->
PCMCIA/CardBus support --->
< > PCMCIA/CardBus support


If this was already deselected, then skip the next bit. Otherwise, exit and remember to select 'yes' when asked if you want to save your 'new kernel configuration' and recompile the kernel:

Code:
Saving your kernel configuration...


*** End of Linux kernel configuration.
*** Check the top-level Makefile for additional configuration.
*** Next, you must run 'make dep'.

gentoo1 linux # make dep && make clean bzImage modules modules_install


Once this is complete (~30 mins or less) then you need to move it. You'll need to mount /boot if you haven't already done so. If you are mounting your /boot, you'll need to substitute 'hda1' with whatever device you use as your boot partition.

Code:
gentoo1 linux # mount /dev/hda1 /boot
gentoo1 linux # cd /boot
gentoo1 boot # mv bzImage bzImage.old
gentoo1 boot # cp /usr/src/linux/arch/i386/boot/bzImage .
gentoo1 boot # cd /
gentoo1 / # umount /boot




(Re)Install pcmcia-cs

A reboot may be required at this point, but I don't think so! However, a reboot does confirm that your kernel is functioning.

Re-emerge pcmcia-cs ('make clean' will have removed it as a module), and add it to the default runlevel so it runs on boot:

Code:
gentoo1 / # emerge pcmcia-cs
gentoo1 / # rc-update add pcmcia boot




Prepare configuration files

Now we need to make sure the appropriate modules are loaded when the computer boots:

Code:
gentoo1 / # nano -w /etc/modules.autoload


This file, as indicated by it's name, loads modules automatically. For pcmcia you'll need either 'i82365' or 'i82092' compatable bridge support - depending upon which worked for you during the initial installation - and 'ds' (drive service). For most of us it's 'i82365', so substitute if with i82092 below if that's what you need.

Note the omission of pcmcia_core.

Code:
# /etc/modules.autoload:  kernel modules to load when system boots.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload,v 1.5 2002/$
#
# Add the names of modules that you'd like to load when the system
# starts into this file, one per line.  Comments begin with a # and
# are ignored.  Read man modules.autoload for additional details

# For example:
# 3c59x

# Here we'll put our relevant pcmcia modules
i82365
ds


Finally, make sure you have the right information in the /etc/conf.d/net configuration file. As per usual you'll have to substitute information relevant to your network over mine:

Code:
gentoo1 / # nano -w /etc/conf.d/net

# In this file we'll need the following correct definitions:
#     iface_eth0
#     gateway

# Note the similarity between this and the ifconfig command!
iface_eth0="10.0.0.130 broadcast 10.0.0.255 netmask 255.255.255.0"

# The gateway definition was definited during the installation by the
# route command, and the 'netmask 0.0.0.0 metric 1' is assumed
gateway="eth0/10.0.0.5"


That's it! Reboot and hopefully it should work!



If it's still not working...

Check that your card is supported on the pcmcia-cs support cards list.

Did you correctly create resolv.conf? Check it anyway:

Code:
gentoo1 / # nano -w /etc/resolv.conf

# nameservers go here but I shall not show mine for legal reasons!
# so these are rather made up

nameserver 123.1.2.3
nameserver 1.2.3.123


Did you add eth0 using rc-update, as the installation doc told you to? The following will output an explicit statement if you already have:

Code:
gentoo1 / # rc-update add net.eth0 default


Double-check /etc/conf.d/net for typos - I find they're easier to make than they are to spot.

Check your modules loaded correctly, check yours is similar to mine with lsmod:

Code:
gentoo1 / # lsmod
Module              Size  Used by     Not tainted
serial_cs           7344    0  (unused)
xirc2ps_cs         16740    1
ds                  7112    2  [serial_cs xirc2ps_cs]
i82365             26976    2
pcmcia_core        43520    0  [serial_cs xirc2ps_cs ds i82365]


Check cardmgr is loaded:

Code:
gentoo1 / # ps -C cardmgr
   PID TTY          TIME CMD
  2416 ?        00:00:00 cardmgr


I've tried to be as comprehensive as possible. Any other ideas, please suggest!

Addition - thanks to anz for this tip (edited quote):

anz wrote:
I had the problem that the modules could not be found (... no i82365 and ds). But it worked after:

env-update
source /etc/profiles
ldconfig
update-modules force




Getting pcmcia-cs

If you forgot to emerge it during the initial installation procedure, don't worry, it's easy to get it.

You can find out what version of pcmcia-cs your gentoo wants fairly easily:

Code:
gentoo1 linux # emerge -p pcmcia-cs


You need to find it's url on a gentoo mirror. Then reboot and use the liveCD to boot, mount your partition and wget it into /mnt/gentoo/usr/portage/distfiles.

Replace /dev/hda3 by your main gentoo partition, if it differs.

Code:
# mkdir /mnt/gentoo
# mount /dev/hda3 /mnt/gentoo
# cd /mnt/gentoo/usr/portage/distfiles
# wget http://path/to/pcmcia-cs


Then take out the liveCD, boot back into your gentoo installation, and:

Code:
gentoo1 / # emerge pcmcia-cs


Then resume.


Last edited by charlieg on Thu May 15, 2003 10:09 am; edited 5 times in total
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Sat Dec 21, 2002 12:14 am    Post subject: Yeah baby! Reply with quote

w00t 100 views! I must be doing something right. :D

No... this isn't a shameless plug to get my hard work (took me a few hours to refine this doc) to the top of the forum again.

/me ducks. :roll:
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
jay
l33t
l33t


Joined: 08 May 2002
Posts: 980

PostPosted: Sat Dec 28, 2002 7:25 pm    Post subject: Reply with quote

This is an excellent instruction. I have some recommendations/additions:

1.
Add a "make clean" after compiling the kernel, so the pcmcia-cs package will install the modules properly. (I couldn't load the modules unless i did so)

2.
Don't forget to compile wireless lan support and hotplug support into the kernel. Otherwiese cardmgr
cannot add the card during runtime.

3.
If the wireless card is your second card beside a built-in NIC it should be labelled eth1. You have to copy etc/init.d/net.eth0 to etc/init.d/net.eth1 Do not add this to the default runlevel ( # rc-update add net.eth1 default)! Modify /etc/conf.d/net configuration file instead and add another iface entry for the second card. After plugging in the card the net.eth1 script should be executed automatically.

4.
emerge wireless-tools it has some useful commands like iwconfig (the ifconfig equivalent for wireless cards).
_________________
Do you want your posessions identified? [ynq] (n)
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Sun Dec 29, 2002 11:29 pm    Post subject: Reply with quote

There was a make clean in there already... :)

charlieg wrote:
Code:
gentoo1 linux # make dep && make clean bzImage modules modules_install


But the other tips for wireless cards are a good addition.
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
asmmsl
n00b
n00b


Joined: 10 Jan 2003
Posts: 10

PostPosted: Mon Jan 13, 2003 1:49 am    Post subject: Reply with quote

First thanks a lot, the post helped and my pcmcia card finally worked.

BTW, everything worked well with non-gentoo versions of kernel source/pcmcia_cs (had to do it as no boot floppy supported my network card - so had no net even during the first install)

I have only one problem, can anyone help please:
after doing everything as described in the post above (except pcmcia-cs is a non-gentoo version) the modules load as expected, cardmngr detects the card and executes ./network start eth0, but eth0 would not come up.
(the /etc/conf.d/net file is properly edited for eth0, # rc-update add net.eth0 default executed)

Manually executing ifconfig eth0 ip etc etc works though, i.e. the interface IS there.. what can eb the problem? I checked the network script, cant find an obvious problem there
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Mon Jan 13, 2003 11:28 am    Post subject: Well Reply with quote

If your pcmcia-cs is non-gentoo, then presumably you are not typing 'emerge pcmcia-cs' to set it up.

I would imagine the ebuild script for pcmcia-cs (invoked by emerge) contains some instructions to register the appropriate pcmcia script in /etc/init.d amongst other things.

What I would do is, since you say you got your inet up using ifconfig, emerge pcmcia-cs and go through the appropriate steps that follow it and see if it works.
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
chadh
Moderator
Moderator


Joined: 21 Apr 2002
Posts: 137
Location: Atlanta, GA

PostPosted: Fri Jan 24, 2003 7:47 pm    Post subject: Reply with quote

asmmsl,
If you are using a non-Gentoo pcmcia, then you will need to either edit /etc/pcmcia/network to use the /etc/init.d/network script, or edit /etc/pcmcia/network.opts to suit your network. For a wireless card, edit /etc/pcmcia/wireless.opts.
_________________
Chad
Back to top
View user's profile Send private message
desertfish
n00b
n00b


Joined: 26 Jan 2003
Posts: 4
Location: San Francisco, CA USA

PostPosted: Sun Jan 26, 2003 4:37 am    Post subject: Thank you! (But a question) Reply with quote

This is an excellent addendum to the install docs; thanks.

But when I boot, I get error messages about an inability to load the i82365 module (and subsequent ds module). Yet when I modprobe this module manually as root it works. I can then load my pcmcia NIC and everything's A-OK. I checked for typos in modules.autoconf!

Thanks,
d.fish
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Sun Jan 26, 2003 10:42 pm    Post subject: Re: Thank you! (But a question) Reply with quote

desertfish wrote:
This is an excellent addendum to the install docs; thanks.


You're welcome, I'm glad it's appreciated - it took some time to write!

desertfish wrote:
But when I boot, I get error messages about an inability to load the i82365 module (and subsequent ds module). Yet when I modprobe this module manually as root it works. I can then load my pcmcia NIC and everything's A-OK. I checked for typos in modules.autoconf!


If you can post the errors here, it would make it easier to establish the cause.
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
chadh
Moderator
Moderator


Joined: 21 Apr 2002
Posts: 137
Location: Atlanta, GA

PostPosted: Sun Jan 26, 2003 10:50 pm    Post subject: Reply with quote

The new pcmcia init scripts use /etc/conf.d/pcmcia. I bet that desertfish hasn't configure PCIC in there. That gives a strange error about not being able to load ds, because i82365 doesn't get loaded first. I should probably fix the init scripts to catch this.
_________________
Chad
Back to top
View user's profile Send private message
stig
Apprentice
Apprentice


Joined: 03 Sep 2002
Posts: 289
Location: Bærum, Norway

PostPosted: Wed Feb 05, 2003 11:08 am    Post subject: Reply with quote

I have the exact same problem. Please let me know if you get it working!
_________________
Allting har en ende, pølsen den har to.
Back to top
View user's profile Send private message
gtsquirrel
Tux's lil' helper
Tux's lil' helper


Joined: 21 Nov 2002
Posts: 85
Location: San Jose, CA

PostPosted: Wed Feb 05, 2003 7:16 pm    Post subject: Add to boot, not default. Reply with quote

I would like to point out that in the example above, the following line:

Quote:
rc-update add pcmcia default


should be changed to:

Quote:
rc-update add pcmcia boot


While it probably doesn't matter all in all, having pcmcia services loaded prior to the network trying to come up might be a good thing. :-) Hope this helps some people.

chris
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Thu Feb 06, 2003 1:01 am    Post subject: Okay Reply with quote

Updated to make it 'boot' over 'default'. :)
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
ragefan
n00b
n00b


Joined: 01 Jun 2002
Posts: 63
Location: Roanoke, Virginia, USA

PostPosted: Mon Feb 17, 2003 8:50 pm    Post subject: crash on insert Reply with quote

i followed your instructions, but on my laptop, Dell Inspiron 8100, when I insert my Orinoco Sliver card, the computer freezes and i have to reboot using the power button. when I insert the card the last syslog message is:
Code:

dessimus cardmgr[2265]: executing: 'modprobe orinoco_cs'


even if i try to boot with the card in, it will freeze before finishing the boot, and the above message is also the last message shown.

TIA,
Rick
Back to top
View user's profile Send private message
SuperV
n00b
n00b


Joined: 08 Nov 2002
Posts: 44
Location: Arizona

PostPosted: Tue Feb 18, 2003 5:33 pm    Post subject: Adding WEP Reply with quote

Well, I just went through the instructions listed above, and lo and behold, everything works, great job on the docs.

My system can see the card (orinoco-based), yet I cannot get onto my network locally. I am using WEP, and have an access key defined already, but what I can't figure out, is where to pass that access key info to.

Which config files take this information?
Back to top
View user's profile Send private message
chadh
Moderator
Moderator


Joined: 21 Apr 2002
Posts: 137
Location: Atlanta, GA

PostPosted: Tue Feb 18, 2003 5:35 pm    Post subject: Reply with quote

cardmgr will set it up for you if you configure /etc/pcmcia/wireless.opts . I believe the PCMCIA-CS Howto has an explanation.
_________________
Chad
Back to top
View user's profile Send private message
bryon
Apprentice
Apprentice


Joined: 14 Feb 2003
Posts: 163

PostPosted: Sat Feb 22, 2003 9:48 pm    Post subject: almost works Reply with quote

I Folowed everything in the doc. Let me go through my setup, i have a tinkpad A30 and a Cisco 350 aironet. The thing is that when I put the card in it gives me the two beeps that tell me that it is working but when I do ifconfig there is no eth1 only my built in eth0.

:cry:

And when i do kismet_monitor under root I get

Quote:
root@Lappy bab # kismet_monitor
Using /usr/local/etc/kismet.conf sources...
Enabling monitor mode for a cisco card on eth1
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device eth1 ; No such device.
Modifying device eth1
/usr/bin/kismet_monitor: line 150: /proc/driver/aironet/eth1/Config: No such file or directory
/usr/bin/kismet_monitor: line 151: /proc/driver/aironet/eth1/Config: No such file or directory
/usr/bin/kismet_monitor: line 152: /proc/driver/aironet/eth1/Config: No such file or directory
eth1: unknown interface: No such device
eth1: unknown interface: No such devic
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Sun Feb 23, 2003 12:42 am    Post subject: Erm Reply with quote

It looks like you've not configured eth1 using ifconfig (or dhcp?) - am I right on off base with that remark?
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
linde002
n00b
n00b


Joined: 13 Jan 2003
Posts: 62

PostPosted: Mon Feb 24, 2003 9:45 am    Post subject: Reply with quote

Thanks for this wonderfull howto, it helped me installing gentoo on my laptop, if not for this howto i would be using red hat now :evil: (go figure).

I really think this should be appended into the System installation guide.

-Robert
Back to top
View user's profile Send private message
soroko
n00b
n00b


Joined: 13 Feb 2003
Posts: 35
Location: London

PostPosted: Sat Mar 01, 2003 11:28 am    Post subject: Re: crash on insert in Inspiron 8100 Reply with quote

ragefan wrote:
i followed your instructions, but on my laptop, Dell Inspiron 8100, when I insert my Orinoco Sliver card, the computer freezes and i have to reboot using the power button. when I insert the card the last syslog message is:
Code:

dessimus cardmgr[2265]: executing: 'modprobe orinoco_cs'


even if i try to boot with the card in, it will freeze before finishing the boot, and the above message is also the last message shown.

TIA,
Rick


I have a similar setup as well, try editing /etc/pcmcia/config.opts

in the line
include port 0x100-0x4ff.....
delete the range: 0x800-0x8ff
Back to top
View user's profile Send private message
Julle
n00b
n00b


Joined: 18 Feb 2003
Posts: 21
Location: Oulu, Finland

PostPosted: Sun Mar 09, 2003 6:52 pm    Post subject: Nameserver problems? Reply with quote

First of all thanks for writing this guide. Now my network almost works. Just a little more and I can start configuring desktop.

My problem is that, as far as I can understand, my nameserver doesn't work with Gentoo for some reason. I can ping IP addresses and there is no lost packages or anything. I even pinged my nameserver and it responded ok. But when I try to ping www.something.com it says "ping: unknown host". I also tried to update portage and the result was "temporary failure in name resolution". I have added my nameservers to /etc/resolv.conf so problem can't be there can it?

Don't know if this is related but when Gentoo is shutting down it says "ERROR net.eth0 has not yet been started".

I have folloved the instructions to the letter and checked and double checked everything.
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Mon Mar 10, 2003 10:16 pm    Post subject: Reply with quote

Julie:

Code:
# /etc/init.d/net.eth0 start


What output does that give you?
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
Julle
n00b
n00b


Joined: 18 Feb 2003
Posts: 21
Location: Oulu, Finland

PostPosted: Mon Mar 10, 2003 10:27 pm    Post subject: Reply with quote

Managed to solve the problem by myself. The amount of satisfaction you get when you get something done all by yourself. :D

There was something wrong with the nameservers as I suspected. Thing was I somehow skipped nameserver setting during Gentoo installation. And when I now followed charlieg's instructions the setting went wrong.

When you edit /etc/resolv.conf to include your nameservers you can't just write IP adresses there. Name server definition has to be done this way:

Code:
gentoo1 / # nano -w /etc/resolv.conf
# nameservers go here but I shall not show mine for legal reasons!
# so these are rather made up
nameserver 123.1.2.3
nameserver 1.2.3.123


Just edited charlieg's instructions a bit. Please don't get mad at me. :wink:

PS. The name is JULLE. It's scandinavian nick name. Can't understand how everybody always manages to read it wrong. :twisted:
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Mon Mar 10, 2003 10:39 pm    Post subject: Whoops! Reply with quote

Sorry about that Julle! I've corrected it... that was an oversight. By that time I was writing it from memory and it just didn't come up... I guess most people who go through the install doc don't get caught by that one though.

:)
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
anz
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 279
Location: Vienna

PostPosted: Tue Mar 18, 2003 9:17 am    Post subject: modules problem Reply with quote

Hello,
thanks alot for your super guide ... but I had the problem, that the modules could not be found (... no i82365 and ds). But after

env-update
source /etc/profiles
ldconfig
update-modules force

it worked. May be something went wrong with the modules.conf updating? :oops:

cU, anz
_________________
Greetings from Vienna
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 1 of 9

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum