@@ -154,6 +154,57 @@ option must be passed to configure.
154
154
$ make -j1 rpm-utils rpm-kmod
155
155
$ sudo dnf install * .$( uname -m) .rpm * .noarch.rpm
156
156
157
+ Fedora 41 secure boot with kmod
158
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
159
+
160
+ The zfs kernel module will fail to load on modern computers that use
161
+ UEFI and secure boot:
162
+
163
+ .. code ::
164
+
165
+ $ sudo modprobe zfs
166
+ modprobe: ERROR: could not insert 'zfs': Key was rejected by service
167
+
168
+ Either disable secure boot or create a custom machine owner key (MOK)
169
+ **once ** and manually sign your current and future modules using that key:
170
+
171
+ .. code :: sh
172
+
173
+ $ sudo mkdir /etc/pki/mok
174
+ $ cd /etc/pki/mok
175
+ $ sudo openssl req -new -x509 -newkey rsa:2048 -keyout LOCALMOK.priv -outform DER -out LOCALMOK.der -nodes -days 36500 -subj " /CN=LOCALMOK/"
176
+ $ sudo mokutil --import LOCALMOK.der
177
+
178
+ Mokutil asks for a password that you have to create and remember,
179
+ then reboot your machine and UEFI will ask to import your key:
180
+
181
+ .. code ::
182
+
183
+ Select "Enroll MOK", "Continue", "Yes", enter mokutil's password, "Reboot"
184
+
185
+ This MOK can then be used to manually sign your zfs kernel modules:
186
+
187
+ .. code ::
188
+
189
+ $ rpm -ql kmod-zfs-$(uname -r) | grep .ko
190
+ /lib/modules/6.11.8-300.fc41.x86_64/extra/zfs/spl.ko
191
+ /lib/modules/6.11.8-300.fc41.x86_64/extra/zfs/zfs.ko
192
+
193
+ .. code :: sh
194
+
195
+ $ sudo /usr/src/kernels/$( uname -r) /scripts/sign-file sha256 /etc/pki/mok/LOCALMOK.priv /etc/pki/mok/LOCALMOK.der /lib/modules/$( uname -r) /extra/zfs/spl.ko
196
+ $ sudo /usr/src/kernels/$( uname -r) /scripts/sign-file sha256 /etc/pki/mok/LOCALMOK.priv /etc/pki/mok/LOCALMOK.der /lib/modules/$( uname -r) /extra/zfs/zfs.ko
197
+
198
+ Load the module and verify it is active:
199
+
200
+ .. code ::
201
+
202
+ $ sudo modprobe zfs
203
+
204
+ $ lsmod | grep zfs
205
+ zfs 6930432 0
206
+ spl 155648 1 zfs
207
+
157
208
Debian and Ubuntu
158
209
-----------------
159
210
0 commit comments