Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed May 14, 2008 11:23 am 
Offline
Senior Member
User avatar

Joined: Fri Aug 15, 2003 2:15 pm
Posts: 111
Website: http://fubegra.net/
If you are going to build any modules on a Xen Linode, you will need BOTH the kernel sources AND an Ubuntu 6.06 distro on which to compile the modules. I found that when I tried to compile modules on my CentOS 4.4 system, I would get "Invalid module format" errors when trying to load them.

You'll need to deploy a 6.06 profile, log in, and then use:

apt-get update
apt-get upgrade
apt-get install build-essential

Then, go to /usr/src, grab the kernel source, and untar it:

wget http://linode.com/src/2.6.18.8-domU-linode7.tar.bz2
tar xvfj 2.6.18.8-domU-linode7.tar.bz2

Create a symbolic link:

ln -s 2.6.18.8-domU-linode7 linux

You should now be ready to compile and test your modules. Once you have done so, go back to the dashboard, change your normal boot profile to connect the Ubuntu image to a virtual device, and boot back into your original system. You can then mount that image somewhere (let's say /dapper for this example), and copy your Ubuntu /lib/modules/2.6.18.8-domU-linode7 tree to your original system.

cp -ax /dapper/lib/modules/2.6.18-domU-linode7 /lib/modules

If you want to rebuild modules, you can just use chroot to bring up a shell in the Ubuntu environment instead of rebooting:

chroot /dapper /bin/bash

_________________
Bus error (passengers dumped)


Top
   
 Post subject:
PostPosted: Wed May 14, 2008 11:28 am 
Offline
Senior Member
User avatar

Joined: Mon Dec 10, 2007 4:30 pm
Posts: 341
Website: http://markwalling.org
The invalid module formats happen because the gcc that you used to build the modules was different then what Linode uses to build the kernels (2.6.18.8-domU-linode7 SMP mod_unload Xen PENTIUM4 REGPARM gcc-4.0). The --force options outlined in modprobe(8) will overcome that if you don't mind tainting your kernel.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group