--- xcat/lib/perl/xCAT_plugin/packimage.pm	2013-06-03 10:39:07.409390705 -0400
+++ xcat/lib/perl/xCAT_plugin/packimage.pm	2013-06-03 12:02:12.693820359 -0400
@@ -354,12 +354,22 @@
        $callback->({error=>["$rootimg_dir does not exist, run genimage -o $osver -p $profile on a server with matching architecture"]});
        return;
     }
-    $callback->({data=>["$verb contents of $rootimg_dir"]});
+
+    my $gzip_bin = `which pigz 2>/dev/null`;
+    if ($? != 0) {
+        $gzip_bin = "gzip";
+    } else {
+        $gzip_bin = "pigz";
+    }
+
+    $method_explain = ($method =~ /cpio/ ? "$method+$gzip_bin" : "$method");
+
+    $callback->({data=>["$verb contents of $rootimg_dir using $method_explain"]});
     unlink("$destdir/rootimg.gz");
     unlink("$destdir/rootimg.sfs");
     if ($method =~ /cpio/) {
         if ( ! $exlistloc ) {
-            $excludestr = "find . -xdev |cpio -H newc -o | gzip -c - > ../rootimg.gz";
+            $excludestr = "find . -xdev |cpio -H newc -o | $gzip_bin -c > ../rootimg.gz";
         }else {
             chdir("$rootimg_dir");
             system("$excludestr >> $xcat_packimg_tmpfile"); 
@@ -367,7 +377,7 @@
             	system("$includestr >> $xcat_packimg_tmpfile"); 
             }
             #$excludestr =~ s!-a \z!|cpio -H newc -o | gzip -c - > ../rootimg.gz!;
-            $excludestr = "cat $xcat_packimg_tmpfile|cpio -H newc -o | gzip -c - > ../rootimg.gz";
+            $excludestr = "cat $xcat_packimg_tmpfile|cpio -H newc -o | $gzip_bin -c > ../rootimg.gz";
         }
         $oldmask = umask 0077;
     } elsif ($method =~ /squashfs/) {
