LPIC-2 Version magic Practice Question
A company has a fleet of servers running a custom Linux kernel version 5.4. They have developed several in-house kernel modules that interface with proprietary hardware. Due to a security vulnerability, the company decides to upgrade all servers to kernel version 5.10. After upgrading the kernel on a test server, the custom modules fail to load with the error 'Invalid module format' or 'disagrees about version magic'. The system administrator must resolve this issue for all servers. The modules are closed-source and cannot be modified easily. The administrator considers the following options. Question: What is the most effective course of action to load the custom modules on the new kernel?
⚠ Common exam trap
Candidates might assume recompilation is always possible, but the closed-source constraint makes it infeasible. The trap is that modprobe's --force-vermagic is a viable workaround, though risky.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use modprobe with the --force-vermagic option to bypass the version check.
The most effective course of action given the constraints. The custom kernel modules are closed-source and cannot be recompiled (Option A is not feasible). The error 'Invalid module format' or 'disagrees about version magic' indicates a version magic mismatch between the module and the kernel. Using `modprobe --force-vermagic` bypasses the version magic check, allowing the module to load. Although this is a risky workaround (may lead to instability or security issues), it is the only viable option without source code access. Option C (patching the binary) is also not feasible without source, and Option D does not address the version magic mismatch.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Recompile the custom kernel modules against the new kernel headers and install them.
Why it's wrong here
Recompiling requires source code, which is unavailable for closed-source modules. Thus this option is not feasible.
- ✓
Use modprobe with the --force-vermagic option to bypass the version check.
Why this is correct
This bypasses the version magic check, allowing the module to load. It is a workaround but risky.
- ✗
Update the version magic string in the module binary by patching the file.
Why it's wrong here
Patching the binary is complex and also requires source-level changes; not feasible for closed-source modules.
- ✗
Use systemd-modules-load to load the modules later in the boot process.
Why it's wrong here
This does not address the version magic mismatch; the module still fails to load.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-2 question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.