This page is specific to Ubuntu versions 8.04, 8.10, 9.04, 9.10, 10.04, 12.04

If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.


Introduction

Modules are to Linux what drivers are for Windows. For a general introduction to modules, see the Loadable_Modules page.

In LTSP, it's essential to have the network modules for the network cards of the clients in the initramfs, otherwise the clients won't be able to boot. In this page it's assumed that the network card module is shipped with the Linux kernel, but it's not contained in the LTSP initramfs.

Preparation

You'll need to identify the missing module. For example, booting a client with a live USB stick and running lspci -k or lsmod might reveal that the module atl1c is used. But, when booting the same workstation as an LTSP client, an "ipconfig: cannot load /tmp/net-eth0.conf" error message is shown, which means that the atl1c module is not contained in the initramfs.

Adding the module

Previously, this wiki page suggested adding the missing module to /opt/ltsp/i386/etc/initramfs-tools/modules. Unfortunately, this causes the module to be forcefully loaded even on clients that don't have the respective hardware. A better approach is to create the following script:

sudo editor /opt/ltsp/i386/usr/share/initramfs-tools/hooks/additional_net_modules

with the following contents:

# !/bin/sh
# initramfs hook to add some additional net modules

MINKVER="2.6.24"
PREREQ=""

# Output pre-requisites
prereqs()
{
     echo "$PREREQ"
}

case "$1" in
prereqs)
     prereqs
     exit 0
     ;;
esac

# Abort if not inside an ltsp-chroot
test -f /etc/ltsp_chroot || exit 0

. /usr/share/initramfs-tools/hook-functions

# In Lucid initramfs-tools (0.92), the auto_add_modules "net" function in
# /usr/share/initramfs-tools/hook-functions only adds some of the network
# modules, not all of them. it was fixed in initramfs-tools 0.98, so just
# manually add a few common modules for now.
for module in atl1c atl2 bnx2 jme r8169 sis190; do
    manual_add_modules "$module"
done

Warning: the wiki doesn't allow code that contains shebangs, so in the previous script delete the space in the first line: #!/bin/sh

Next, make the script executable:

sudo chmod +x /opt/ltsp/i386/usr/share/initramfs-tools/hooks/additional_net_modules

Finally, update the chroot initramfs and copy the updated kernels in the tftp directory:

sudo chroot /opt/ltsp/i386/ update-initramfs -u
sudo chroot /opt/ltsp/i386/ /usr/share/ltsp/update-kernels
sudo ltsp-update-kernels

Reboot the clients. If everything went OK, they should be able to boot.

See Also

  • UbuntuLTSP - Community Ubuntu LTSP Documentation.

UbuntuLTSP/AddingModules (last edited 2012-12-13 22:12:50 by citlee)