Linux Format

A QUICK REFERENCE TO: KERNEL MODULES

-

In the early days of Linux the kernel was monolithic. That is, everything was built into it: filesystem­s, hardware drivers and so on. As the range of supported hardware and features grew, this clearly became impractica­l, so loadable modules were introduced. These are effectivel­y individual drivers split from the main kernel into their own files. A distro has hundreds of such modules included with its kernel, but only the ones needed are used. Plug in a Windows-formatted flash drive and the udev daemon will load the correct USB modules, then your desktop’s automounte­r will load the FAT filesystem module.

All of this happens in the background, but you’re able to control it yourself when you need to. The modprobe and rmmod commands load and unload modules, while adding module names to a file in /etc/modules-load.d/ will cause them to be loaded at boot time.

Some modules accept parameters and you can see a list of these with the modinfo command. These can be set as defaults by adding lines to files in /etc/modprobe.d.

Some admins prefer to build a kernel with no modules and everything needed built into the kernel, because they feel it’s more secure. This may be practical with a server that contains a fixed set of hardware and probably shouldn’t have anything else plugged in, but it’s not really suitable for a general-purpose desktop type system.

 ??  ?? Building drivers as modules keeps the kernel to a manageable size and only loads what’s needed, when it’s needed.
Building drivers as modules keeps the kernel to a manageable size and only loads what’s needed, when it’s needed.

Newspapers in English

Newspapers from Australia