FDE image fails to run e2fsck
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
e2fsprogs (Debian) |
Fix Released
|
Unknown
|
|||
e2fsprogs (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Won't Fix
|
Undecided
|
Paul Mars |
Bug Description
After installation of the FDE image, the system fails to boot due to e2fsck failing with:
Jun 21 12:48:19 ubuntu systemd-fsck[268]: /dev/vda2 has unsupported feature(s): FEATURE_C12
----
this means that Jammy fsck fails against mantic created ext4 which is not great
Seems this is orphan_file feature / orphan_present
Also need to check if grub2 supports this as it is RO_INCOMPAT feature.
[Fix]
This SRU is disabling 2 features (orphan_file and metadata_csum_seed) from ext4 to generate filesystems compatible with older series. Fixes come from debian (fixing #1031622, #1030939). This is only disabling the feature by default. One can still generate a filesystem with this feature by explicitly listing them when invoking mkfs.ext4. The decision to disable this feature by default has already been taken for mantic and is not planned to be revised soon as far as I know. So this fix is also useful to implement a common behavior between the 2 series (and following ones).
This fix is also motivated by the fact that snapd is using mkfs.ext4 without any options. The possibility to give options for mkfs.ext4 was removed in snapd at some point for good reasons and it would be more complex to handle a special case only for lunar in snapd than disabling this feature by default in e2fsprogs I think.
[Impact]
See LP: #2028564. Generating a filesystem on lunar with e2fsprogs will use the orphan_file feature. This will prevent a jammy (or older) based OS from modifying this filesystem (in particular resize it at first boot).
[ Test Plan ]
On lunar, generate a filesystem and check the orphan_file feature is enabled:
$ dd if=/dev/zero of=test.img bs=100M count=1
$ mkfs.ext4 test.img
$ # Then check the orphan_file feature is enabled
$ dumpe2fs test.img | grep orphan
Move this .img file to a jammy based machine, and try using resize2fs on it:
$ resize2fs -d -f -M test.img
resize2fs 1.46.5 (30-Dec-2021)
resize2fs: Filesystem has unsupported feature(s) (test.img)
[Where problems could occur]
Some users on Lunar may currently rely on this feature to be enabled by default. This can still be enabled explicitly when calling mkfs.ext4 but the default behavior will be changed.
The orphan_file feature aims at improving performances when dealing with deleted files or directories. So if we disable this by default, I think it should only impact performances of generated filesystems and probably not break anything else.
It should be noted that before lunar, users did not have access to this feature and since mantic it is disabled by default, so I suspect the population expecting this feature to be enabled by default is rather small.
Related branches
- Nick Rosbrook (community): Needs Fixing
- Bryce Harrington (community): Needs Information
- git-ubuntu import: Pending requested
-
Diff: 42 lines (+12/-3)2 files modifieddebian/changelog (+7/-0)
debian/patches/default-no-metadata_csum_seed.patch (+5/-3)
description: | updated |
description: | updated |
description: | updated |
Changed in e2fsprogs (Ubuntu Lunar): | |
status: | New → Confirmed |
description: | updated |
description: | updated |
Changed in e2fsprogs (Ubuntu Lunar): | |
status: | Confirmed → In Progress |
assignee: | nobody → Paul Mars (upils) |
description: | updated |
no longer affects: | e2fsprogs (Ubuntu Jammy) |
Changed in e2fsprogs (Debian): | |
status: | Unknown → Fix Released |
tags: | added: foundations-todo |
description: | updated |
Given new incompatible RO and RW features in ext4 that v5.15 kernels support, imho we should SRU backport of e2fsprogs on HWE grounds.