public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] rootfs: run kernel-install after update-initramfs
@ 2026-04-15 12:55 srinuvasan.a via isar-users
  2026-04-15 13:05 ` 'Jan Kiszka' via isar-users
  2026-04-17  7:35 ` 'Quirin Gylstorff' via isar-users
  0 siblings, 2 replies; 7+ messages in thread
From: srinuvasan.a via isar-users @ 2026-04-15 12:55 UTC (permalink / raw)
  To: isar-users; +Cc: srinuvasan, Shivaschandra KL

From: srinuvasan <srinuvasan.a@siemens.com>

When efibootguard is used as the primary bootloader and
systemd-boot as secondary, the WIC plugin expects /boot/EFI/Linux
to contain a unified kernel image for first boot.

Run kernel-install after update-initramfs to ensure the unified
kernel image is generated and placed correctly.

Invoke kernel-install for UKI generation only when:
- ukify binary is available
- /usr/lib/kernel/install.conf exists

Signed-off-by: Shivaschandra KL <shivaschandra.k-l@siemens.com>
Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
---
 meta/classes-recipe/rootfs.bbclass | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
index a9233111..9024f006 100644
--- a/meta/classes-recipe/rootfs.bbclass
+++ b/meta/classes-recipe/rootfs.bbclass
@@ -14,10 +14,20 @@ ROOTFS_DISTRO ?= "${DISTRO}"
 ROOTFS_USE_DRACUT ??= ""
 
 def initramfs_generator_cmdline(d):
-    rootfs_packages =  d.getVar('ROOTFS_PACKAGES') or ''
+    rootfs_packages = d.getVar('ROOTFS_PACKAGES') or ''
+
     if 'dracut' in rootfs_packages or bb.utils.to_boolean(d.getVar('ROOTFS_USE_DRACUT')):
-        return "dracut --force --kver \"$kernel_version\""
-    return "update-initramfs -u -v -k \"$kernel_version\""
+        return 'dracut --force --kver "$kernel_version"'
+
+    cmdline = 'update-initramfs -u -v -k "$kernel_version"'
+
+    cmdline += (
+        '; command -v ukify >/dev/null && [ -f /usr/lib/kernel/install.conf ] && '
+        'kernel-install add "$kernel_version" "/boot/${kernel##*/}" '
+        '"/boot/initrd.img-$kernel_version" || :'
+    )
+
+    return cmdline
 
 ROOTFS_PACKAGES ?= ""
 ROOTFS_VARDEPS ?= ""
@@ -627,6 +637,10 @@ python do_generate_initramfs_setscene () {
 }
 
 rootfs_generate_initramfs[progress] = "custom:rootfs_progress.InitrdProgressHandler"
+rootfs_generate_initramfs:prepend() {
+    export kernel
+}
+
 rootfs_generate_initramfs() {
     if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f -name 'vmlinu[xz]*')" ]; then
         for kernel in ${ROOTFSDIR}/boot/vmlinu[xz]-*; do
-- 
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/20260415125522.458497-1-srinuvasan.a%40siemens.com.

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

* Re: [PATCH] rootfs: run kernel-install after update-initramfs
  2026-04-15 12:55 [PATCH] rootfs: run kernel-install after update-initramfs srinuvasan.a via isar-users
@ 2026-04-15 13:05 ` 'Jan Kiszka' via isar-users
  2026-04-16 12:16   ` Srinuvasan Arjunan
  2026-04-17  4:55   ` 'Arjunan, Srinu' via isar-users
  2026-04-17  7:35 ` 'Quirin Gylstorff' via isar-users
  1 sibling, 2 replies; 7+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-04-15 13:05 UTC (permalink / raw)
  To: srinuvasan.a, isar-users; +Cc: Shivaschandra KL

On 15.04.26 14:55, srinuvasan.a via isar-users wrote:
> From: srinuvasan <srinuvasan.a@siemens.com>
> 
> When efibootguard is used as the primary bootloader and
> systemd-boot as secondary, the WIC plugin expects /boot/EFI/Linux
> to contain a unified kernel image for first boot.
> 

