Skip to content

Commit 9c25e59

Browse files
authored
Convey secure boot specific considerations (#177)
1 parent 910715d commit 9c25e59

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lkmpg.tex

+18
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,24 @@ \subsection{Before We Begin}
174174
You will not see it unless you look through your \sh|journalctl| .
175175
See \ref{sec:helloworld} for details.
176176
To have immediate access to this information, do all your work from the console.
177+
\item SecureBoot.
178+
Many contemporary computers are pre-configured with UEFI SecureBoot enabled.
179+
It is a security standard that can make sure the device boots using only software that is trusted by original equipment manufacturer.
180+
The default Linux kernel from some distributions have also enabled the SecureBoot.
181+
For such distributions, the kernel module has to be signed with the security key or you would get the "\emph{ERROR: could not insert module}" when you insert your first hello world module:
182+
183+
\begin{codebash}
184+
insmod ./hello-1.ko
185+
\end{codebash}
186+
And then you can check further with \sh|dmesg| and see the following text:
187+
188+
\emph{Lockdown: insmod: unsigned module loading is restricted;
189+
see man kernel lockdown.7}
190+
191+
If you got this message, the simplest way is to disable the UEFI SecureBoot from the PC/laptop boot menu to have your "hello-1" to be inserted.
192+
Of course you can go through complicated steps to generate keys, install keys to your system, and finally sign your module to make it work.
193+
However, this is not suitable for beginners.
194+
You could read and follow the steps in \href{https://wiki.debian.org/SecureBoot}{SecureBoot} if you are interested.
177195
\end{enumerate}
178196

179197
\section{Headers}

0 commit comments

Comments
 (0)