Lesson 6: Managing Kernel Modules Flashcards
What is a Kernel Space?
This is where the kernel executes the services that it provides with full system privileges. Typical only includes critical software (modules, drivers, services, SELinux).
note. user space, will include everything else
What are the two classifications of the Linux Kernel?
- Monolithic (bigger, faster, uses a lot of RAM, less secure)
- Microkernel (small, more stable, slower, other modules are stored in user space. runs the minimum amount ofresources necessary)
How do you view which kernel you are running?
uname -a (give all details)
- r view the kernelversion number of your current system
- i to view the hardware platform
What are the several layers that operate in kernel space?
System CallInterface (SCI) (handles system calls sent from user applications to the kernel)
Process management (handles different processes by allocating separate execution space on the processor and ensuring that the running of one process does not interfere with other processes)
Memory management (manages the computer’s memory)
File system management (manages the filesystem, which involves storing, organizing, and tracking files and data on a computer, also supports a virtual file system (VFS))
Device management (manages devices by controlling device access and interfacing between user applications and hardware devices of the computer)
Where can you view the Kernel files?
Can be view in /boot
What is Vm Linuz ?
Vm Linuz is your kernel file that gets booted up
Where can you view the kernel modules?
Can be viewed in /use/lib/modules or /lib/modules (in some distributions).
Kenel Modul subdirectories - Inside /usr/lib/modules//kernel/ are severalsubdirectories
archArchitecture-specific support.
crypto Encryption and other cryptographic functions.
drivers Various types of hardware.
fs Various types of file systems.
net Networking components such as firewalls and protocols.
What command shows modules?
lsmod
allow you vies all modules and their status
What are the advantages of kernel modules are?
They reduce the burden on the kernel because otherwise all of the modules’functionality would have to be added directly to the kernel.
Dynamic loading of kernel modules facilitates lower memory consumption.
They avoid having to rebuild and reboot the system when new functionality isrequired.
note. kernel module file consists of a .ko extension. Modules built for a specific kernelversion may not be compatible with another version of the kernel.
How you view information about a module?
modinfo {module_name or file_name}
How do you install a module?
insmod {file_name}
How do you delete a module?
rmmod {mod_name}
How do you enable a module?
Tell the system to probe for new hardware using modprobe.
How do you specify hardware you don’t loaded?
create a .conf file in /etc/modprobe.d and specify that hardware and the rules that apply
alias {alternative name} {module name}Specify an alternative name for a module with along name.
blacklist {module name}Ignore internal aliases, which occur whenmodules define their own aliases.
install {module name} {command}Run the specified command without inserting themodule into the kernel.