Err, where/how do you define "primary" and "secondary" EFI bootloaders?
Note that EBG is isar-cip-core, and there we definitely do not have such
a concept. Can you elaborate what you want to achieve?

> Run kernel-install after update-initramfs to ensure the unified
> kernel image is generated and placed correctly.
> 
> Invoke kernel-install for UKI generation only when:
> - ukify binary is available
> - /usr/lib/kernel/install.conf exists
> 
> Signed-off-by: Shivaschandra KL <shivaschandra.k-l@siemens.com>
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
>  meta/classes-recipe/rootfs.bbclass | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
> index a9233111..9024f006 100644
> --- a/meta/classes-recipe/rootfs.bbclass
> +++ b/meta/classes-recipe/rootfs.bbclass
> @@ -14,10 +14,20 @@ ROOTFS_DISTRO ?= "${DISTRO}"
>  ROOTFS_USE_DRACUT ??= ""
>  
>  def initramfs_generator_cmdline(d):
> -    rootfs_packages =  d.getVar('ROOTFS_PACKAGES') or ''
> +    rootfs_packages = d.getVar('ROOTFS_PACKAGES') or ''
> +
>      if 'dracut' in rootfs_packages or bb.utils.to_boolean(d.getVar('ROOTFS_USE_DRACUT')):
> -        return "dracut --force --kver \"$kernel_version\""
> -    return "update-initramfs -u -v -k \"$kernel_version\""
> +        return 'dracut --force --kver "$kernel_version"'
> +
> +    cmdline = 'update-initramfs -u -v -k "$kernel_version"'
> +
> +    cmdline += (
> +        '; command -v ukify >/dev/null && [ -f /usr/lib/kernel/install.conf ] && '

Who is using ukify? No one in isar or isar-cip-core at least. Are you
referring to an out-of-tree wic plugin with these changes?

In-tree (Isar), we still need to enable
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py to generate
UKIs. But that would be systemd-boot UKI-only, no EBG then.

Jan

> +        'kernel-install add "$kernel_version" "/boot/${kernel##*/}" '
> +        '"/boot/initrd.img-$kernel_version" || :'
> +    )
> +
> +    return cmdline
>  
>  ROOTFS_PACKAGES ?= ""
>  ROOTFS_VARDEPS ?= ""
> @@ -627,6 +637,10 @@ python do_generate_initramfs_setscene () {
>  }
>  
>  rootfs_generate_initramfs[progress] = "custom:rootfs_progress.InitrdProgressHandler"
> +rootfs_generate_initramfs:prepend() {
> +    export kernel
> +}
> +
>  rootfs_generate_initramfs() {
>      if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f -name 'vmlinu[xz]*')" ]; then
>          for kernel in ${ROOTFSDIR}/boot/vmlinu[xz]-*; do


-- 
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/7e120fa6-703a-4b7e-b242-bea198ea10ce%40siemens.com.

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

* Re: [PATCH] rootfs: run kernel-install after update-initramfs
  2026-04-15 13:05 ` 'Jan Kiszka' via isar-users
@ 2026-04-16 12:16   ` Srinuvasan Arjunan
  2026-04-20  9:33     ` Srinuvasan Arjunan
  2026-04-17  4:55   ` 'Arjunan, Srinu' via isar-users
  1 sibling, 1 reply; 7+ messages in thread
From: Srinuvasan Arjunan @ 2026-04-16 12:16 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 4328 bytes --]



On Wednesday, April 15, 2026 at 6:35:30 PM UTC+5:30 Jan Kiszka wrote:

On 15.04.26 14:55, srinuvasan.a via isar-users wrote: 
> From: srinuvasan <srinuv...@siemens.com> 
> 
> When efibootguard is used as the primary bootloader and 
> systemd-boot as secondary, the WIC plugin expects /boot/EFI/Linux 
> to contain a unified kernel image for first boot. 
> 

Err, where/how do you define "primary" and "secondary" EFI bootloaders? 
Note that EBG is isar-cip-core, and there we definitely do not have such 
a concept. Can you elaborate what you want to achieve? 

