public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2] qemuarm-trixie: Workaround with missing drivers in qemuarm-trixie initramfs
@ 2026-02-20 14:42 Zhihang Wei
  2026-02-20 15:36 ` 'Jan Kiszka' via isar-users
  0 siblings, 1 reply; 4+ messages in thread
From: Zhihang Wei @ 2026-02-20 14:42 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka

This is a workaround to fix the current qemuarm-trixie image unbootable
issue.

Starting with Debian Trixie, update-initramfs invokes "dracut-install"
to collect and install required drivers into the generated initramfs.
"dracut-install" relies on fts_open() / fts_read() from glibc to
traverse directories and locate drivers.

Due to a long-standing bug [1] between qemu and glibc, the fts_*
functions may fail to find files on certain 32-bit architectures. As a
result, required modules such as virtio_blk are not detected and not
added to the initramfs. The produced image then fails to boot under
qemu because the block device driver is missing.

A similiar dracut bug report was filed in 2024 [2], pointing to this
upstream glibc issue reported in 2018 [1]. No upstream fix has been
applied, and the issue appears to affect only qemu builds for specific
32-bit targets.

As a temporary workaround, use a customized initramfs-hook to append
the neccessary drivers that are currently missed from the initramfs.

For a complete fix, we either need to push for an upstream glibc/qemu
fix, or convince dracut to avoid using these non-POSIX fts_* functions
and use opendir() / readdir() instead.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=23960
[2] https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=1079443

Signed-off-by: Zhihang Wei <wzh@ilbers.de>
---
Changes in v2:
- Use initramfs-hook to install the driver, instead of adding another
  variable

 meta-isar/conf/multiconfig/qemuarm-trixie.conf            | 4 +++-
 .../initramfs-virtio-blk-hook_0.1.bb                      | 8 ++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb

diff --git a/meta-isar/conf/multiconfig/qemuarm-trixie.conf b/meta-isar/conf/multiconfig/qemuarm-trixie.conf
index 5600ab23..20eecd92 100644
--- a/meta-isar/conf/multiconfig/qemuarm-trixie.conf
+++ b/meta-isar/conf/multiconfig/qemuarm-trixie.conf
@@ -1,7 +1,9 @@
 # This software is a part of Isar.
-# Copyright (C) 2024 ilbers GmbH
+# Copyright (C) 2024-2026 ilbers GmbH
 #
 # SPDX-License-Identifier: MIT
 
 MACHINE ?= "qemuarm"
 DISTRO ?= "debian-trixie"
+
+IMAGE_INSTALL += "initramfs-virtio-blk-hook"
diff --git a/meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb b/meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb
new file mode 100644
index 00000000..229d91d6
--- /dev/null
+++ b/meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb
@@ -0,0 +1,8 @@
+# This software is a part of Isar.
+# Copyright (C) 2026 ilbers GmbH
+#
+# SPDX-License-Identifier: MIT
+
+inherit initramfs-hook
+
+HOOK_ADD_MODULES = "virtio-blk"
-- 
2.39.5

-- 
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/20260220144259.1876444-1-wzh%40ilbers.de.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] qemuarm-trixie: Workaround with missing drivers in qemuarm-trixie initramfs
  2026-02-20 14:42 [PATCH v2] qemuarm-trixie: Workaround with missing drivers in qemuarm-trixie initramfs Zhihang Wei
@ 2026-02-20 15:36 ` 'Jan Kiszka' via isar-users
  2026-02-20 15:55   ` Zhihang Wei
  0 siblings, 1 reply; 4+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-02-20 15:36 UTC (permalink / raw)
  To: Zhihang Wei, isar-users

On 20.02.26 15:42, Zhihang Wei wrote:
> This is a workaround to fix the current qemuarm-trixie image unbootable
> issue.
> 
> Starting with Debian Trixie, update-initramfs invokes "dracut-install"
> to collect and install required drivers into the generated initramfs.
> "dracut-install" relies on fts_open() / fts_read() from glibc to
> traverse directories and locate drivers.
> 
> Due to a long-standing bug [1] between qemu and glibc, the fts_*
> functions may fail to find files on certain 32-bit architectures. As a
> result, required modules such as virtio_blk are not detected and not
> added to the initramfs. The produced image then fails to boot under
> qemu because the block device driver is missing.
> 
> A similiar dracut bug report was filed in 2024 [2], pointing to this
> upstream glibc issue reported in 2018 [1]. No upstream fix has been
> applied, and the issue appears to affect only qemu builds for specific
> 32-bit targets.
> 
> As a temporary workaround, use a customized initramfs-hook to append
> the neccessary drivers that are currently missed from the initramfs.
> 
> For a complete fix, we either need to push for an upstream glibc/qemu
> fix, or convince dracut to avoid using these non-POSIX fts_* functions
> and use opendir() / readdir() instead.
> 
> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=23960
> [2] https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=1079443
> 
> Signed-off-by: Zhihang Wei <wzh@ilbers.de>
> ---
> Changes in v2:
> - Use initramfs-hook to install the driver, instead of adding another
>   variable
> 
>  meta-isar/conf/multiconfig/qemuarm-trixie.conf            | 4 +++-
>  .../initramfs-virtio-blk-hook_0.1.bb                      | 8 ++++++++
>  2 files changed, 11 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb
> 
> diff --git a/meta-isar/conf/multiconfig/qemuarm-trixie.conf b/meta-isar/conf/multiconfig/qemuarm-trixie.conf
> index 5600ab23..20eecd92 100644
> --- a/meta-isar/conf/multiconfig/qemuarm-trixie.conf
> +++ b/meta-isar/conf/multiconfig/qemuarm-trixie.conf
> @@ -1,7 +1,9 @@
>  # This software is a part of Isar.
> -# Copyright (C) 2024 ilbers GmbH
> +# Copyright (C) 2024-2026 ilbers GmbH
>  #
>  # SPDX-License-Identifier: MIT
>  
>  MACHINE ?= "qemuarm"
>  DISTRO ?= "debian-trixie"
> +
> +IMAGE_INSTALL += "initramfs-virtio-blk-hook"

This covers the initramfs-tools based generation. What if someone
enables dracut (kas/opt/dracut.yaml)?

> diff --git a/meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb b/meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb
> new file mode 100644
> index 00000000..229d91d6
> --- /dev/null
> +++ b/meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb
> @@ -0,0 +1,8 @@
> +# This software is a part of Isar.
> +# Copyright (C) 2026 ilbers GmbH
> +#
> +# SPDX-License-Identifier: MIT
> +
> +inherit initramfs-hook
> +
> +HOOK_ADD_MODULES = "virtio-blk"

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center

-- 
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/6a4c8dd5-16b4-48f5-8164-ab0a28534956%40siemens.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] qemuarm-trixie: Workaround with missing drivers in qemuarm-trixie initramfs
  2026-02-20 15:36 ` 'Jan Kiszka' via isar-users
