Skip to content

Kernel module determination error messages should be more verbose #231

@steev

Description

@steev

I am running into an issue where I am attempting to run fakemachine inside either a podman or a docker container, and with both of them, I am simply getting the error:

fakemachine: modules path couldn't be determined

For example:

┌──(root㉿buildbox)-[/source]
└─# fakemachine -m 4096 -s 32G -v $(pwd) -b kvm
fakemachine: modules path couldn't be determined

┌──(root㉿buildbox)-[/source]
└─# uname -a
Linux buildbox 6.12.20-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.12.20-1kali1 (2025-03-26) x86_64 GNU/Linux

┌──(root㉿buildbox)-[/source]
└─# ls /lib/modules/6.12.20-amd64/                                                                                      
kernel             modules.builtin            modules.builtin.modinfo  modules.devname  modules.symbols
modules.alias      modules.builtin.alias.bin  modules.dep              modules.order    modules.symbols.bin
modules.alias.bin  modules.builtin.bin        modules.dep.bin          modules.softdep  modules.weakdep

┌──(root㉿buildbox)-[/source]
└─# ls /lib/modules/6.12.20-amd64/kernel/
arch  block  crypto  drivers  fs  lib  mm  net  sound

The modules are there, and if I run fakemachine on the host, instead of in docker or podman, it runs just fine.

Edit: So, my Dockerfile looks like this:

FROM docker.io/kalilinux/kali-rolling

RUN apt-get update \
 && apt-get install --no-install-recommends -y \
    arch-test autoconf automake bc bison \
    build-essential cgpt cgroup-tools cmake \
    crossbuild-essential-arm64 \
    crossbuild-essential-armhf \
    crossbuild-essential-armel \
    curl dbus device-tree-compiler dosfstools \
    e2fsprogs eatmydata flex gawk \
    gcc-arm-none-eabi git gnupg kpartx \
    libncurses-dev libgnutls28-dev lsb-release \
    libssl-dev lsof lzma lzop m4 make mmdebstrap \
    parted pixz pkg-config python3-dev qemu-user-static \
    rsync swig u-boot-tools uuid-dev \
 && apt-get install --no-install-recommends -y \
    fakemachine \
 && apt-get clean

Just a quick and dirty one to try to get things working, while keeping the image small. However, if I simply remove that --no-install-recommends from the fakemachine install line, then I am able to start fakemachine inside docker/podman without issue.

Potentially related, it would be nice to know what kernel module options are required for this to work properly. I run a custom kernel build on an arm64 laptop and I cannot seem to fully figure out the options to make fakemachine work. I either run into the modules path couldn't be determined, or I run into #196 which means I am missing something else, but I do not know what it might be.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions