Tried to run darling shell and got the error message:
modprobe: ERROR: could not insert 'darling_mach': Operation not permitted
Failed to load the kernel module
OS: Ubuntu 18.04.3 LTS x86_64
Kernel: 5.0.0-37-generic
Any idea how could I fix it? Thanks!
Did you run
make lkm
sudo make lkm_install
when installing? Also is secure boot disabled? Ubuntu doesn't allow loading unsigned kernel modules when secure boot is enabled.
Thanks @bjorn3 ! Disabling secure boot makes it work.
You can run it with secure boot if you sign the kernel module manually:
# Generate Key
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Darling LKM/"
# Enroll Key
sudo mokutil --import MOK.der
# Sign Module
sudo kmodsign sha512 MOK.priv MOK.der /lib/modules/$(uname -r)/extra/darling-mach.ko
# Reboot System and Enroll Key
Thanks @TheBrokenRail, added that to the wiki https://wiki.darlinghq.org/build_instructions#secure_boot
It also seems to be signed automatically when using the DEB package.
Most helpful comment
Did you run
when installing? Also is secure boot disabled? Ubuntu doesn't allow loading unsigned kernel modules when secure boot is enabled.