Given a scenario, install, configure, and monitor kernel modules Flashcards

1
Q

lsmod

A

“The lsmod command displays the kernel modules that are loaded into memory”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

insmod

A

“The insmod command is used to add modules to the currently running kernel”

“The insmod command has two disadvantages:

You have to know the exact location of the module.

If the module has any dependencies (a module that needs another module), it will fail to load.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

modprobe

A

“The modprobe command is used to add and remove modules from the currently running kernel. Note that it also attempts to load module dependencies”

“-c displays the current modprobe configuration.

  • q causes modprobe to run in quiet mode.
  • R displays all modules that match an alias to assist you in debugging issues.
  • r removes the specified module from memory.
  • v displays verbose messages; this is useful for determining how modprobe is performing a task.”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

modinfo

A

“The modinfo command is used to provide details about a module.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

dmesg

A

“The dmesg command displays the in-memory copy of the kernel ring buffer. It is often used to display bootup messages for debugging purposes”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

rmmod

A

“The rmmod command is used to remove modules from the currently running kernel”

“Modules that are currently in use will not be removed by this command by default”

“Key Options for the rm Command:

  • f attempts to force removal of modules that are in use (very dangerous).
  • w will wait for a module to be no longer used and then remove it.
  • v displays verbose messages.”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

depmod

A

“The depmod command builds the modules.dep file.”

“The modules.dep file contains module dependencies and is used by the modprobe command to determine which modules need to be loaded”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

/usr/lib/modules/[kernelversion]

A

“Each kernel that is installed on the system will have a directory under the /usr/lib/ modules directory for its specific modules”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

/usr/lib/modules

A

“The important part of these directories is that if you manually add new kernel modules to the system, you should place them in the currently used kernel directory under /usr/lib/modules prior to running the depmod command”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

/etc/modprobe.conf

A

“On some distributions, the /etc/modprobe.conf file is used to modify how modules are loaded and unloaded. While this file was commonly used in previous releases of Linux distributions, most distributions now make use of configuration settings in the /etc/modprobe.d directory”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

/etc/modprobe.d/

A

“most distributions now make use of configuration settings in the /etc/modprobe.d directory”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly