Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modprobe: FATAL: Module ext4 not found in directory /lib/modules/6.7.12-amd64 #6606

Open
1 of 2 tasks
prahal opened this issue May 14, 2024 · 6 comments
Open
1 of 2 tasks
Labels
Bug Something isn't working as it should Good first issue Feel free to contribute :)

Comments

@prahal
Copy link
Collaborator

prahal commented May 14, 2024

What happened?

./compile.sh kernel BOARD=helios64 BRANCH=edge RELEASE=bookworm BUILD_KSRC=no
(...)
[🐳|🌱] Starting main configuration
[🐳|🌱] Using REVISION from [ main VERSION file: '24.5.0-trunk' ]
modprobe: FATAL: Module ext4 not found in directory /lib/modules/6.7.12-amd64
[🐳|💥] error! [ Filesystem type unsupported by build host: ext4 ]
[🐳|💥] Exiting with error 43 [ at /armbian/lib/functions/logging/traps.sh:1
                exit_with_error() --> lib/functions/logging/traps.sh:1
   check_filesystem_compatibility_on_host() --> lib/functions/configuration/main-config.sh:535
          do_main_configuration() --> lib/functions/configuration/main-config.sh:143
                do_with_logging() --> lib/functions/logging/section-logging.sh:81
    do_with_conditional_logging() --> lib/functions/logging/section-logging.sh:111
      prep_conf_main_minimal_ni() --> lib/functions/main/config-prepare.sh:72
   artifact_kernel_cli_adapter_config_prep() --> lib/functions/artifacts/artifact-kernel.sh:265
   artifact_cli_adapter_config_prep() --> lib/functions/artifacts/artifacts-obtain.sh:34
               cli_artifact_run() --> lib/functions/cli/cli-artifact.sh:36
        armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:136
                 cli_entrypoint() --> lib/functions/cli/entrypoint.sh:176
                           main() --> compile.sh:50
 ]

There might be no clean fix without requiring root access, but output an error message that state that ext4 loaded is required might be enough.

How to reproduce?

I did not test it but I supposed it is enough to run the build in a VM with a Linux system that has no ext4 filesystem loaded.
On such a system (mine is a bare install with only btrfs filesystems) where ext4 is not laded running:
./compile.sh kernel BOARD=helios64 BRANCH=edge RELEASE=bookworm BUILD_KSRC=no

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Debian 13 Trixie

Are you building on Windows WSL2?

  • Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

https://paste.armbian.com/ihebugunif

Code of Conduct

  • I agree to follow this project's Code of Conduct
Copy link

Jira ticket: AR-2134

@prahal
Copy link
Collaborator Author

prahal commented May 14, 2024

ext4 module is available on the build host despite the error telling otherwise, and running sudo modprobe ext4 o the build host is a working workaround.

ls /lib/modules/6.7.12-amd64/kernel/fs//ext4
ext4.ko.xz

@ColorfulRhino
Copy link
Collaborator

This should in theory load the module:

function check_filesystem_compatibility_on_host() {
if [[ -f "/proc/filesystems" ]]; then
# Check if the filesystem is listed in /proc/filesystems
if ! grep -q "\<$ROOTFS_TYPE\>" /proc/filesystems; then # ensure exact match with \<...\>
# Try modprobing the fs module since it doesn't show up in /proc/filesystems if it's an unloaded module versus built-in
if ! modprobe "$ROOTFS_TYPE"; then
exit_with_error "Filesystem type unsupported by build host:" "$ROOTFS_TYPE"
else
display_alert "Sucessfully loaded kernel module for filesystem" "$ROOTFS_TYPE" ""
fi
fi

@prahal Can you send the output of cat /proc/filesystems?

@ColorfulRhino ColorfulRhino added Bug Something isn't working as it should Good first issue Feel free to contribute :) labels Jul 7, 2024
@adonespitogo
Copy link

adonespitogo commented Sep 30, 2024

I'm experiencing this error on Arch Linux kernel 6.10.10

❯ cat /proc/filesystems
nodev   sysfs
nodev   tmpfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   cgroup2
nodev   cpuset
nodev   devtmpfs
nodev   binfmt_misc
nodev   configfs
nodev   debugfs
nodev   tracefs
nodev   securityfs
nodev   sockfs
nodev   bpf
nodev   pipefs
nodev   ramfs
nodev   hugetlbfs
nodev   devpts
nodev   autofs
        fuseblk
nodev   fuse
nodev   fusectl
nodev   virtiofs
nodev   efivarfs
nodev   mqueue
nodev   resctrl
nodev   pstore
        btrfs
        squashfs
        vfat
nodev   overlay

Update:
Fixed it by simply loading ext4 module on the host system

sudo modprobe ext4

@prahal
Copy link
Collaborator Author

prahal commented Oct 1, 2024

@ColorfulRhino could it be ROOTFS_TYPE is grabbed from the built image file (and as I only build the kernel debs and not the image, I might bypass that code section?
It could even be that the check for ext4 is of no use when I build the kernel debs only, so maybe the framework could not check for ext4 in this case...
./compile.sh kernel BOARD=helios64 BRANCH=edge RELEASE=bookworm BUILD_KSRC=no
I have not tested a full image build.

@adonespitogo do you build the full image?

My /proc/filesystems

cat /proc/filesystems 
nodev	sysfs
nodev	tmpfs
nodev	bdev
nodev	proc
nodev	cgroup
nodev	cgroup2
nodev	cpuset
nodev	devtmpfs
nodev	debugfs
nodev	tracefs
nodev	securityfs
nodev	sockfs
nodev	bpf
nodev	pipefs
nodev	ramfs
nodev	hugetlbfs
nodev	devpts
	fuseblk
nodev	fuse
nodev	fusectl
nodev	virtiofs
nodev	mqueue
nodev	pstore
nodev	efivarfs
	btrfs
nodev	autofs
nodev	rpc_pipefs
nodev	configfs
nodev	nfsd
nodev	ecryptfs
	squashfs
	vfat
nodev	binfmt_misc
nodev	overlay

@adonespitogo
Copy link

@prahal yeah I did successfully built an image after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working as it should Good first issue Feel free to contribute :)
Development

No branches or pull requests

3 participants