@ 2026-02-20 15:55   ` Zhihang Wei
  2026-02-20 16:43     ` 'Jan Kiszka' via isar-users
  0 siblings, 1 reply; 4+ messages in thread
From: Zhihang Wei @ 2026-02-20 15:55 UTC (permalink / raw)
  To: Jan Kiszka, isar-users



On 2/20/26 16:36, Jan Kiszka wrote:
> On 20.02.26 15:42, Zhihang Wei wrote:
>> This is a workaround to fix the current qemuarm-trixie image unbootable
>> issue.
>>
>> Starting with Debian Trixie, update-initramfs invokes "dracut-install"
>> to collect and install required drivers into the generated initramfs.
>> "dracut-install" relies on fts_open() / fts_read() from glibc to
>> traverse directories and locate drivers.
>>
>> Due to a long-standing bug [1] between qemu and glibc, the fts_*
>> functions may fail to find files on certain 32-bit architectures. As a
>> result, required modules such as virtio_blk are not detected and not
>> added to the initramfs. The produced image then fails to boot under
>> qemu because the block device driver is missing.
>>
>> A similiar dracut bug report was filed in 2024 [2], pointing to this
>> upstream glibc issue reported in 2018 [1]. No upstream fix has been
>> applied, and the issue appears to affect only qemu builds for specific
>> 32-bit targets.
>>
>> As a temporary workaround, use a customized initramfs-hook to append
>> the neccessary drivers that are currently missed from the initramfs.
>>
>> For a complete fix, we either need to push for an upstream glibc/qemu
>> fix, or convince dracut to avoid using these non-POSIX fts_* functions
>> and use opendir() / readdir() instead.
>>
>> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=23960
>> [2] https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=1079443
>>
>> Signed-off-by: Zhihang Wei <wzh@ilbers.de>
>> ---
>> Changes in v2:
>> - Use initramfs-hook to install the driver, instead of adding another
>>    variable
>>
>>   meta-isar/conf/multiconfig/qemuarm-trixie.conf            | 4 +++-
>>   .../initramfs-virtio-blk-hook_0.1.bb                      | 8 ++++++++
>>   2 files changed, 11 insertions(+), 1 deletion(-)
>>   create mode 100644 meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb
>>
>> diff --git a/meta-isar/conf/multiconfig/qemuarm-trixie.conf b/meta-isar/conf/multiconfig/qemuarm-trixie.conf
>> index 5600ab23..20eecd92 100644
>> --- a/meta-isar/conf/multiconfig/qemuarm-trixie.conf
>> +++ b/meta-isar/conf/multiconfig/qemuarm-trixie.conf
>> @@ -1,7 +1,9 @@
>>   # This software is a part of Isar.
>> -# Copyright (C) 2024 ilbers GmbH
>> +# Copyright (C) 2024-2026 ilbers GmbH
>>   #
>>   # SPDX-License-Identifier: MIT
>>   
>>   MACHINE ?= "qemuarm"
>>   DISTRO ?= "debian-trixie"
>> +
>> +IMAGE_INSTALL += "initramfs-virtio-blk-hook"
> This covers the initramfs-tools based generation. What if someone
> enables dracut (kas/opt/dracut.yaml)?
A pure dracut generated initramfs for qemuarm-trixie cannot boot. It
surprisingly has virtio_blk, but still not bootable. Need to find the
reason.

