Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to get DAHDI installed for Asterisk on my Slicehost slice...

I start off sudo apt-get install dahdi-dkms dahdi-linux

Which partially fails with this in the install log:

Setting up dahdi-dkms (1:2.2.1+dfsg-1ubuntu2) ...
Loading new dahdi-2.2.1+dfsg-1ubuntu2 DKMS files...
First Installation: checking all kernels...
Building only for 2.6.33.5-rscloud
Building for architecture x86_64
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.

This seems to be because I do not have the kernel source installed. However, with Slicehost, kernel sources are only available through http://kernel.slicehost.com... in my case, this is the kernel source I need: http://kernel.slicehost.com/2.6.33.5-rscloud/patched_source/2.6.33.5-rscloud.tar.bz2

Those kernel sources--so far as I'm aware--do not exist in any apt-get repository.

So I download and extract the source, but I don't think it is "installed" the same way as if I had gone through apt-get install kernel-source or whatever, and so I keep getting this error when trying to install dahdi.

How can I "install" the Slicehost compressed kernel code of my system so that I can install dahdi through apt-get??

I am running Ubuntu Lucid.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Here's the process. Prepare the kernel first:

wget -q http://kernel.slicehost.com/2.6.33.5-rscloud/patched_source/2.6.33.5-rscloud.tar.gz
mkdir /usr/src/kernels/
tar xzf 2.6.33.5-rscloud.tar.gz -C /usr/src/kernels/
cd /usr/src/kernels/linux-2.6.33.5/
zcat /proc/config.gz > .config
make oldconfig && make modules_prepare

Once that's done, just follow the documentation provided with the dahdi module in the Makefile:

cd ~
svn co http://svn.digium.com/svn/dahdi/linux/trunk dahdi-kernel
cd dahdi-kernel
KSRC=/usr/src/kernels/linux-2.6.33.5/ make install

You should then be all set:

# modprobe dahdi
# lsmod | grep dahdi
dahdi                 186793  0 
crc_ccitt               1203  1 dahdi
# modinfo dahdi
filename:       /lib/modules/2.6.33.5-rscloud/dahdi/dahdi.ko
version:        SVN-trunk-r8983
alias:          dahdi_dummy
license:        GPL v2
description:    DAHDI Telephony Interface
author:         Mark Spencer <markster@digium.com>
srcversion:     B1B1151F11B45BEFBEEE0B0
depends:        
vermagic:       2.6.33.5-rscloud SMP mod_unload 
parm:           debug:int
parm:           deftaps:int

I just did this on a slice running Debian Lenny and 2.6.33.5-rscloud.

share|improve this answer
    
"When you build the dahdi module, you'll need to specify the path to your kernel source that you just prepared." How do I do this?? –  neezer Jul 27 '10 at 19:15
    
Check my updated post above. –  majorhayden Jul 27 '10 at 21:03
    
Sweet awesomeness! That was EXACTLY what I was looking for! I've been banging my head over this four hours... Thank you so much! –  neezer Jul 27 '10 at 21:15

Have you checked this article?

http://articles.slicehost.com/2010/6/18/downloading-and-using-kernel-source-code-2-6-32-12-and-newer-on-ubuntu

Follow the steps to install the headers and prepare for module installation, and hopefully those will let you install the package.

Often packages expect to find kernel source in /usr/src, so if it complains after you unpack it there and do the headers and module_prepare stuff, try making a symlink from /usr/src/linux to where you unpacked the source.

share|improve this answer
    
Yes, I have checked that article (where I got the kernel.slicehost.com mentioned in my question). I have downloaded the source, uncompressed it, and ran the headers and modules_prepare stuff and all that jazz... yet I still don't have a clear answer on how to actually compile dahdi--either through apt-get or manually--with this kernel source. That's what I really need to know! –  neezer Jul 27 '10 at 20:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.