> Run kernel-install after update-initramfs to ensure the unified 
> kernel image is generated and placed correctly. 
> 
> Invoke kernel-install for UKI generation only when: 
> - ukify binary is available 
> - /usr/lib/kernel/install.conf exists 
> 
> Signed-off-by: Shivaschandra KL <shivasch...@siemens.com> 
> Signed-off-by: srinuvasan <srinuv...@siemens.com> 
> --- 
> meta/classes-recipe/rootfs.bbclass | 20 +++++++++++++++++--- 
> 1 file changed, 17 insertions(+), 3 deletions(-) 
> 
> diff --git a/meta/classes-recipe/rootfs.bbclass 
b/meta/classes-recipe/rootfs.bbclass 
> index a9233111..9024f006 100644 
> --- a/meta/classes-recipe/rootfs.bbclass 
> +++ b/meta/classes-recipe/rootfs.bbclass 
> @@ -14,10 +14,20 @@ ROOTFS_DISTRO ?= "${DISTRO}" 
> ROOTFS_USE_DRACUT ??= "" 
> 
> def initramfs_generator_cmdline(d): 
> - rootfs_packages = d.getVar('ROOTFS_PACKAGES') or '' 
> + rootfs_packages = d.getVar('ROOTFS_PACKAGES') or '' 
> + 
> if 'dracut' in rootfs_packages or 
bb.utils.to_boolean(d.getVar('ROOTFS_USE_DRACUT')): 
> - return "dracut --force --kver \"$kernel_version\"" 
> - return "update-initramfs -u -v -k \"$kernel_version\"" 
> + return 'dracut --force --kver "$kernel_version"' 
> + 
> + cmdline = 'update-initramfs -u -v -k "$kernel_version"' 
> + 
> + cmdline += ( 
> + '; command -v ukify >/dev/null && [ -f /usr/lib/kernel/install.conf ] 
&& ' 

Who is using ukify? No one in isar or isar-cip-core at least. Are you 
referring to an out-of-tree wic plugin with these changes? 

In-tree (Isar), we still need to enable 
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py to generate 
UKIs. But that would be systemd-boot UKI-only, no EBG then. 

Jan


  Hi Jan,

 In our downstream project, we use a combination of EBG and systemd-boot, 
along with UKI (ukify) images.

EBG acts as the primary bootloader to enable watchdog support during early 
boot, while systemd-boot is used as a secondary bootloader to  select the 
appropriate Btrfs snapshot along with its corresponding UKI image.

If the system fails to be successfully “blessed” (e.g., due to issues 
detected during validation of a newly created Btrfs snapshot), we need a 
mechanism to fall back to a previously working snapshot and its associated 
UKI image. This fallback selection is handled by systemd-boot.

To support this flow, the WIC plugin expects /boot/EFI/Linux to contain the 
unified kernel image required for the first boot.
Therefore, we run kernel-install after update-initramfs to ensure that the 
unified kernel image is properly generated and placed in the expected 
location. 

Many thanks,
Srinu



> + 'kernel-install add "$kernel_version" "/boot/${kernel##*/}" ' 
> + '"/boot/initrd.img-$kernel_version" || :' 
> + ) 
> + 
> + return cmdline 
> 
> ROOTFS_PACKAGES ?= "" 
> ROOTFS_VARDEPS ?= "" 
> @@ -627,6 +637,10 @@ python do_generate_initramfs_setscene () { 
> } 
> 
> rootfs_generate_initramfs[progress] = 
"custom:rootfs_progress.InitrdProgressHandler" 
> +rootfs_generate_initramfs:prepend() { 
> + export kernel 
> +} 
> + 
> rootfs_generate_initramfs() { 
> if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f -name 'vmlinu[xz]*')" ]; 
then 
> for kernel in ${ROOTFSDIR}/boot/vmlinu[xz]-*; do 


-- 
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/5793656d-dbda-4b46-95ad-c6fc0422e1c8n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 5756 bytes --]

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

* RE: [PATCH] rootfs: run kernel-install after update-initramfs
  2026-04-15 13:05 ` 'Jan Kiszka' via isar-users
  2026-04-16 12:16   ` Srinuvasan Arjunan
