How to create a customized modules floppy

Support knowledgebase (grimmer_modules_floppy)
Applies to

SuSE Linux: Versions since 7.0

Request:

You want to create a customized driver modules floppy that includes either an updated or a completely new kernel driver.

Procedure:

The different driver modules on the SuSE Linux modules floppy disk are stored in compressed files that contain a Minix file system. These images are being mounted via the loop device, and the required modules are being loaded by linuxrc either manually or automatically.

To create a customized modules floppy, you first have to create an empty file large enough to carry the required driver modules. Then you create a Minix file system in this file and mount it using the loop device.

Here is a practical example for the sis900 network driver:

dd if=/dev/zero of=/tmp/net-mod count=2200 bs=1k
mkfs.minix /tmp/net-mod
mount -oloop -tminix /tmp/net-mod /mnt
cp /lib/modules/2.4.4-4GB/kernel/drivers/net/sis900.o /mnt

Of course, the kernel version of the module must match the kernel version that is being used during the installation. Also make sure, that all module dependencies are resolved! Some modules require other modules to be loaded in advance - see /lib/modules/<kernel-version>/modules.dep for the dependency tree.

Now you have to create an empty file which name describes the kind of modules that are included in this archive: ("SCSI", "NET", "OTHER") as well as "MORE" and "NEEDMOD".

For our network driver this would be:

touch /mnt/NET

Now unmount the file system and compress this image file with gzip:

umount /mnt
gzip /tmp/net-mod

Now save the file net-mod.gz to a a DOS-formatted floppy disk:

mformat a:
mcopy /tmp/net-mod.gz a:

Depending on the modules included, name it either scsi-mod.gz, net-mod.gz or other-mod.gz (according to the menu entries in linuxrc).

To load this driver module, boot from an installation medium and use the "manual" mode. linuxrc offers a menu to load drivers from a drivers floppy disk. Please note, that this driver will only be used during the installation! You have to manually copy the updated driver into the installed system, if you want to be able to use it later on.

If you want to create a downloadable image of your customized modules floppy disk, you can use the following command, which will create a disk image named modules.img in the current directory:

dd if=/dev/fd0 of=modules.img bs=9k

Keywords: DRIVER, MODULES, FLOPPY, DISK, KERNEL, BOOT

Categories: Kernel

Feedback welcome: Send Mail to grimmer@suse.de (Please give the following subject: SDB-grimmer_modules_floppy)
SDB-grimmer_modules_floppy, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 12. Sep 2001
SuSE Linux AG - Last generated: 10. Dez 2001 by grimmer (sdb_gen 1.40.0)