darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.35k stars 439 forks source link

Segmentation fault LKM modules console error #849

Closed ghost closed 3 years ago

ghost commented 4 years ago

System Information : debian testing

root@anonymous:~# darling

This is Darling, translation layer for macOS software.

Copyright (C) 2012-2020 Lubos Dolezel

Usage:
        darling program-path [arguments...]
        darling shell [arguments...]

Environment variables:
DPREFIX - specifies the location of Darling prefix, defaults to ~/.darling

root@anonymous:~# darling ls

modprobe: FATAL: Module darling-mach not found in directory /lib/modules/5.7.0-1-amd64
Failed to load the kernel module

root@anonymous:~# insmod /lib/modules/5.7.0-1-amd64/extra/*

root@anonymous:~# darling ls

Segmentation fault

on console mode:

root@anonymous:~# insmod /lib/modules/5.7.0-1-amd64/extra/*

https://cdn.discordapp.com/attachments/696835551038275686/735475637241905253/20200722_143230.jpg

root@anonymous:~# darling ls

https://cdn.discordapp.com/attachments/696835551038275686/735475443666255963/20200722_143501.jpg https://cdn.discordapp.com/attachments/696835551038275686/735475442659622993/20200722_143522.jpg

HinTak commented 4 years ago

Firstly, for each new kernel you boot you must run "make lkm", "make lkm_install" again. You cannot copy kernel modules across different kernel versions.

Secondly, "insmod" does not take multiple kernel module as arguments - it takes one kernel module, the other arguments are kernel module parameters. Do not do "introd .../*" . That's just plain wrong!

ghost commented 4 years ago

ok for "make lkm", "make lkm_install"

and I must do it like that ->

root@anonymous:~# insmod /lib/modules/5.7.0-1-amd64/extra/darling-match.ko
root@anonymous:~# insmod /lib/modules/5.7.0-1-amd64/extra/darling-overlay.ko

?

facekapow commented 4 years ago

No, if you have the kernel module installed, you should be able to just do darling shell and it'll load the kernel module for you.

ghost commented 4 years ago

ok very nice 👌

(I check if it works before I close the issues)

ghost commented 4 years ago

(yes darling shell load the kernel module for me nice)

OS: Debian GNU/Linux bullseye/sid x86_64 
Kernel: 5.7.0-1-amd64 

but re run "make lkm", "make lkm_install" again

root@anonymous:~# darling shell ls
Segmentation fault

and same output like (https://cdn.discordapp.com/attachments/696835551038275686/735475442659622993/20200722_143522.jpg) on console mode

ghost commented 4 years ago

it's probably the same problem as here https://github.com/darlinghq/darling/issues/853 this is a cause of my kernel version?

HinTak commented 4 years ago

Besides not doing "insmod *" (insmod does not take multiple kernel modules as arguments) - "modprobe" is a better alternative - modprobe is equivalent to insmod plus dependencies. Or rather, insmod is equivalent to "modprobe --force and nodependency". Hence you might find "insmod" modules segfaults , as insmod does not recursively load dependencies. If you have to use either, use modprobe - or let darling runs modprobe for you.

What I mean is that doing "insmod" (instead of modprobe, or letting daring runs modprobe for you) could be the reason for your segfault.

ghost commented 4 years ago

I do not use any of the 2, you have confirmed to me that darling does it for me

facekapow commented 3 years ago

User deleted their account