Skip to content

fix(wic): orphan warnings in initramfs ext4 fsck invocations on ro partitions - #701

Merged
HarryWaschkeit merged 5 commits into
omnect:mainfrom
HarryWaschkeit:hwt-2026-09-28-fix-wic-prevent-stray-ext4-journal-entries
Oct 8, 2026
Merged

HarryWaschkeit merged 5 commits into
omnect:mainfrom
HarryWaschkeit:hwt-2026-09-28-fix-wic-prevent-stray-ext4-journal-entries

Conversation

@HarryWaschkeit

@HarryWaschkeit HarryWaschkeit commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

When read-only partitions get mounted during system start-up there are always orphan entries found that cannot be fixed.
Turning off journaling on read-only partition - which doesn't make sense anyway -, gets rid of these warnings..

When in testing a wic image is used multiple times to initialize a test
device it can happen that a stale journal i.e., one from system runs
prior to flashing anew, gets applied.

This can happen when ...
- bmaptool is used to flash scarce wic images
- the wic images don't populate the journal data region

This fix stops using the lazy journal initialization so that the journal
data gets part of the generated wic image, even though large parts of
them are filled with `0` (and would therefore be left out normally).

Signed-off-by: Harry Waschkeit <44188360+HarryWaschkeit@users.noreply.github.com>
@HarryWaschkeit HarryWaschkeit changed the title fix(wic): prevent stray ext4 journal entries fix(wic): prevent stray ext4 journal entries after wic flashing Sep 28, 2026

@JanZachmann JanZachmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach works: with lazy_journal_init=0 the journal becomes part of the bmap, so any bmap-based flash overwrites the old journal. Two things before merge, see inline: the extra options replace wic's defaults (the inode count on data halves), and the result depends on FIEMAP on the build host.

Description: "scarce wic images" should be "sparse". Removing the journal from the read-only partitions is a separate change and could be its own commit.

Comment thread files/wic/omnect-os.common.wks.inc Outdated
Comment thread files/wic/omnect-os.common.wks.inc Outdated
Comment thread files/wic/omnect-os.common.wks.inc Outdated
Comment thread files/wic/omnect-os.common.wks.inc Outdated
…pts`

Signed-off-by: Harry Waschkeit <44188360+HarryWaschkeit@users.noreply.github.com>
…initramfs fsck output

Signed-off-by: Harry Waschkeit <44188360+HarryWaschkeit@users.noreply.github.com>
@HarryWaschkeit HarryWaschkeit changed the title fix(wic): prevent stray ext4 journal entries after wic flashing fix(wic): prevent orphan warnings in initramfs ext4 fsck invocations on ro partitions Sep 29, 2026
@HarryWaschkeit HarryWaschkeit changed the title fix(wic): prevent orphan warnings in initramfs ext4 fsck invocations on ro partitions fix(wic): orphan warnings in initramfs ext4 fsck invocations on ro partitions Sep 29, 2026

@JanZachmann JanZachmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title and description become the squash commit, and both describe the cause wrongly. The initramfs runs no fsck on rootA/rootB/factory (check_fs only runs for cert, etc, data and boot). EXT4-fs (...): orphan cleanup on readonly fs is a kernel info message at mount time: with the orphan_file feature, which the mke2fs.conf of the build enables by default, the kernel prints it on every read-only mount, also when there is no orphan. So nothing is found and nothing is left unfixed. The change removes that feature, together with the journal. Could you reword title and description along these lines? The fix(wic) scope will also be too narrow once the ext4 image gets the same options (see the rootB thread).

Comment thread files/wic/omnect-os.common.wks.inc

@JanZachmann JanZachmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…ages

Signed-off-by: Harry Waschkeit <44188360+HarryWaschkeit@users.noreply.github.com>
@HarryWaschkeit
HarryWaschkeit merged commit 9d33636 into omnect:main Oct 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants