Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

4. 201.2 Compiling a Linux kernel

Total questions: 48

Worksheet time: 33mins

Name
Class
Date
1.

What's the common location to store and unpack kernel sources?

a)

/boot/

b)

/boot/efi/

c)

/usr/src/kernel/

d)

/usr/src/linux/

e)

/usr/src/

2.

The following file is an example of source code for Linux:

linux-3.18.43.tar.xz

Which two commands allow you to decompress and unpack that file according to the LPIC-2 book:

a)

unxz

b)

zip

c)

tar

d)

gzip

e)

cpio

3.

"It's a kernel-cleaning command to delete most generated files, but leaves enough to build external modules".

What command is referred to above?

a)

make mrproper

b)

make distclean

c)

make clean

d)

menuconfig

4.

"It's a kernel-cleaning command to delete the current configuration and all generated files. It deletes the main configuration file too".

(a)  

5.

"It's a kernel-cleaning command to remove editor backup files, patch leftover files and the like".

(a)  

6.

What's the file containing configuration information and it has different support options to be compiled into the Kernel?

a)

/usr/src/kernel.config

b)

/boot/vmlinuz/

c)

/boot/kernel.copnfig

d)

.config

7.

Where is located the file containing kernel configuration information and it has different support options to be compiled into the Kernel?

a)

/usr/src/kernel.config

b)

/boot/vmlinuz/

c)

/boot/kernel.copnfig

d)

/usr/src/linux/.config

8.

"This command is used to configure your kernel config file and it's recommended for systems with very limited display capabilities. You are forced to redo everything if you make a mistake".

(a)  

9.

"It's an alternative to make config . It creates a text-mode windowed environment based on the ncurses libraries.

You can switch back and forth between options while configuring your kernel".

(a)  

10.

"This command presents a GUI menu to configure the kernel.

It requires a working X Window System and the QT development libraries to work.".

Type the correct command:

(a)  

11.

"This command presents a GUI menu to configure the kernel.

It uses Gnome to work.".

Type the correct command:

(a)  

12.

"This command can be used to preserve options you choose during an earlier kernel build. changes the names of the file .config to .config.old, and it creates a new one .config file, all this in the path /usr/src/linux/".

Type the correct command:

(a)  

13.

This command is used to compress and decompress the Linux Kernel.

a)

make zImage/bzImage

b)

make modules

c)

make modules_install

d)

make oldconfig

14.

This command builds the modules, the device drivers, and other items that were configured as modules.

a)

make zImage/bzImage

b)

make modules

c)

make build_modules

d)

make oldconfig

15.

This command installs the modules you just compiled under /lib/modules/ kernel-version. The kernel-version directory will be created if nonexistent.

a)

make modules_install

b)

make modules

c)

make build_modules

d)

make oldconfig

16.

__________ is a chunk of memory that the kernel sees as if it were a disk. It can be mounted like any other disk.

Fill in the blank space.

a)

RAM disk

b)

initrd

c)

init ram file system

d)

mkinitird

17.

It's a temporal file system that is loaded into the RAM disk and mounted by the kernel as its root filesystem. Once mounted as the root filesystem, programs can be run from it, and kernel modules loaded from it.

a)

RAM disk

b)

initrd

c)

kernel module

d)

vmlinuz

18.

Which three ways can be used to create your own initrd file?

a)

mkinitird script (RedHat)

b)

DKMS

c)

apt

d)

mkinitramfs script (Debian)

e)

Built the file by hand

19.

It contains archives that contain the files of a minimal root filesystem. This root filesystem normally contains modules, scripts, and some additional binaries required to allow the kernel to properly continue its boot

a)

RAM disk

b)

initrd

c)

kernel module

d)

vmlinuz

20.

Choose all the possible steps to build the initrd file by hand:

a)

Create a root file system.

b)

Populate it with modules and files.

c)

Create a tar or cpio archive (depends on the distro)

d)

Gzip it

e)

Create a RAM disk

21.

What of the following requirements is needed to be able to work with the initrd images?

a)

A loopback device

b)

The number of RAM disks that is available

c)

The kernel has to be compiled with support for the RAM disk

d)

Patching the kernel

22.

Which two steps are needed to create a RAM disk image?

a)

Create a filesystem on a block device

b)

Compile the kernel

c)

Patch the kernel

d)

Copy the files to the filesystem you've created as needed

e)

Partition the disk intended to be a RAM disk

23.

Which are two suitable devices to use to create a RAM disk image?

a)

HDD device

b)

SDD device

c)

RAM Memory device

d)

Loopback device

e)

Rom device

24.

"Linux indeed has a "ramdisk" driver that could provide /dev/ram# devices, and it might be available on your system, but it is usually not loaded by default and those device nodes will not exist unless you load that driver first."

Which command loads that kernel module?

(a)  

25.

The number of RAM disks that is available by default on a system is which option in the kernel configuration?

a)

CONFIG_BLK_DEV_RAM=

b)

CONFIG_BLK_DEV_RAM_COUNT=

