You are not logged in.

#1 2025-09-18 08:06:54

arch2678934
Member
Registered: 2025-09-18
Posts: 4

bcachefs no longer mounts since installing bcachefs-dkms package

I updated bcachefs-tools and installed bcachefs-dkms from the `extra` repository (version 3:1.31.1-2). I use bcachefs for my root partition. Unfortunately upon rebooting, my root partition no longer mounts. Viewing the journal in rescue mode shows this:

Mounting /sysroot...
modprobe: FATAL: Module bcachefs not found in directory /lib/modules/6.16.7-arch1-1
mount: /dev/mapper/archvg-root: No such device
[Error src/commands/mount.rs:250] Mount failed: No such device
[Error src/commands/mount.rs:250] bcachefs module not loaded?
sysroot.mount: Mount process exited, code=exited, status=1/FAILURE

Manually trying to mount my root partition somewhere fails with the same error message. What can I do to make my computer boot again?

Offline

#2 2025-09-18 09:30:22

gromit
Administrator
From: Germany
Registered: 2024-02-10
Posts: 1,364
Website

Re: bcachefs no longer mounts since installing bcachefs-dkms package

Is the module present in the initramfs?

Offline

#3 2025-09-18 11:11:04

arch2678934
Member
Registered: 2025-09-18
Posts: 4

Re: bcachefs no longer mounts since installing bcachefs-dkms package

Turns out it wasn't; I didn't realise I now had to manually add it to mkinitcpio.conf. Unfortunately I'm still unable to boot, now getting these logs on boot:

Reached target Switch Root.
Starting Switch Root...
Failed to execute /sbin/init
systemd[1] Failed to execute /bin/sh, giving up: Exec format error
Failed to execute fallback shell.
systemd[1]: Freezing execution.

But if I enter rescue mode in the initramfs I can manually fsck and mount the bcachefs partition and it all seems fine. I can successfully load the bcachefs kernel module and can see all my files. So I'm unsure why it's still unable to boot, and the "exec format error" doesn't seem to make sense.

Specifically I can run these commands in rescue mode to view all my files:

systemd-cryptsetup attach arch /dev/nvme0n1p4
mkdir /mnt
mount /dev/mapper/archvg-root /mnt
ls /mnt

Running

systemctl start sysroot.mount

does also seem to mount the filesystem, but if I then manually run /sysroot/bin/sh I get the same exec format error.

Last edited by arch2678934 (2025-09-18 11:26:26)

Offline

#4 2025-09-18 20:44:26

arch2678934
Member
Registered: 2025-09-18
Posts: 4

Re: bcachefs no longer mounts since installing bcachefs-dkms package

It looks like the bcachefs-dkms package is broken: https://www.reddit.com/r/bcachefs/comme … s_pkg_yet/.

I've now managed to uninstall it and am back to using the in-kernel implementation.

Offline

#5 2025-09-19 12:08:28

cnNLJoEjpDbCdNKQ
Member
Registered: 2022-06-26
Posts: 6

Re: bcachefs no longer mounts since installing bcachefs-dkms package

Now it works.

Offline

#6 2025-09-21 19:54:47

jb.1234abcd
Member
Registered: 2013-10-14
Posts: 54

Re: bcachefs no longer mounts since installing bcachefs-dkms package

I have the same problem with latest bcachefs-dkms 3:1.31.2-1
I use bcachefs as root fs.
GRUB
modprobe: FATAL: Module bcachefs not found in directory /lib/modules/6.16.8-arch1-1
mount /dev/sda4 No such device

The original module is in /usr/lib/modules/`uname -r`/kernel/fs/bcachefs/bcachefs.ko.zst but is was not included in /boot/initramfs-linux.img .
My understanding is that should be handled by kernel update compilation scripts automatically (i.e. adjusted by dkms platform via /etc/mkinitcpio.conf or other means)..
So, what can we expect next ?

Last edited by jb.1234abcd (2025-09-25 13:20:00)

Offline

#7 2025-09-21 20:26:02

arch2678934
Member
Registered: 2025-09-18
Posts: 4

Re: bcachefs no longer mounts since installing bcachefs-dkms package

You can add bcachefs to the hooks list in mkinitcpio.conf.

Offline

#8 2025-09-22 17:10:01

jb.1234abcd
Member
Registered: 2013-10-14
Posts: 54

Re: bcachefs no longer mounts since installing bcachefs-dkms package

Test run:

uname -r
6.16.8-arch1-1

bcachefs as root fs
/etc/mkinitcpio.conf
HOOKS=(... bcachefs filesystems ...)

pacman -Syu dkms linux-headers

pacman -Syu bcachefs-dkms bcachefs-tools
/var/lib/dkms/bcachefs/1.31.2/6.16.8-arch1-1/x86_64/module/
/var/lib/dkms/bcachefs/kernel-6.16.8-arch1-1-x86_64/module/
# ls /usr/lib/modules/6.16.8-arch1-1/kernel/fs/bcachefs/
#
Note: no original module (see: warning below)

pacman -S linux
...
(1/1) checking available disk space  ...
warning: could not get file information for /usr/lib/modules/6.16.8-arch1-1/kernel/fs/bcachefs/bcachefs.ko.zst
:: Running pre-transaction hooks...
...
#

Last edited by jb.1234abcd (2025-09-25 13:18:10)

Offline

Board footer

Powered by FluxBB