SliTaz is a minimal, light-weight (30MB) Linux distribution, available in a liveCD (or USB, obviously). We are using it as the base for developing a liveDVD for a project. These minimal distros are quite nice from the aspect that you install the package you need as you go. The great problem, is that they’re missing *lots* of base packages that need to perform standard operations (e.g. ‘make’). Even worse, they don’t include lots of kernel modules (i.e. drivers). In my case the system didn’t have the required network module.
I was trying to deploy SliTaz on a Xen virtual machine on a Dell Poweredge. With Ethernet card seen by the VM as:
$ lspci | grep Ether 00:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
The kernel module required for this card is either “8139cp.ko” or “8139too.ko”. Both missing from my installation. I had another testing installation on a VirtualBox where the ethernet card worked fine but it needed another module, available by the default installation. A quick look on the SliTaz forums shown that the module I was after should be available with the 3.0 release, the one I was trying. I tried the ‘cooking’ (development) version as well but it didn’t really made any difference.
A way I could deal with this was to start downloading packages from the SliTaz repository in order to install the kernel source files for compiling the required module. The process had to be done manually on the Xen host system. Get the packages -> create map device for the image-> mount the VM’s image on Xen host -> copy the packages -> un-mount the image -> remove the mapper -> boot the VM -> install packages -> find out the dependencies not listed on the package information -> go back to step1. A bit ‘painful’ doing this as a repetitive process to solve the problem.
kpartx -a /gust/image.img mount /dev/mapper/loop0p1 /mnt (cp cp cp cp...) umount /mnt kpartx -d /gyest/image.img
The other way was to use my SliTaz VM instance on VirtualBox that had connection to the Internet. Downloading the kernel source, with all of its dependencies:
$ tazpkg get-install linux-source
Creating a Makefile for the required module:
obj-m += 8139cp.o KVERSION = $(shell uname -r) all: make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules clean: make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
Typing ‘make’ and the module was created. Next step was to copy the module across to the Xen host system and follow the same steps as for copying packages from the local disk over to the VM’s image. Once the module was copied and the VM was booted, the module had to be loaded:
$ insmod 8139cp.ko $ lsmod Module Size Used by Not tainted 8139cp 17252 0 $ ifconfig eth0 up $ udhcpc eth0
eth0 was then up, fetching its IP from the DHCP server. Next step, to automate this on every startup by adding these sequential commands in /etc/init.d/local.sh