# modprobe: Can't locate module ds

## esprout

When I start pcmcia with /etc/init.d/pcmcia start, I get an error:

modprobe: Can't locate module ds

However, I am still able to load my pcmcia cards and use them successfully.

It looks like the problem is I don't have ds.o in /lib/modules/<kernel>/pcmcia.  I have tried recompiling the kernel with make modules modules_install with no avail.  I have also tried remerging pcmcia-cs which also has not helped.

Anyone have any ideas how I might get ds.o to get registered with pcmcia-cs package?  ds.o *is* built and saved in /usr/src/linux/drivers/pcmcia/ds.o.  However, it is not copied to /lib/modules/<kernel>/pcmcia, but copying it there manually and trying to load it give me an error:

ds.o: couldn't find the kernel version the module was compiled for

Thanks in advance for your help.

----------

## keratos68

Mmm, sounds like a few broken links.

Make sure /usr/src/linux is symlinked correctly to the existing source tree, then edit your /usr/src/linux/.config file to make CONFIG_MODVERSIONS=y

Then, do the following:

```
cp .config /usr/tmp/.config

make mrproper

mv /usr/tmp/.config .

make bzImage && make modules && make modules_install
```

This should clean things up and perform a tidy rebuild.  The CONFIG_MODVERSIONS change tells the module loader to relax a little!!

Is that any better?

----------

## chadh

Is this still a problem?

If it is, I will need to see your /usr/src/linux/.config.  ds can either come from the kernel of from pcmcia.  If you built pcmcia *into* the kernel, then you will not have the module, though, although nothing should complain if that is the case.

----------

## heijs

Perhaps you need to load yenta_socket as well?

----------

## esprout

The PCMCIA card works if I compile pcmcia support into the kernel, but not as a module.  However, it appears that the pcmcia-cs package tries to load the ds.o module whether pcmcia is compiled into the kernel or as a module.

So I am guessing I'm running into two separate problems.

1.  pcmcia build as a module does not work for me.  I don't know why having it built into the kernel does, but I'm willing to live with it  :Very Happy: 

2.  pcmcia-cs package tries to load ds.o without checking to see if pcmcia is built as module, or built into kernel.

Perhaps someone else can provide more enlightenment as to how everything is *supposed* to work.

----------

## chadh

Alright, so the only problem is that you see that warning from modprobe (can't find ds)?  If so, then don't worry about it.  As you noticed, the init script blindly tries to load ds and yenta_socket if there is no entry in lsmod.  If you know of a general way to determine if pcmcia is built into the kernel, then I would love to hear it, but I was unable to determine a way when I wrote the init script.

----------

## heijs

Perhaps you can see it with:

```

cat /usr/src/linux/.config | grep CONFIG_PCMCIA

```

But this won't always work of course...   :Sad: 

----------

## chadh

 *heijs wrote:*   

> But this won't always work of course...  

 

Exactly.

If it ever becomes standard to include the kernel config variables in the kernel itself (available with patches now, and I am not sure of the status in 2.5), then we can take advantage of that.

----------

## esprout

Well, the other half of the problem is why compiling pcmcia support as a module doesn't work for me, when compiling it into the kernel does.

So it'd be nice to know why I get the error:

ds.o: couldn't find the kernel version the module was compiled for

When I compile it as a module.

----------

