Tutorial how to get modules working in 2.6.x debian and other images
Why installing modules[]
Every kernel version needs binary compatible modules. Modules are stored under Linux in directory /lib/modules, a different directory for every kernel version, for exsample the current is /lib/modules/2.6.11-co-0.6.4
All preconfigured coLinux distributions have no modules installed. This let the distribution untouched for newer coLinux versions in future.
CoLinux can run without modules. Mostly wanted devices are included in kernel directly.
Some distributions would give you warning about missing file modules.dep. If you see this message, or if you need some more device drivers (for sample ipv6), then you should install modules.
Modules installs, different ways[]
Automaticly: initrd.gz installs modules[]
(version 2.6.2 and later)
- Fortunately modules are now provided inside an image initrd.gz which you'll find in the C:\colinux directory after installing the snapshot.
- Modules are supposed to install automatically using the "initrd" mechanism of the XML-file:
<!-- Initial RamDISK (initrd) support --> <initrd path="initrd.gz" />
- Or as command line option:
initrd=initrd.gz
- After installing modules, you can remove the initrd from your configuration.
manual install modules via cofs[]
(version 2.6.3 and later)
- Add your colinux install directory as cofs device to your XML-file:
<cofs_device index="0" path="\DosDevices\C:\coLinux" type="flat" enabled="true" />
- Or as command line option:
cofs0=C:\coLinux
- Start colinux.
- The cofs is a filesystem and no need modules, and no need entries under "/dev". Simple mount the cofs filesystem read only and unpack the modules:
mkdir /mnt mount -t cofs -o ro cofs0 /mnt cd / tar xzf /mnt/vmlinux-modules.tar.gz
- Small facelift: Set the user root as owner for all module files and lets modules.dep the last changed file:
chown -R root.root /lib/modules/*-co-* touch /lib/modules/*-co-*/modules.dep
manual install modules via initrd[]
If the automatic initrdgz didn't work, you can still install them manually:
First, as initrd.gz is a common name I recommend that you copy it to something like initrd.modules.gz,
unzip it to initrd.modules
then add to your XML-file:
<block_device index="3" path="\DosDevices\C:\coLinux\initrd.modules" enabled="true" />
Start colinux.
mkdir /mnt mount /dev/cobd3 /mnt OR mount /dev/cobd/3 /mnt cd / tar xzf /mnt/modules/lib/modules/vmlinux-modules.tar.gz
should do the trick.
--Ollinaie
manual install modules via smb[]
The following information is about installing modules in the older official versions <= 0.6.1
You will find the file vmlinux-modules.tar.gz in c:\colinux (installation directory)
I assume that you already have networking working well enough to use apt-get
First we intall sshd before starting this so you have a terminal you can paste into
apt-get update apt-get install ssh passwd root (sshd won't let you log in to a passwordless root account
Now lets get a decent editor before nano drives us insane
apt-get install mc
Now edit /etc/apt/sources.list
You have 2 choices:
1: Upgrade to sarge (testing)
replace stable with sarge in sources.list
2: Use backports
Add the following line to your sources.list
deb http://www.backports.org/debian stable kernel-image-2.6.6-i386
Whichever option you chose you now need to upgrade
apt-get update apt-get dist-upgrade
Now install module-init-tools (forget possible warnings about modconf)
Get access to the modules tarball from linux. the exact means doesn't really matter i used
apt-get install smbfs mkdir /f smbmount //plugwashlap/f /f
Change to the root dir and extract the modules tarball
cd / tar xzf /f/colinux-20040622-bin/vmlinux-modules.tar.gz
Test it
modprobe ip_tables
Facelift: Owner root[]
- Small facelift: Set the user root as owner for all module files and lets modules.dep the last changed file:
chown -R root.root /lib/modules/*-co-* touch /lib/modules/*-co-*/modules.dep
Test working modules[]
modprobe ip_tables lsmod
lsmod should show the module ip_tables in list of modules.
MassTranslated on 25 Dec 2004.
MassTranslated on Sun Apr 23 17:36:00 UTC 2006
ManuallyAdjusted on 14 Aug 2006