@ 2026-04-17  4:55   ` 'Arjunan, Srinu' via isar-users
  2026-04-17  7:27     ` 'Jan Kiszka' via isar-users
  1 sibling, 1 reply; 7+ messages in thread
From: 'Arjunan, Srinu' via isar-users @ 2026-04-17  4:55 UTC (permalink / raw)
  To: Kiszka, Jan, isar-users; +Cc: K L, Shivaschandra

> Err, where/how do you define "primary" and "secondary" EFI bootloaders?
> Note that EBG is isar-cip-core, and there we definitely do not have such a concept. Can you
> elaborate what you want to achieve?

In our downstream project, we use a combination of EBG and systemd-boot, along with UKI (ukify) images.

EBG acts as the primary bootloader to enable watchdog support during early boot,
while systemd-boot is used as a secondary bootloader to select the appropriate Btrfs snapshot along with its corresponding UKI image.

If the system fails to be successfully “blessed” (e.g., due to issues detected during validation of a newly created Btrfs snapshot),
 we need a mechanism to fall back to a previously working snapshot and its associated UKI image. This fallback selection is handled by systemd-boot.

To support this flow, the WIC plugin expects /boot/EFI/Linux to contain the unified kernel image required for the first boot.

Therefore, we run kernel-install after update-initramfs to ensure that the unified kernel image is properly 
generated and placed in the expected location.

Many thanks,
Srinu

-----Original Message-----
From: Kiszka, Jan (FT RPD CED) <jan.kiszka@siemens.com> 
Sent: 15 April 2026 18:35
To: Arjunan, Srinu (FT FDS CES LX PBU 2) <srinuvasan.a@siemens.com>; isar-users@googlegroups.com
Cc: K L, Shivaschandra (FT FDS CES LX PBU 1) <shivaschandra.k-l@siemens.com>
Subject: Re: [PATCH] rootfs: run kernel-install after update-initramfs

On 15.04.26 14:55, srinuvasan.a via isar-users wrote:
> From: srinuvasan <srinuvasan.a@siemens.com>
> 
> When efibootguard is used as the primary bootloader and systemd-boot 
> as secondary, the WIC plugin expects /boot/EFI/Linux to contain a 
> unified kernel image for first boot.
> 

Err, where/how do you define "primary" and "secondary" EFI bootloaders?
Note that EBG is isar-cip-core, and there we definitely do not have such a concept. Can you elaborate what you want to achieve?

> Run kernel-install after update-initramfs to ensure the unified kernel 
> image is generated and placed correctly.
> 
> Invoke kernel-install for UKI generation only when:
> - ukify binary is available
> - /usr/lib/kernel/install.conf exists
> 
> Signed-off-by: Shivaschandra KL <shivaschandra.k-l@siemens.com>
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
>  meta/classes-recipe/rootfs.bbclass | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes-recipe/rootfs.bbclass 
> b/meta/classes-recipe/rootfs.bbclass
> index a9233111..9024f006 100644
> --- a/meta/classes-recipe/rootfs.bbclass
> +++ b/meta/classes-recipe/rootfs.bbclass
> @@ -14,10 +14,20 @@ ROOTFS_DISTRO ?= "${DISTRO}"
>  ROOTFS_USE_DRACUT ??= ""
>  
>  def initramfs_generator_cmdline(d):
> -    rootfs_packages =  d.getVar('ROOTFS_PACKAGES') or ''
> +    rootfs_packages = d.getVar('ROOTFS_PACKAGES') or ''
> +
>      if 'dracut' in rootfs_packages or bb.utils.to_boolean(d.getVar('ROOTFS_USE_DRACUT')):
> -        return "dracut --force --kver \"$kernel_version\""
> -    return "update-initramfs -u -v -k \"$kernel_version\""
> +        return 'dracut --force --kver "$kernel_version"'
> +
> +    cmdline = 'update-initramfs -u -v -k "$kernel_version"'
> +
> +    cmdline += (
> +        '; command -v ukify >/dev/null && [ -f /usr/lib/kernel/install.conf ] && '

Who is using ukify? No one in isar or isar-cip-core at least. Are you referring to an out-of-tree wic plugin with these changes?

In-tree (Isar), we still need to enable
meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py to generate UKIs. But that would be systemd-boot UKI-only, no EBG then.

Jan

> +        'kernel-install add "$kernel_version" "/boot/${kernel##*/}" '
> +        '"/boot/initrd.img-$kernel_version" || :'
> +    )
> +
> +    return cmdline
>  
>  ROOTFS_PACKAGES ?= ""
>  ROOTFS_VARDEPS ?= ""
> @@ -627,6 +637,10 @@ python do_generate_initramfs_setscene () {  }
>  
>  rootfs_generate_initramfs[progress] = "custom:rootfs_progress.InitrdProgressHandler"
> +rootfs_generate_initramfs:prepend() {
> +    export kernel
> +}
> +
>  rootfs_generate_initramfs() {
>      if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f -name 'vmlinu[xz]*')" ]; then
>          for kernel in ${ROOTFSDIR}/boot/vmlinu[xz]-*; do


