[PATCH] add code so that initramfs created for rescue kernel

Gene Czarcinski gczarcinski at ec.rr.com
Thu Dec 4 14:04:31 UTC 2014


This update addresses the problem described in rhbz#1170589.

While a initramfs file is created for the rescue kernel when a
kickstart liveimg for a squashfs.img install, it is not created if
the install uses a tarball of the system instead of the squashfs.img.

The added code creates the initramfs f	le for the rescue kernel.
---
 pyanaconda/packaging/livepayload.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
index f8051ff..b35521e 100644
--- a/pyanaconda/packaging/livepayload.py
+++ b/pyanaconda/packaging/livepayload.py
@@ -442,6 +442,12 @@ class LiveImageKSPayload(LiveImagePayload):
             self.pct = 100
         threadMgr.wait(THREAD_LIVE_PROGRESS)
 
+        # Live needs to create the rescue image before bootloader is written
+        for kernel in self.kernelVersionList:
+            log.info("Generating rescue image for %s", kernel)
+            iutil.execInSysroot("new-kernel-pkg",
+                                ["--rpmposttrans", kernel])
+
     def postInstall(self):
         """ Unmount and remove image
 
-- 
1.9.3



More information about the anaconda-patches mailing list