Questions and answers

1. Linux Kernel

1.1.

Which technique is used in modern kernels to reduce their disk footprint?

Kernel images are compressed to reduce diskspace.

Types of kernel images

1.2.

What is the purpose of using kernel modules?

In order to only use resources when needed, kernel modules can be loaded into the kernel on demand. Also, modules can be changed and reloaded without the need to reboot the kernel.

What are kernel modules

1.3.

Why is running the command make mrproper generally a good idea?

As it prevents problems with the subsequent configuration and/or build of the kernel.

Using mrproper

1.4.

What is the most important advantage of running make config in stead of make menuconfig, make xconfig or make gconfig?

The command does not depend on any full-screen display capabilities and is therefore useable on slow links and systems with limited display capabilities.

Why use make config?

1.5.

What needs to be done after running make modules?

make modules_install is used after succesfully building the modules (device drivers and other items that were configured as modules). This installs them under /lib/modules/ kernel-version.

How to install modules?

1.6.

For which distributions should you use mkinitramfs for creating an initrd image?

The debian(-based) distributions use mkinitramfs.

Create an ignited image using mkinitramfs

1.7.

By which means can a patch be removed from a production kernel?

Either apply the patch again or run the command patch with the -R parameter.

Removing a kernel patch from a production kernel

1.8.

Why is using modprobe recommended instead of using insmod to insert modules?

Modprobe is more specific about errors. It also works with just the module name and it can handle prerequisite relationships between modules.

Using modprobe

1.9.

By which means may the version of the running kernel be determined?

You could check by usingcat /proc/sys/kernel/osrelease or by using uname -r.

Obtain version of the running kernel

1.10.

Which command generates the file /lib/modules/kernel-version/modules.depfile (a list of module dependencies)?

This file is generated by the depmod command.

Obtain version of the running kernel

1.11.

Which technique is used in modern kernels to reduce their memory footprint?

On demand loadable modules are used to reduce a kernel's memory footprint.

Types of kernel images

1.12.

For which reason was udev designed?

It was designed to make Linux device handling more flexible by taking device handling out of the kernel into user space.

udev device handling

Copyright Snow B.V. The Netherlands