c)

CONFIG_BLK_DEV_RAM_SIZE=

d)

CONFIG_BLK_DEV_RSXX=

26.

Type the command to create an empty filesystem on /dev/ram0 with 300MB and without reserve blocks.

(a)  

27.

Which of the following commands creates the device node that will be used when the initrd is active?

a)

mke2fs -m0 /dev/ram0 300

b)

mknod -m0 /dev/ram0 300

c)

mknod /mnt/dev/tty1 c 4 1

d)

mke2fs /mnt/dev/tty1 c 4 1

28.

Which command is used to reclaim the memory space that was allocated to the RAM disk?

a)

freeramdisk /dev/ram0

b)

freerinit /dev/ram0

c)

free/dev/ram0

d)

freeinitrd /dev/ram0

29.

Which command is used to patch a Linux kernel?

a)

patch -p1<patchfile

b)

patch patchfile

c)

patch-kernel patchfile

d)

patch -k patchfile

30.

"If the patch utility is unable to apply a part of a kernel's patch, it puts that part in a reject file".

How would that file be shown?

a)

Name of the output file + .rej

b)

Name of the output file + .kern

c)

Name of the output file + .patch

d)

Name of the output file + # in case .rej would generate a filename that is too long.

e)

Name of the output file + .patch + #

31.

What does DKMS stand for?

(a)  

32.

"It's a framework, capable of automatically compiling and/or installing kernel modules for every kernel version available on the system. It was developed by Dell".

a)

DKMS

b)

DMKS

c)

initrd

d)

Dracut

33.

What is a uniform requirement across all distributions for the kernel when using DKMS?

a)

Install kernel header files

b)

Install the newest kernel

c)

Patch the kernel

d)

Install the dracut package

34.

Type the command to install the kernel header files on Red Had based Linux distributions:

(a)  

35.

Type the command to install the kernel header files on Debian based Linux distributions:

(a)  

36.

After the installation of DKMS packages, where are they placed?

a)

/usr/src/module-version

b)

/usr/module-version

c)

/boot/grub/module-version

d)

/usr/bin/module-version

37.

Choose all the options contained in a dkms.conf?

a)

BUILT_MODULE_NAME

b)

BUILT_KERNEL_NAME

c)

DEST_MODULE_LOCATION

d)

BUILT_MODULE_LOCATION

e)

PACKAGE_NAME

38.

Choose all the options contained in a dkms.conf?

a)

PACKAGE_VERSION

b)

DKMS_VERSION

c)

AUTOINSTALL

d)

MODULE_VERSION

e)

REMAKE_INITRD

39.

Which option of the dkms.conf determines the name of the compiled module?

a)

BUILT_MODULE_NAME

b)

BUILT_KERNEL_NAME

c)

DEST_MODULE_LOCATION

d)

BUILT_MODULE_LOCATION

e)

PACKAGE_NAME

40.

Which option of the dkms.conf determines the location of the compiled module?

a)

BUILT_MODULE_NAME

b)

BUILT_KERNEL_NAME

c)

DEST_MODULE_LOCATION

d)

BUILT_MODULE_LOCATION

e)

PACKAGE_NAME

41.

Which option of the dkms.conf determines the name associated with the entire package of modules?

a)

BUILT_MODULE_NAME

b)

BUILT_KERNEL_NAME

c)

DEST_MODULE_LOCATION

d)

BUILT_MODULE_LOCATION

e)

PACKAGE_NAME

42.

Which option of the dkms.conf determines the version associated with the entire package of modules and is mandatory?

a)

PACKAGE_VERSION

b)

MODULE_VERSION

c)

AUTOINSTALL

d)

DEST_MODULE_LOCATION

e)

REMAKE_INITRD

43.

Which option of the dkms.conf determines whether or not the dkms_autoinstaller service will try to install the module for every kernel the system boots in to?

a)

DEST_MODULE_LOCATION

b)

PACKAGE_VERSION

c)

AUTOINSTALL

d)

MODULE_VERSION

e)

REMAKE_INITRD

44.

Which option of the dkms.conf determines whether the initrd image should be generated again after this module is installed. The value of this directive defaults to "no"?

a)

PACKAGE_VERSION

b)

DEST_MODULE_LOCATION

c)

AUTOINSTALL

d)

MODULE_VERSION

e)

REMAKE_INITRD

45.

Which is the full path of the folder which holds example configuration files of the dkms on Debian-based Linux distributions?

(a)  

46.

Which is the full path of the folder which holds example configuration files of the dkms on Red Hat-based Linux distributions?

(a)  

47.

"It can take care of generating a new initramfs image whenever there seems a need to do so".

a)

DKMS

b)

Dracut

c)

RAM disk

d)

mrproper

48.

"It's the process of deleting the full or a part of the files, objects, and configuration created by a kernel when it was compiled, in case you need to recompile it in the future with new modules and objects".

a)

Compile a kernel

b)

Clean a kernel

c)

Recompile a kernel

d)

Build a kernel

e)

Build kernel modules