Menu

#28 Install CDemu in Fedora (secure boot)

open
nobody
patches (1)
unassigned
default
2022-06-23
2022-06-23
No

Install CDemu in Fedora with secure boot
Run commands in terminal:

sudo dnf install libmirage vhba kmod-vhba akmod-vhba dkms cdemu-daemon gcdemu openssl mokutil kernel-devel -y

Manually sign the driver
generate a configuration for generated key:

cat >>/tmp/x509.conf <<EOF
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
string_mask = utf8only
x509_extensions = extensions

[ req_distinguished_name ]
O = Example, Inc.
CN = Example, Inc. Kernel signing key
emailAddress = jdoe@example.com

[ extensions ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid
EOF


 Generate the key with openssl and enroll it with mokutil:


sudo openssl req -x509 -new -nodes -utf8 -sha256 -batch -config /tmp/x509.conf -outform DER -out pubkey.der -keyout priv.key
sudo mokutil --import pubkey.der

Reboot your computer. You will be greeted with the MokManager
Select "Enroll MOK" -> "Continue" -> "Yes" -> create a password for the MOK -> "Reboot"

sudo xz --decompress $(modinfo -n vhba)
 sudo depmod

Sign the file with the enrolled key:

 sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 priv.key pubkey.der $(modinfo -n vhba)

Load the module. If successful, it should give you no errors:
 sudo modprobe vhba

If this method does not work for you, disabling Secure Boot may be the way to go.

Discussion


Log in to post a comment.