Kernel 6.8.5: Cannot mount even a blank ext4 image

After upgrading to 6.8.5, mount command always fails for me, even if with a new blank ext4 image.

Reproduce:

$ dd if=/dev/zero of=a.img bs=1M count=100
$ mkfs.ext4 a.img
$ mkdir mp
$ sudo mount a.img mp
mount: /path/to/mp: 
 /dev/loop0 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
$ echo $?
32

dmesg is: (only this line added after mount)

[  622.633122] loop0: detected capacity change from 0 to 204800

In kernel 6.6.26-1 LTS, mount won’t fail.

Did you reboot after the kernel change?

Do you have snap installed? It will mount to these loop points.

(I can run the above commands without issues on 6.9.0-rc5. Doesn’t help you, though, right?)

As hinted to in your other thread:
I can do this no problem with kernel66 or kernel515
But with kernel68 it does end in this error for me, too.
… something with that kernel version ain’t right - I’d avoid it

3 Likes

Agreed on that one. Doesn’t want to play nicely on my T440.

Just for the troubleshooting - I cannot reproduce - with the given commands

 $ uname -a
Linux tiger 6.8.7-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Apr 17 13:26:06 UTC 2024 x86_64 GNU/Linux

 $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0   100M  0 loop /home/fh/mp
[...]

I rebooted and haven’t installed snap.

It would help to know that you can switch to other version to avoid this problem (though I knew this before :wink: thanks to @Nachlese ).

I just see existing bug reports of kernel 6.8.5 are about ntfs mount error, so I report it, a simple ext4 mount error. Hopefully it will help others.

(In fact, I met this problem by mounting an erofs image originally. And I found that it’s a mount error, neither an unsupported filesystem error nor a broken image file).

I tested it also on my system with kernel 6.8.5-1 with same behavior.

@linux-aarhus uses 6.8.7-1 which is in “testing”-branch now … so maybe you still need to wait for a little bit. :grinning:

Linking to the OP’s previous thread, for possible context.

Isn’t the underlaying problem the same as here?

So loop device is reported as free, but some phantom device exists?
Check if /dev/loop0 file exists with

ls -lah /dev/loop0

And then check what losetup reports, so:

losetup -f

So if /dev/loop0 exists, but losetup -f reports /dev/loop0 as free, than the problem is the same as with snapd.

but that is quite another matter - you topic title says ext4?

ntfs is a a foreign filesystem - there is not gurarantee that is doable - especially if the ntfs filesystem is not clealy unmounted in windows - hibernation or windows fast startup - don’t rely on ntfs with Linux - warning - icebergs ahead …

The output is different:

$ ls -lah /dev/loop0
ls: cannot access '/dev/loop0': No such file or directory
$ sudo ls -lah /dev/loop0
ls: cannot access '/dev/loop0': No such file or directory
$ losetup -f
losetup: cannot find an unused loop device: Permission denied
$ sudo losetup -f
/dev/loop0
$ sudo mount a.img mp # the first mount since booted
mount: /path/to/mp: /dev/loop0 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
$ ls -lah /dev/loop0
brw-rw---- 1 root disk 7, 0 Apr 23 09:31 /dev/loop0
$ losetup -f
/dev/loop0