From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: quirin.gylstorff@siemens.com, jan.kiszka@siemens.com,
Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 4/8] dracut: use fixed log level on generation for progress reporting
Date: Tue, 15 Sep 2026 12:01:21 +0200 [thread overview]
Message-ID: <20260915100125.1991311-5-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20260915100125.1991311-1-felix.moessbauer@siemens.com>
The log level of dracut controls which logs are generated on stdout
during initrd building. Previously, we needed debug options to interface
with the parser, but these options were not set in all config files.
As the config files are part of the rootfs, they are out of our control
anyways. By that, progress reporting was broken on configs (like the
trixie default config) were the level was set too low.
We fix this by passing the log level on dracut invocation and also count
the number of dracut modules instead of copy operations, which gives a
better progress indication.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes-recipe/initrd-dracut.bbclass | 4 ++--
meta/lib/rootfs_progress.py | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/meta/classes-recipe/initrd-dracut.bbclass b/meta/classes-recipe/initrd-dracut.bbclass
index c2018f03..cf8bf937 100644
--- a/meta/classes-recipe/initrd-dracut.bbclass
+++ b/meta/classes-recipe/initrd-dracut.bbclass
@@ -53,11 +53,11 @@ def extend_dracut_cmdline(d):
cmdline.append(f'--add "{extra_modules}"')
return ' '.join(cmdline)
-ROOTFS_INITRAMFS_GENERATOR_CMDLINE = "dracut --force --kver $kernel_version"
+ROOTFS_INITRAMFS_GENERATOR_CMDLINE = "dracut --force --kver $kernel_version -L 5"
ROOTFS_INITRAMFS_GENERATOR_CMDLINE:append = " ${@ extend_dracut_cmdline(d)}"
run_initrd_generator() {
- mods_total="$(find ${ROOTFSDIR}/usr/lib/modules/$kernel_version -type f -name '*.ko*' | wc -l)"
+ mods_total="$(find ${ROOTFSDIR}/usr/lib/dracut/modules.d/ -maxdepth 1 -type d | wc -l)"
echo "Total number of modules: $mods_total (dracut)"
run_in_chroot "${ROOTFSDIR}" sh -c "${ROOTFS_INITRAMFS_GENERATOR_CMDLINE}"
}
diff --git a/meta/lib/rootfs_progress.py b/meta/lib/rootfs_progress.py
index 58d16574..67f44ede 100644
--- a/meta/lib/rootfs_progress.py
+++ b/meta/lib/rootfs_progress.py
@@ -83,8 +83,9 @@ class InitrdProgressHandler(PkgsProgressHandler):
def process_line(self, line):
if (
line.startswith("Adding module")
- or line.startswith("dracut-install: cp")
+ or line.startswith("dracut-install: cp") # dracut-install output (Ubuntu)
or line.startswith("dracut-install: Failed to find module")
+ or "Including module:" in line # dracut output (debian)
):
self._pkg += 1
elif line.startswith('(excluding'):
--
2.55.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260915100125.1991311-5-felix.moessbauer%40siemens.com.
next prev parent reply other threads:[~2026-09-15 10:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 10:01 [PATCH 0/8] Add support to cross-compile a dracut initramfs 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 1/8] rootfs: generalize deployment of rootfs artifact 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 2/8] dracut-module: make module-setup compatible with sysroot 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 3/8] initramfs: move dracut logic to initrd-dracut class 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` 'Felix Moessbauer' via isar-users [this message]
2026-09-15 10:01 ` [PATCH 5/8] dracut: enforce build of reproducible initrd 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 6/8] add host-tooling chroot for generic host tooling 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 7/8] dracut: add support for cross initrd generation 'Felix Moessbauer' via isar-users
2026-09-15 10:01 ` [PATCH 8/8] rootfs: stub both dracut and update-initramfs on dracut 'Felix Moessbauer' via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260915100125.1991311-5-felix.moessbauer@siemens.com \
--to=isar-users@googlegroups.com \
--cc=felix.moessbauer@siemens.com \
--cc=jan.kiszka@siemens.com \
--cc=quirin.gylstorff@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox