[Parted-maintainers] Bug#1103454: libparted detects ext4 without journal as ext2

Pascal Hambourg pascal at plouf.fr.eu.org
Thu Apr 17 20:09:47 BST 2025


Source: parted
Version: 3.6-5
Severity: minor
Tags: d-i patch
Control: affects -1 partman-base partman-basicfilesystems partman-ext3

Dear maintainers,

libparted wrongly detects ext4 without journal as ext2 instead of ext4.
Steps to reproduce:

truncate -s 1G blob
mkfs.ext4 -O ^has_journal blob
blkid blob -> ext4
parted blob print -> ext2
mount -t ext2 blob /mnt -> "couldn't mount as ext2 due to feature 
incompatibilities"
mount -t ext4 blob /mnt -> ok

This bug affects the debian installer partitioning tool, partman, which 
relies on libparted to detect partition filesystem types. partman 
accepts to use such ext4 partition (without formatting it) only as ext2, 
then tries and fails to mount it as ext2 because of incompatible features.

In libparted/fs/ext2/interface.c, _ext2_generic_probe() considers ext4 
as a subset of ext3 which is ext2 with journal. IMO this is wrong 
because ext4 without journal may have other incompatible features.

I acknowledge that this bug should be brought upstream but could you 
please have a look at the attached trivial patch (untested) ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: detect-ext4-nojournal.patch
Type: text/x-patch
Size: 2321 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/parted-maintainers/attachments/20250417/480f55dc/attachment.bin>


More information about the Parted-maintainers mailing list