Actually, there should be more drivers installed into initramfs by
initramfs-tools, but they are now missing due to the same bug. Adding
virtio-blk just makes this initramfs-tools generated initramfs
"minimally" bootable. My guess is that the dracut generated initramfs
is missing some other necessary drivers.

Zhihang
>> diff --git a/meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb b/meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb
>> new file mode 100644
>> index 00000000..229d91d6
>> --- /dev/null
>> +++ b/meta/recipes-initramfs/initramfs-virtio-blk-hook/initramfs-virtio-blk-hook_0.1.bb
>> @@ -0,0 +1,8 @@
>> +# This software is a part of Isar.
>> +# Copyright (C) 2026 ilbers GmbH
>> +#
>> +# SPDX-License-Identifier: MIT
>> +
>> +inherit initramfs-hook
>> +
>> +HOOK_ADD_MODULES = "virtio-blk"
> Jan
>

-- 
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/42fb7bd5-985d-4cf0-8c37-6fa93aa6df5c%40ilbers.de.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] qemuarm-trixie: Workaround with missing drivers in qemuarm-trixie initramfs
  2026-02-20 15:55   ` Zhihang Wei
@ 2026-02-20 16:43     ` 'Jan Kiszka' via isar-users
  0 siblings, 0 replies; 4+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-02-20 16:43 UTC (permalink / raw)
  To: Zhihang Wei, isar-users, Quirin Gylstorff

