[master] Fix two problems with initrds for multipla kernels during a pungi compose.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For i386, pungi hanged when PAE kernel modules are gathered: this was
because we extracted the PAE modules into the same location as the non-PAE
modules previously. By this time, non-PAE modules exist compressed with
.gz. When mk-images runs gzip on the new modules, it interactively asks
user whether it should owerwrite the compressed (non-PAE) files. Pungi
doesn't show you the prompt so all you see is that it hangs. This is not
observable with x86_64 composes since they only produce one
kernel. Neither is it observable with any pungi composes run via cron
since (my explanation) cron closes stdin for pungi, gzip inherits that and
assumes 'no' for overwriting files, producing a corrupted initrd.img in
the process.

The second problem was that our PAE initrds have always contained both sets
of modules, thus making them 20 MB larger then necessary.
---
 scripts/mk-images |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/scripts/mk-images b/scripts/mk-images
index 3b0f918..c807758 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -288,6 +288,8 @@ makemoduletree() {
     ln -snf ../firmware $MMB_DIR/lib/firmware
 
     echo "Copying kernel modules..."
+    # might not be the first kernel we are building the image for, remove the target dir's contents
+    rm -rf $MMB_DIR/lib/modules/*
     cp -a $KERNELROOT/lib/modules/* $MMB_DIR/lib/modules/
     echo "Removing extraneous modules..."
     find $MMB_DIR/lib/modules/ -name *.ko | while read module ; do
@@ -499,6 +501,7 @@ for KERNELARCH in $arches; do
 
         KERNELROOT=$KERNELBASE/$KERNELARCH
         mkdir -p $KERNELROOT
+        rm -rf $KERNELROOT/* # in case we already populated the dir for a previous kernel tag
 
         foundakernel="yes"
 
-- 
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux