[ltp] SuSE 8.0 and PCMCIA

Eric Jorgensen linux-thinkpad@www.bm-soft.com
Mon, 1 Jul 2002 21:48:15 -0600


On Fri, 28 Jun 2002 12:40:47 -0400
"Bernard Fay" <bernard.fay@cognicase.ca> wrote:

> Hello,
> 
> I wish to install SuSE 8.0 on my laptop using ftp.  When loading the driver
> for my PCMCIA card (Linksys etherfast 10/100), the installer load the axnet_cs
> driver which is not the right one for my card, I need the pcnet_cs driver. I
> can unload the axnet_cs but the installation program does not let me load the
> pcnet_cs driver. 
> 
> I tried hwprobe=-isapnp as a boot option but that didn't help.
> 
> Does anyone knows how to get the proper driver in place?


	Yes, I do. 

	Unfortunately, if you're not an experienced linux user, you're in for a real
adventure. If you have access to another pcmcia nic that you can borrow for a
short time, it might be a real good idea at this point. 

	It's not *hard, it's just requires a bunch of arcane knowledge and some
patience, and a willingness to hack around. You might want to check with SuSE
tech support about this because maybe they'll fix it for you. The problem is the
result of a mis-match between the pre-defined configuration of the pcmcia files
on the installation system and the identification information that your nic
returns when pcmcia-cs queries it. In order to support the largest number of
devices, pcmcia-cs essentially wildcards a large ammount of the configuration
based on knowledge of existing known working configurations - and your nic is
being identified as something it is not. 

	It's not really anybodies fault, and you can help the community in some small
way by providing David Hinds with the correct configuration information. 

	The deal is this: pcmcia drivers can't just be loaded. When a pcmcia card is
inserted, the cardmgr daemon has to detect this, ask the card who it is, and
then check against a table to see what driver is appropriate. It then loads the
module using some incantation that i am not privy to, but someone who took the
time to look at the code could prolly figure it out. "modprobe foo" won't work.
doesn't even begin to work. it will load the driver but will not attach it to
the hardware. You still need cardmgr to attach it to the hardware. 

	So, it's like this. The SuSE boot floppy is probably a DOS format filesystem
with a kernel and a compressed root filesystem, there's probably a second floppy
image, and maybe a third. Probably all of these have a compressed ramdisk on
them. 

	One of these compressed ramdisks has the pcmcia stuff on it.

	Once you figure out which disk, get it to another linux system and mount it.
It's probably a dos filesystem with a .gz on it. 

	copy the .gz to your other linux system and un-gzip it, then mount it through
the loopback device using "mount -o loop foo /mnt/foo" where "/mnt/foo" is an
empty directory you wish to mount this filesystem on. I could be missing some
steps here, I really don't know. You may need ramdisk support and/or simple ram
filesystem support in your kernel or loaded as a module. you may need minixfs
support. it depends how their installer works. I did something similar once
about 3 years ago, with redhat 6.2. 

	Somewhere on this filesystem, there will be a directory called pcmcia with a
file called "config" in it. Here lies the culprit. 

	Basically, something in there thinks that your card is an axnet when it's a
pcnet. You need to fix it. The quick way is to do something like this: 

mv config config.bak && sed -e 's/axnet_cs/pcnet_cs/' < config.bak > config

	this will replace every instance of axnet_cs with pcnet_cs, which will
brute-force fix your problem, and won't cause any other problems assuming that
you never try to use an axnet nic. 

	After you've done this, you can delete the config.bak file, unmount the
filesystem, re-gzip it, and replace the .gz file on the original floppy with
your modified version. 

	I could be utterly confused about how to work with the filesystem, it's
possible that they're using something like cramfs which will require you to copy
the contents of the filesystem to a working directory and then make a new
filesystem from your working directory. I honestly don't recall how i did it
with redhat 6.2 - i mostly fly on auto pilot when i get into hacks like that. 

	Anyway, that's how to fix the boot floppy quickly. If you were using a cd
before, you're using floppies to boot now. or burning your own cd. 

	To fix SuSE after it's installed, follow David Hinds excellent instructions for
adding a new ne2k compatible nic to pcmcia_cs at: 

http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-HOWTO-6.html#ss6.2

	Good luck! When you're finished, email David Hinds with the output from
"cardctl ident" and explain that this particular revision of your nic is
identified as an axnet when it should be identified as a pcnet. This way, he can
fix it so that future versions of pcmcia_cs won't have this issue. 


 - Eric

----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html