On 20.02.26 16:55, Zhihang Wei wrote:
> 
> 
> On 2/20/26 16:36, Jan Kiszka wrote:
>> On 20.02.26 15:42, Zhihang Wei wrote:
>>> This is a workaround to fix the current qemuarm-trixie image unbootable
>>> issue.
>>>
>>> Starting with Debian Trixie, update-initramfs invokes "dracut-install"
>>> to collect and install required drivers into the generated initramfs.
>>> "dracut-install" relies on fts_open() / fts_read() from glibc to
>>> traverse directories and locate drivers.
>>>
>>> Due to a long-standing bug [1] between qemu and glibc, the fts_*
>>> functions may fail to find files on certain 32-bit architectures. As a
>>> result, required modules such as virtio_blk are not detected and not
>>> added to the initramfs. The produced image then fails to boot under
>>> qemu because the block device driver is missing.
>>>
>>> A similiar dracut bug report was filed in 2024 [2], pointing to this
>>> upstream glibc issue reported in 2018 [1]. No upstream fix has been
>>> applied, and the issue appears to affect only qemu builds for specific
>>> 32-bit targets.
>>>
>>> As a temporary workaround, use a customized initramfs-hook to append
>>> the neccessary drivers that are currently missed from the initramfs.
>>>
>>> For a complete fix, we either need to push for an upstream glibc/qemu
>>> fix, or convince dracut to avoid using these non-POSIX fts_* functions
>>> and use opendir() / readdir() instead.
>>>
>>> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=23960
>>> [2] https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=1079443
>>>
>>> Signed-off-by: Zhihang Wei <wzh@ilbers.de>
>>> ---
>>> Changes in v2:
>>> - Use initramfs-hook to install the driver, instead of adding another
>>>    variable
>>>
>>>   meta-isar/conf/multiconfig/qemuarm-trixie.conf            | 4 +++-
>>>   .../initramfs-virtio-blk-hook_0.1.bb                      | 8 ++++++++
>>>   2 files changed, 11 insertions(+), 1 deletion(-)
>>>   create mode 100644 meta/recipes-initramfs/initramfs-virtio-blk-
>>> hook/initramfs-virtio-blk-hook_0.1.bb
>>>
>>> diff --git a/meta-isar/conf/multiconfig/qemuarm-trixie.conf b/meta-
>>> isar/conf/multiconfig/qemuarm-trixie.conf
>>> index 5600ab23..20eecd92 100644
>>> --- a/meta-isar/conf/multiconfig/qemuarm-trixie.conf
>>> +++ b/meta-isar/conf/multiconfig/qemuarm-trixie.conf
>>> @@ -1,7 +1,9 @@
>>>   # This software is a part of Isar.
>>> -# Copyright (C) 2024 ilbers GmbH
>>> +# Copyright (C) 2024-2026 ilbers GmbH
>>>   #
>>>   # SPDX-License-Identifier: MIT
>>>     MACHINE ?= "qemuarm"
>>>   DISTRO ?= "debian-trixie"
>>> +
>>> +IMAGE_INSTALL += "initramfs-virtio-blk-hook"
>> This covers the initramfs-tools based generation. What if someone
>> enables dracut (kas/opt/dracut.yaml)?
> A pure dracut generated initramfs for qemuarm-trixie cannot boot. It
> surprisingly has virtio_blk, but still not bootable. Need to find the
> reason.
> 
> Actually, there should be more drivers installed into initramfs by
> initramfs-tools, but they are now missing due to the same bug. Adding
> virtio-blk just makes this initramfs-tools generated initramfs
> "minimally" bootable. My guess is that the dracut generated initramfs
> is missing some other necessary drivers.

initramfs and "necessary" drivers is tricky for us. Normally, those are
probed on the machine that will use the initramfs afterwards, but that
does not work with Isar. With trixie, some unconditionally installed
modules were dropped, and that already caused extra efforts downstream
(unless you are on Debian kernels, it's often best to simply compile
them in).

But maybe there is more involved with plain dracut, and Quirin has some
idea.

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center

-- 
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/79032cb0-c5e8-478b-8b99-84bd95195ab1%40siemens.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-20 16:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-20 14:42 [PATCH v2] qemuarm-trixie: Workaround with missing drivers in qemuarm-trixie initramfs Zhihang Wei
2026-02-20 15:36 ` 'Jan Kiszka' via isar-users
2026-02-20 15:55   ` Zhihang Wei
2026-02-20 16:43     ` 'Jan Kiszka' via isar-users

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox