# mount UUID=e92249be-7749-45cf-a0e1-80b2d213e8e4 /mnt/data
mount: /mnt/data: unknown filesystem type 'f2fs'.
dmesg(1) may have more information after failed mount system call.
grep F2FS build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-5.15.167/.config
CONFIG_F2FS_FS=y
CONFIG_F2FS_STAT_FS=y
CONFIG_F2FS_FS_XATTR=y
# CONFIG_F2FS_FS_POSIX_ACL is not set
# CONFIG_F2FS_FS_SECURITY is not set
# CONFIG_F2FS_CHECK_FS is not set
# CONFIG_F2FS_FAULT_INJECTION is not set
# CONFIG_F2FS_FS_COMPRESSION is not set
# CONFIG_F2FS_IOSTAT is not set
# zgrep -i f2fs /proc/config.gz
CONFIG_F2FS_FS=y
CONFIG_F2FS_STAT_FS=y
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_FS_POSIX_ACL=y
CONFIG_F2FS_FS_SECURITY=y
# CONFIG_F2FS_CHECK_FS is not set
# CONFIG_F2FS_FAULT_INJECTION is not set
# CONFIG_F2FS_FS_COMPRESSION is not set
# CONFIG_F2FS_IOSTAT is not set
# CONFIG_F2FS_UNFAIR_RWSEM is not set
And the .config I used to compile this image:
% grep -i f2fs .config
CONFIG_DEFAULT_mkf2fs=y
CONFIG_KERNEL_F2FS_FS_POSIX_ACL=y
CONFIG_KERNEL_F2FS_FS_SECURITY=y
# CONFIG_BUSYBOX_DEFAULT_FEATURE_VOLUMEID_F2FS is not set
CONFIG_PACKAGE_kmod-fs-f2fs=y
CONFIG_PACKAGE_libf2fs=y
# CONFIG_PACKAGE_libf2fs-selinux is not set
CONFIG_PACKAGE_f2fs-tools=y
# CONFIG_PACKAGE_f2fs-tools-selinux is not set
CONFIG_PACKAGE_f2fsck=y
# CONFIG_PACKAGE_f2fsck-selinux is not set
CONFIG_PACKAGE_mkf2fs=y
# CONFIG_PACKAGE_mkf2fs-selinux is not set
Thanks to all for the replies. The target is bcm2712 (RPi5B) and the root cause is 16KB pages which I compiled in on this image as I was testing my PR to build larger memory pages. It seems that f2fs support for 16KB pages was introduced with linux 6.7 but not backported to 6.6.
Do you have any idea how to use a 16KB block size? I can find nothing in the man pages. Testing on Arch ARM with the 16k page kernel (v6.12.6):
This does not work:
# mkfs.f2fs -O extra_attr,inode_checksum,sb_checksum,compression -w 16384 /dev/mmcblk0p3
F2FS-tools: mkfs.f2fs Ver: 1.16.0 (2023-04-11)
Info: Disable heap-based policy
Info: Debug level = 0
Info: Trim is enabled
Info: Enable Compression
/dev/mmcblk0p3 appears to contain an existing filesystem (f2fs).
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 5105664 (2493 MB)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
"Linux version 6.12.6-1-rpi-16k (builduser@leming) (aarch64-unknown-linux-gnu-gcc (GCC) 14.1.1 20240507, GNU ld (GNU Binutils) 2.42.0) #1 SMP PREEMPT Fri Dec 20 07:29:33 MST 2024"
Info: [/dev/mmcblk0p3] Discarding device
Info: This device doesn't support BLKSECDISCARD
Info: Discarded 2493 MB
Info: Overprovision ratio = 3.200%
Info: Overprovision segments = 40 (GC reserved = 38)
Info: format successful
Still cannot mount
# mount -o compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime /dev/mmcblk0p3 /mnt/media
mount: /mnt/media: wrong fs type, bad option, bad superblock on /dev/mmcblk0p3, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.
mount: (hint) your fstab has been modified, but systemd still uses
the old version; use 'systemctl daemon-reload' to reload.