Home  |Overview |Search |History |Versions |Categories |Keywords | Home

Keyword search

If you have e.g. a problem with your modem, enter "modem" and press Enter.


* Support offerings
* Installation support
* Hardware database
* Unlock your Support Key
* Download
* Contact information
    AdSolution - Internet Werbeflächen Management System
Advertisment
Printable version Mailto SuSE

Installing SuSE Linux Using Updated Kernel Device Drivers

o Deutsch

Email address:
Support knowledgebase (hmeyer_driver_update)
Applies to

SuSE Linux: Versions since 7.1

Situation

You want to install SuSE Linux (7.1 and above) on devices not supported during the creation of the distribution and be able to boot the installed system afterwards without having to manually install the new device drivers after the installation.

Procedure

It is possible to create an update medium (Floppy/CD-ROM) that contains the updated driver modules. This is described in the following document.

Installing SuSE Linux Using Updated Kernel Device Drivers

Author: Lenz Grimmer
Last changed: 2001-11-19

Note: This document is still in draft status!

Scope

Providing a possibility to install SuSE Linux (7.1 and above) on devices that were not supported during the creation of the distribution and being able to boot the installed system afterwards without having to manually install the new device drivers after the installation. Even though linuxrc (the first stage of the SuSE Linux installation process) has the ability to load driver modules from a separate modules floppy, these modules are not used for the installed system afterwards, because YaST installs a kernel RPM during the package installation. This driver update feature will use a provided kernel driver module during the installation and will also place it into the installed system for booting the installed system later.

Procedure

Update or add the driver code in the kernel source tree and rebuild the driver module, create an update medium (Floppy/CD-ROM), that contains the updated driver modules and (optional) additional files.

Format of the Update Media

During the initial installation, SuSE Linux offers a possibility to load driver modules from a separate update medium. This medium can either be a CD-ROM or a floppy disk.

The CD-ROM must use an ISO9660 file system, using either Rockridge or Joliet extensions. A floppy disk can be formatted with either a vfat, minix, or ext2 file system.

Directory Structure

The file system on the medium must have the following directory structure:

/linux/suse/<arch>-<version>/
The common root directory (e.g., /linux/suse/i386-7.1). You can also have driver updates for multiple architectures on the same update medium, for example, /linux/suse/ppc-7.1 or /linux/suse/axp-7.1. Other distributions could place their drivers below /linux/<distribution>, enabling a facility to offer driver updates for multiple distributions on the same medium.
/linux/suse/<arch>-<version>/install/
This directory contains an optional preinstallation script named update.pre, the driver modules for all possible kernel versions as a gzipped tar archive named update.tar.gz, and an optional postinstallation script named update.post.
/linux/suse/<arch>-<version>/modules/
This directory contains the uncompressed updated driver modules (*.o) for the default kernel (e.g., 2.2.18 without SMP on SuSE Linux 7.1) that are being loaded during the initial installation.

Example Directory Structure:

