hi everyone

Many thanks to René and Ashkay, both of you posted vital info, and I have now successfully compiled my very first kernel module 🙂

My suggestion for other newbies is to use aptitude rather than apt-get for installing packages – it will look for the dependent packages for you.

The detailed steps of how to do this are as follows:

At the main screen, type

/kernel.source.2.6.

(or whatever kernel you are on). It puts you at the top of the list of kernels. NB you do *not* want the item kernel.source.2.6, you need to find something like kernel.source.2.6.8.

Hit return to go to the list it is showing you, use the arrow keys to go to the exact one that you want, and hit + to add it to your system.

Then

/kernel.headers.2.6.

and find the right headers, followed by

/kernel.package

Note that ‘.’ is a wild card here, so if you are as lazy as me you can use dot to match any punctuation. (You can also use ‘.*’ as a multi character wild card, and other perl-like regexps)

Then hit g to get the packages, and aptitude shows you a screen with two main headings, what it thinks you need as well, and what you asked for. Put the cursor on either of these and hit enter to expand the list, if you want to check. For me it had correctly spotted that I needed make and gcc. It did not get the ncurses stuff, but it seemed to work anyway (aptitude lists that as ‘recommnded’ not as essential).

Then if you need to change anything, use q to quit the get and go back to selecting packages. Use + to add them, – to remove them, then g to look at the list again.

When the list looks right, press g a second time, and aptitude automatically downloads and installs everything.

When it comes back, q y will exit. Often (especially on a ssh session) aptitude leaves the screen a mess, so type clear<return> to get bask to clear it for you.

Now resume René’s instructions from

cd /usr/src
tar -xjvf kernel-source-2.6.8.tar.bz2

Hope this helps someone as much as R & A have helped me here 🙂
River~~