summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAles Kozumplik <akozumpl@redhat.com>2010-10-26 16:34:45 +0200
committerAles Kozumplik <akozumpl@redhat.com>2010-10-27 09:12:32 +0200
commit11572d8a4e146f1e9e6c9db4f01b83bdd08dec22 (patch)
treea7cf4b64c3b2efac88033911f49471a51cf269ad /scripts
parent36c6d5cf9100f5435c0b2a76cbfb8c684597520b (diff)
downloadanaconda-11572d8a4e146f1e9e6c9db4f01b83bdd08dec22.tar.gz
anaconda-11572d8a4e146f1e9e6c9db4f01b83bdd08dec22.tar.xz
anaconda-11572d8a4e146f1e9e6c9db4f01b83bdd08dec22.zip
Fix two problems with initrds for multipla kernels during a pungi compose.
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mk-images3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/mk-images b/scripts/mk-images
index 3b0f91854..c80775841 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"