--
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/PUZPR06MB57475ADF58813411880F623488202%40PUZPR06MB5747.apcprd06.prod.outlook.com.

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

* Re: [PATCH] rootfs: run kernel-install after update-initramfs
  2026-04-17  4:55   ` 'Arjunan, Srinu' via isar-users
@ 2026-04-17  7:27     ` 'Jan Kiszka' via isar-users
  0 siblings, 0 replies; 7+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-04-17  7:27 UTC (permalink / raw)
  To: Arjunan, Srinu (FT FDS CES LX PBU 2), isar-users
  Cc: K L, Shivaschandra (FT FDS CES LX PBU 1)

On 17.04.26 06:55, Arjunan, Srinu (FT FDS CES LX PBU 2) wrote:
>> Err, where/how do you define "primary" and "secondary" EFI bootloaders?
>> Note that EBG is isar-cip-core, and there we definitely do not have such a concept. Can you
>> elaborate what you want to achieve?
> 
> In our downstream project, we use a combination of EBG and systemd-boot, along with UKI (ukify) images.
> 
> EBG acts as the primary bootloader to enable watchdog support during early boot,
> while systemd-boot is used as a secondary bootloader to select the appropriate Btrfs snapshot along with its corresponding UKI image.

https://gitlab.com/cip-project/cip-core/isar-cip-core/-/commits/wip/abvar?ref_type=heads

Please contribute/continue so that we can find a standard and robust
version is CIP. Last version I saw internally was just broken.

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/9eca3e44-bb16-4904-9aed-e71fecf2b6e6%40siemens.com.

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

* Re: [PATCH] rootfs: run kernel-install after update-initramfs
  2026-04-15 12:55 [PATCH] rootfs: run kernel-install after update-initramfs srinuvasan.a via isar-users
  2026-04-15 13:05 ` 'Jan Kiszka' via isar-users
@ 2026-04-17  7:35 ` 'Quirin Gylstorff' via isar-users
  1 sibling, 0 replies; 7+ messages in thread
From: 'Quirin Gylstorff' via isar-users @ 2026-04-17  7:35 UTC (permalink / raw)
  To: isar-users



