Linux
Linux Kernel & Modules
66 flashcards · answers and spaced-repetition review in the KnowCard app
A driver is clearly working but its module name never appears in lsmod output. What is the most likely explanation?
What does it mean that the Linux kernel is modularized, and why is that an advantage when you swap out hardware?
When you plug in a USB stick and its filesystem module loads on its own, which kernel component did that, and what configures it?
Why does each installed kernel version get its own separate module directory, and how do you find the right one for the running kernel?
You need to load a module by name and want its dependencies pulled in automatically. Do you reach for insmod or modprobe, and why does the distinction matter?
How do you find out which kernel module is actually driving a given PCI device versus which modules are merely available for it?
You run rmmod on a module and it refuses to unload. Under what condition does rmmod succeed?
modprobe needs to know that loading the nfs module also requires lockd and sunrpc. Where is that dependency information kept?
You want a specific module loaded at every boot independent of any autoload logic. How does the approach differ between Debian/Ubuntu and Fedora/RHEL?
In a modprobe config file, what do the alias, options, and blacklist keywords each control?
An obsolete network protocol keeps triggering module-not-found errors at boot. How do you silence them via modprobe config?
Beyond gcc and make, what one thing is easy to forget when compiling a kernel module, and what are the build steps?
After every kernel update your self-compiled NVIDIA module stops working. What subsystem is designed to prevent exactly this, and how does it hook in?
Once a module is under DKMS control, which command normally rebuilds it after a kernel update, and how do you see what DKMS manages?
You compile the vanilla kernel from Linus Torvalds and a feature that worked on your distro kernel now breaks. What is the root cause?
Distributions handle kernel updates in three different ways. What are they, and which distros exemplify each?
Where does kernel source code normally live, and how do you pick out a specific stable version from the git repository?
In a kernel .config file, what is the difference between a line ending in =y and one ending in =m?
Rather than configure a kernel from scratch, you want to start from your distro's current config. Where do you get it, and what does make oldconfig do with it?
You're in a hurry and want to compile only the modules your machine actually uses. Which config target does that, and what's the catch?
A monolithic kernel and a modularized kernel differ in one fundamental way. Which is recommended in almost all cases, and why?
After make -j all and modules_install, the new kernel still isn't bootable. What does make install actually do to activate it?
You installed a freshly compiled kernel and it fails to boot. Why are you not stranded, and what step makes the new kernel selectable in the first place?
Kernel live patching lets you fix the running kernel without a reboot. How can you tell whether your kernel even supports it, and when did the capability land in mainline?
How can a non-paying Ubuntu user get kernel live patches, and what is the hidden trade-off in the free tier?
How do you find out exactly which CVEs the applied live patches fixed, and where patch-application events are logged?
Live patching is enabled on your server, yet after a kernel update it still says a reboot is required. Why isn't that a contradiction?
The /proc/kcore file appears to be gigabytes in size. Why does it consume no disk space at all?
Which /proc files would you check to see the CPU details, the exact parameters the kernel was booted with, and the currently active modules?
The /sys directory holds some of the same data as /proc but organized around a different purpose. What is that purpose, and what do you find under /sys/block, /sys/class, and /sys/module?
You pass a driver parameter as a GRUB kernel boot option but it has no effect on your module. What went wrong?
What do the kernel boot options root=, ro, init=, and quiet each control?
After installing an NVIDIA card the screen goes black at boot before drivers are set up. Which kernel boot option gets you a usable display, and what does it disable?
You want to turn on IP forwarding immediately without editing config files. How do you flip a kernel parameter at runtime through /proc?
sysctl and echoing into /proc/sys both change a runtime parameter, but one is preferred and one makes the change survive a reboot. How do sysctl -w, -a, -p, and /etc/sysctl.conf fit together?
What kind of flaw are Spectre and Meltdown, and why can't they simply be fixed for good?
Where do you look to see which CPU vulnerabilities affect your machine, and what do the mitigations= kernel settings auto, auto,nosmt, and off trade off?
You tested mitigations=auto,nosmt at the GRUB prompt and want to keep it permanently. What two steps make a kernel boot option persistent?
Scanning ps axu you see several process names wrapped in square brackets like [kswapd0] and [kblockd/1]. What are these, and what does the /1 suffix tell you?
What low-level jobs do the kernel threads kswapd, ksoftirqd, kworker, md, and migration each handle?
Why must a CPU microcode update be re-applied on every single boot instead of being flashed permanently into the chip?
You want to switch the machine to a different kernel but skip the full hardware reboot cycle. Which mechanism boots a new kernel directly from the running one?
Inside /lib/modules/<version> you see files ending in .ko alongside others ending in .ko.xz. What are they, and what does the second extension mean?
Before loading an unfamiliar module you want to inspect its license, author, description, and accepted parameters — without actually loading it. Which command does this?
A module needed to mount the root filesystem can't wait for on-demand loading. If it isn't compiled into the kernel, how does it reach the kernel at boot time?
When you plug in a USB device, how does Linux figure out which specific module matches that piece of hardware and load it automatically?
Beyond running dkms by hand, how do Debian/Ubuntu and Fedora ship driver modules that automatically rebuild themselves after each kernel update?
You decide to install your distribution's kernel source rather than fetch it from kernel.org. Which package do you pull on Debian/Ubuntu vs Fedora/Red Hat vs SUSE, and roughly how much disk do you need?
On SUSE you want to seed .config from the exact configuration of the running kernel. Where does SUSE expose that config, and which make target copies it in?
After reusing an old .config, make oldconfig keeps stopping to ask you about every new option. Which target answers all of them for you, and what does it choose?
Editing the ~8000-line .config by hand is error-prone. Which make targets give you a structured menu instead, and what package do the text-mode ones need first?
Before kPatch and kGraft, one company pioneered live kernel patching but you can't get it from the mainline kernel. What was it, and why isn't it freely available?
Roughly how large is the Linux kernel codebase, and besides C which two languages now appear in it?
Since CPUs with Spectre/Meltdown flaws can't all be replaced, the industry works around them on four fronts. What are the four main mitigation approaches?
Beyond eyeballing /sys/devices/system/cpu/vulnerabilities, which third-party tool gives a detailed per-CVE mitigation report, and how do you run it?
In a modprobe config file, how do you make loading (or unloading) a module run arbitrary commands instead of simply inserting the module?
During a kernel build, what does make -j produce, and why strip the modules during modules_install?
What do the three parts of a Linux kernel version number like 6.3.1 mean, and which old versions still get maintained?
Who is the Kernel and Modules material aimed at, and which kernel generations does it apply to?
You try to page through a /proc file with less and it comes up empty or broken. What's the fix?
You want to pass two kernel boot options, one of them taking two parameters and a hex address. What are the spacing and number-format rules you must get right?
A machine misdetects its RAM, PCI probing fails, a microcode update causes crashes, or a component is allergic to memory probes. Which kernel boot options work around each hardware quirk?
You need to shut off IPv6 completely at the kernel level from the boot loader. Which boot option does it?
A multiprocessor box won't boot cleanly, and you suspect SMP or hyperthreading. Which boot options let you dial back the CPUs, and how do maxcpus=0, nosmp, and noht relate?
You suspect the interrupt controller is causing boot trouble. What does APIC do, and how do nolapic, noapic, and lapic differ?
A laptop won't wake from hibernate, or ACPI is misbehaving during boot. Which ACPI-related kernel boot options address these, and what does each do?
Start learning today
Free to start — download the app or use it in your browser.