linux/
`-- suse
    `-- i386-7.1
    |   |-- install
    |   `-- modules
    `-- ppc-7.1
        |-- install
        `-- modules

Included Files on the Update Medium

The file update.tar.gz is a gzipped tar archive that includes the directory structure and the updated driver modules. The archive should contain the driver modules compiled for all kernel versions available on the distribution in both SMP and uniprocessor configuration. In addition to that, the tarball may include new device nodes in /dev/ or other files that should be installed into the system (e.g., additional documentation). It will simply be extracted in the root directory of the installed system. Note that the files contained in this archive will not be listed in the RPM database and will overwrite files that are already installed on the system.

update.pre is an optional shell script that contains commands that should be executed within the running installation system immediately after YaST is started, such as creating device entries using mknod or echoing parameters into /proc/sys/*.

update.post is an optional shell script executed by YaST after the basic installation has finished and the update.tar.gz archive has been extracted into the installed system. This script is executed in the root directory of the installed system. It can be used for adding or changing entries in modules.conf, creating device nodes in the installed system, or similar things.

Note: In addition to the above mentioned files required for the initial installation, the update medium can contain additional packages that can be installed using the YaST2 vendor driver update module, which is documented separately.

Creating the Driver Modules

To create these updated driver modules, you have to patch the original SuSE kernel sources and recompile the modules. This makes sure the new driver modules are built out of the same source tree as the kernel used for the initial installation and the kernel RPMs installed for the normal system operation.

The SuSE Linux 7.1 kernel sources come as two RPMs:

lx_sus22.rpm -- the 2.2 Kernel source tree (including SuSE patches)
lx_sus24.rpm -- the 2.4 Kernel source tree (including SuSE patches)

For SuSE Linux 7.2 and above, the kernel source tree is included in package kernel-source.rpm

They are located in package series d (Development) and can be installed manually using RPM or by using YaST.

When you try to install multiple kernel source RPMs at the same time, there is a file conflict between those that can be ignored. /usr/src/linux is a symbolic link included in all packages. Just make sure it points to the current kernel source directory.

The configuration file used to build the respective binary kernel RPM is located in the /boot directory of the respective package. Simply copy it into the kernel source tree and run "make oldconfig" to use it.

Example:

To compile the default 2.2.18 kernel in the same way it has been done for the distribution, install the following packages:

k_deflt.rpm - (the binary 2.2.18 package, which includes the configuration)
lx_sus22.rpm - (the source tree of the SuSE 2.2.18 kernel)

Now run the following commands:

cd /usr/src/linux
cp /boot/vmlinuz.config ./.config
cp /boot/vmlinuz.autoconf.h ./include/linux/autoconf.h
cp /boot/vmlinuz.version.h ./include/linux/version.h
make oldconfig

Alternatively, if you have booted using the kernel you want to rebuild, you can also run make cloneconfig. The SuSE kernels include the "cloneconfig patch", which enables you to look at the kernel configuration used to create the currently running kernel. It is located in /proc/config.gz.

To create the directory structure for the update tar archive, run the following commands (using the bash shell). This example will create the required directories for a SCSI driver module for all kernel versions on SuSE Linux 7.1-i386 below the /tmp directory.

mkdir -p /tmp/lib/modules/{2.2.18,2.2.18-SMP,2.4.0-4GB,2.4.0-64GB-SMP}/scsi

This will create the following directory structure below /tmp:

lib/
`-- modules
    |-- 2.2.18
    |   `-- scsi
    |-- 2.2.18-SMP
    |   `-- scsi
    |-- 2.4.0-4GB
    |   `-- scsi
    `-- 2.4.0-64GB-SMP
        `-- scsi

SuSE Linux 7.1 ships with the following kernel RPMs:

k_deflt - The default 2.2.18 kernel, no SMP
k_smp - The 2.2.18 kernel, including SMP support
k_deflt_24 - The 2.4.0 kernel, no SMP, BIGMEM (4GB RAM) support
k_smp_24 - The 2.4.0 kernel, including SMP and HIGHMEM (64GB RAM) support

All these kernel RPMs are available on CD1:/suse/images/ and they include both the core kernel image /boot/vmlinuz and the corresponding driver modules.

After patching the kernel sources and recompiling the required driver modules, copy the generated files into the respective directory. Make sure they all belong to user "root" and have the correct permissions (modules should have -rw-r--r--, directories should have -rwxr-xr-x). After you have placed all files into the correct location, create the update.tar.gz file using the following command:

cd /tmp
tar czvf update.tar.gz lib

This will create a compressed tar archive update.tar.gz in the /tmp directory, which can now be copied to the directory /linux/suse/<arch>-<version>/install/ on the installation medium. The directory names in the tar archive must not include the leading slash.

Example:

On SuSE Linux 7.1, this would result in the following modules for the new Adaptec SCSI driver aic7xxx:

lib/modules/2.2.18/scsi/aic7xxx.o
lib/modules/2.2.18-SMP/scsi/aic7xxx.o
lib/modules/2.4.0-4GB/scsi/aic7xxx.o
lib/modules/2.4.0-64GB-SMP/scsi/aic7xxx.o

Description of the Boot Sequence During the Installation

The installation workflow performs the following steps:
  • The system boots from the installation CD or floppy disk
  • syslinux/isolinux starts up
  • The user presses the "ALT" key (optional, if a medium change is necessary)
  • syslinux prompts the user for an "update medium" (e.g., floppy or CD-ROM)
  • The user inserts the medium and presses the "Enter" key
  • syslinux boots into the "update" mode of linuxrc
  • linuxrc mounts the medium
  • linuxrc copies all files from /linux/suse/<arch>-<version>/install into a directory install in a RAM disk mounted below /update (max. 8MB), all files will be flagged as "executable"
  • linuxrc loads all driver modules below /linux/suse/<arch>-<version>/ modules by first unloading all modules with the same name and loading the new modules from this directory in the order the modules have been installed on the medium. Take care of this if your driver modules depend on other modules being loaded first.
  • linuxrc unmounts the update medium
  • linuxrc starts YaST1 or YaST2 to continue the installation
  • before starting the installation of packages, YaST first executes /update/install/update.pre
  • after the initial installation, YaST extracts /update/install/update.tar.gz in the root directory of the installed system and runs /update/install/update.post.

Addendum for SuSE Linux 7.1

Unfortunately, the driver update implementation in SuSE Linux 7.1 has some bugs that cause it not to properly work as documented above. These additional notes describe how to make a functional driver update disk for SuSE Linux 7.1. These bugs have been fixed for the following releases of SuSE Linux, (e.g., SuSE Linux 7.2, SLES7).

To make it easier to create a working driver update disk for SuSE Linux 7.1, the archive driver_update_disk_template.tar.gz contains a driver update disk template for SuSE Linux 7.1, in which you just have to add the new driver modules. The included update.pre script must be adapted as described below.

The updated modules are not always automatically added to the variable INITRD_MODULES in /etc/rc.config and might therefore be missing in the initial ramdisk /boot/initrd. A work-around has been added to update.pre that will take care of this. Edit the update.pre script and add the modules included in directory /linux/suse/<arch>-<version>/modules/ to the mods variable.

The updated modules will not be copied into the initial ramdisk /boot/initrd as the mk_initrd script is run before update.tar.gz is unpacked. Run mk_initrd and lilo again in update.post to recreate the initial ramdisk with the updated modules.

mk_initrd has a bug that prevents it from working within a chroot() environment (thus it won't work in update.post). A fixed mk_initrd is provided in driver_update_disk_template.tar.gz (in update.tar.gz). Do not remove it, but instead add your modules to update.tar.gz.

YaST1 will look for update.tgz instead of update.tar.gz. If you want to use YaST1 for the installation and the space on the drive update medium permits it, just create both files. Alternatively, create a symbolic link update.tgz -> update.tar.gz if the file system on the update medium allows links.


Keywords: YAST, DRIVER, KERNEL, MODULE, UPDATE

Categories: YaST

SDB-hmeyer_driver_update, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 19. Dez 2001
SuSE Linux AG - Last generated: 15. Mai 2002 by hmeyer (sdb_gen 1.40.0)