On 4/15/26 2:55 PM, srinuvasan.a via isar-users wrote:
> From: srinuvasan <srinuvasan.a@siemens.com>
> 
> When efibootguard is used as the primary bootloader and
> systemd-boot as secondary, the WIC plugin expects /boot/EFI/Linux
> to contain a unified kernel image for first boot.
> 
> Run kernel-install after update-initramfs to ensure the unified
> kernel image is generated and placed correctly.
> 
> Invoke kernel-install for UKI generation only when:
> - ukify binary is available
> - /usr/lib/kernel/install.conf exists
> 
> Signed-off-by: Shivaschandra KL <shivaschandra.k-l@siemens.com>
> Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
> ---
>   meta/classes-recipe/rootfs.bbclass | 20 +++++++++++++++++---
>   1 file changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
> index a9233111..9024f006 100644
> --- a/meta/classes-recipe/rootfs.bbclass
> +++ b/meta/classes-recipe/rootfs.bbclass
> @@ -14,10 +14,20 @@ ROOTFS_DISTRO ?= "${DISTRO}"
>   ROOTFS_USE_DRACUT ??= ""
>   
>   def initramfs_generator_cmdline(d):
> -    rootfs_packages =  d.getVar('ROOTFS_PACKAGES') or ''
> +    rootfs_packages = d.getVar('ROOTFS_PACKAGES') or ''
> +
>       if 'dracut' in rootfs_packages or bb.utils.to_boolean(d.getVar('ROOTFS_USE_DRACUT')):
> -        return "dracut --force --kver \"$kernel_version\""
> -    return "update-initramfs -u -v -k \"$kernel_version\""
> +        return 'dracut --force --kver "$kernel_version"'
> +
> +    cmdline = 'update-initramfs -u -v -k "$kernel_version"'
> +
> +    cmdline += (
> +        '; command -v ukify >/dev/null && [ -f /usr/lib/kernel/install.conf ] && '
> +        'kernel-install add "$kernel_version" "/boot/${kernel##*/}" '
> +        '"/boot/initrd.img-$kernel_version" || :'
Why are you not using the uki build of dracut?

Quirin
> +    )
> +
> +    return cmdline
>   
>   ROOTFS_PACKAGES ?= ""
>   ROOTFS_VARDEPS ?= ""
> @@ -627,6 +637,10 @@ python do_generate_initramfs_setscene () {
>   }
>   
>   rootfs_generate_initramfs[progress] = "custom:rootfs_progress.InitrdProgressHandler"
> +rootfs_generate_initramfs:prepend() {
> +    export kernel
> +}
> +
>   rootfs_generate_initramfs() {
>       if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f -name 'vmlinu[xz]*')" ]; then
>           for kernel in ${ROOTFSDIR}/boot/vmlinu[xz]-*; do

-- 
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/568ae2cf-a3a0-4e9e-b876-9fb437c873f3%40siemens.com.

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

* Re: [PATCH] rootfs: run kernel-install after update-initramfs
  2026-04-16 12:16   ` Srinuvasan Arjunan
@ 2026-04-20  9:33     ` Srinuvasan Arjunan
  0 siblings, 0 replies; 7+ messages in thread
From: Srinuvasan Arjunan @ 2026-04-20  9:33 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 4750 bytes --]

  Please ignore my previous message—it was accidentally sent from my end.

  Apologies for the confusion.


Many thanks,

Srinu

On Monday, April 20, 2026 at 2:53:20 PM UTC+5:30 Srinuvasan Arjunan wrote:

