← Back to team overview

curtin-dev team mailing list archive

[Merge] ~mwhudson/curtin:no-explicit-update-initramfs into curtin:master

 

Michael Hudson-Doyle has proposed merging ~mwhudson/curtin:no-explicit-update-initramfs into curtin:master.

Commit message:
curthooks: rely on reconfiguring kernel to create initramfs



Requested reviews:
  curtin developers (curtin-dev)

For more details, see:
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/482866
-- 
Your team curtin developers is requested to review the proposed merge of ~mwhudson/curtin:no-explicit-update-initramfs into curtin:master.
diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
index 5939ab0..b9f7548 100644
--- a/curtin/commands/curthooks.py
+++ b/curtin/commands/curthooks.py
@@ -2100,22 +2100,21 @@ def builtin_curthooks(cfg, target, state):
     ):
         configure_kernel_crash_dumps(cfg, pathlib.Path(target))
 
-    with events.ReportEventStack(
-            name=stack_prefix + '/updating-initramfs-configuration',
-            reporting_enabled=True, level="INFO",
-            description="updating initramfs configuration"):
-        if osfamily == DISTROS.debian:
-            # re-enable update_initramfs
-            enable_update_initramfs(cfg, target, machine)
-            update_initramfs(target, all_kernels=True)
-        elif osfamily == DISTROS.redhat:
+    if osfamily == DISTROS.redhat:
+        with events.ReportEventStack(
+                name=stack_prefix + '/updating-initramfs-configuration',
+                reporting_enabled=True, level="INFO",
+                description="updating initramfs configuration"):
             redhat_update_initramfs(target, cfg)
 
-    with events.ReportEventStack(
-            name=stack_prefix + '/kernel-postinstall',
-            reporting_enabled=True, level="INFO",
-            description="running kernel postinstall hooks"):
-        if osfamily == DISTROS.debian:
+    if osfamily == DISTROS.debian:
+        # The kernel postinstall hooks finally create the initrd,
+        # among other things to prepare for boot into the target
+        # system (e.g. running zipl on s390x)
+        with events.ReportEventStack(
+                name=stack_prefix + '/kernel-postinstall',
+                reporting_enabled=True, level="INFO",
+                description="running kernel postinstall hooks"):
             reconfigure_kernel(target)
 
     with events.ReportEventStack(

Follow ups