> On Wednesday, April 15, 2026 at 6:35:30 PM UTC+5:30 Jan Kiszka wrote:
>
> On 15.04.26 14:55, srinuvasan.a via isar-users wrote: 
> > From: srinuvasan <srinuv...@siemens.com> 
> > 
> > When efibootguard is used as the primary bootloader and 
> > systemd-boot as secondary, the WIC plugin expects /boot/EFI/Linux 
> > to contain a unified kernel image for first boot. 
> > 
>
> Err, where/how do you define "primary" and "secondary" EFI bootloaders? 
> Note that EBG is isar-cip-core, and there we definitely do not have such 
> a concept. Can you elaborate what you want to achieve? 
>
> > Run kernel-install after update-initramfs to ensure the unified 
> > kernel image is generated and placed correctly. 
> > 
> > Invoke kernel-install for UKI generation only when: 
> > - ukify binary is available 
> > - /usr/lib/kernel/install.conf exists 
> > 
> > Signed-off-by: Shivaschandra KL <shivasch...@siemens.com> 
> > Signed-off-by: srinuvasan <srinuv...@siemens.com> 
> > --- 
> > meta/classes-recipe/rootfs.bbclass | 20 +++++++++++++++++--- 
> > 1 file changed, 17 insertions(+), 3 deletions(-) 
> > 
> > diff --git a/meta/classes-recipe/rootfs.bbclass 
> b/meta/classes-recipe/rootfs.bbclass 
> > index a9233111..9024f006 100644 
> > --- a/meta/classes-recipe/rootfs.bbclass 
> > +++ b/meta/classes-recipe/rootfs.bbclass 
> > @@ -14,10 +14,20 @@ ROOTFS_DISTRO ?= "${DISTRO}" 
> > ROOTFS_USE_DRACUT ??= "" 
> > 
> > def initramfs_generator_cmdline(d): 
> > - rootfs_packages = d.getVar('ROOTFS_PACKAGES') or '' 
> > + rootfs_packages = d.getVar('ROOTFS_PACKAGES') or '' 
> > + 
> > if 'dracut' in rootfs_packages or 
> bb.utils.to_boolean(d.getVar('ROOTFS_USE_DRACUT')): 
> > - return "dracut --force --kver \"$kernel_version\"" 
> > - return "update-initramfs -u -v -k \"$kernel_version\"" 
> > + return 'dracut --force --kver "$kernel_version"' 
> > + 
> > + cmdline = 'update-initramfs -u -v -k "$kernel_version"' 
> > + 
> > + cmdline += ( 
> > + '; command -v ukify >/dev/null && [ -f /usr/lib/kernel/install.conf ] 
> && ' 
>
> Who is using ukify? No one in isar or isar-cip-core at least. Are you 
> referring to an out-of-tree wic plugin with these changes? 
>
> In-tree (Isar), we still need to enable 
> meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py to generate 
> UKIs. But that would be systemd-boot UKI-only, no EBG then. 
>
> Jan
>
>
>   Hi Jan,
>
>  In our downstream project, we use a combination of EBG and systemd-boot, 
> along with UKI (ukify) images.
>
> EBG acts as the primary bootloader to enable watchdog support during early 
> boot, while systemd-boot is used as a secondary bootloader to  select the 
> appropriate Btrfs snapshot along with its corresponding UKI image.
>
> If the system fails to be successfully “blessed” (e.g., due to issues 
> detected during validation of a newly created Btrfs snapshot), we need a 
> mechanism to fall back to a previously working snapshot and its associated 
> UKI image. This fallback selection is handled by systemd-boot.
>
> To support this flow, the WIC plugin expects /boot/EFI/Linux to contain 
> the unified kernel image required for the first boot.
> Therefore, we run kernel-install after update-initramfs to ensure that the 
> unified kernel image is properly generated and placed in the expected 
> location. 
>
> Many thanks,
> Srinu
>
> > + 'kernel-install add "$kernel_version" "/boot/${kernel##*/}" ' 
> > + '"/boot/initrd.img-$kernel_version" || :' 
> > + ) 
> > + 
> > + return cmdline 
> > 
> > ROOTFS_PACKAGES ?= "" 
> > ROOTFS_VARDEPS ?= "" 
> > @@ -627,6 +637,10 @@ python do_generate_initramfs_setscene () { 
> > } 
> > 
> > rootfs_generate_initramfs[progress] = 
> "custom:rootfs_progress.InitrdProgressHandler" 
> > +rootfs_generate_initramfs:prepend() { 
> > + export kernel 
> > +} 
> > + 
> > rootfs_generate_initramfs() { 
> > if [ -n "$(sudo find '${ROOTFSDIR}/boot' -type f -name 'vmlinu[xz]*')" 
> ]; then 
> > for kernel in ${ROOTFSDIR}/boot/vmlinu[xz]-*; do 
>
>
> -- 
> 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/43ab5336-c573-4027-abd2-6f088519b866n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 6308 bytes --]

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

end of thread, other threads:[~2026-04-20  9:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-15 12:55 [PATCH] rootfs: run kernel-install after update-initramfs srinuvasan.a via isar-users
2026-04-15 13:05 ` 'Jan Kiszka' via isar-users
2026-04-16 12:16   ` Srinuvasan Arjunan
2026-04-20  9:33     ` Srinuvasan Arjunan
2026-04-17  4:55   ` 'Arjunan, Srinu' via isar-users
2026-04-17  7:27     ` 'Jan Kiszka' via isar-users
2026-04-17  7:35 ` 'Quirin Gylstorff' 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