diff --git a/xCAT-server-2.0/share/xcat/netboot/centos/genimage b/xCAT-server-2.0/share/xcat/netboot/centos/genimage index 3fbd5b9d5..34027bb0f 100755 --- a/xCAT-server-2.0/share/xcat/netboot/centos/genimage +++ b/xCAT-server-2.0/share/xcat/netboot/centos/genimage @@ -181,8 +181,12 @@ sub mkinitrd { print $inifile " mount -t tmpfs rootfs /sysroot\n"; print $inifile " cd /sysroot\n"; print $inifile " echo -n \"Extracting root filesystem:\"\n"; + print $inifile " if [ -x /bin/cpio ]; then\n"; + print $inifile " zcat /rootimg.gz |/bin/cpio -idum\n"; + print $inifile " else\n"; print $inifile " zcat /rootimg.gz |cpio -idum\n"; - print $inifile " echo Done"; + print $inifile " fi\n"; + print $inifile " echo Done\n"; print $inifile "else\n"; print $inifile " echo -n Failed to download image, panicing in 5...\n"; print $inifile " for i in 4 3 2 1 0; do\n"; diff --git a/xCAT-server-2.0/share/xcat/netboot/fedora/genimage b/xCAT-server-2.0/share/xcat/netboot/fedora/genimage index 0c008a582..aad045c31 100755 --- a/xCAT-server-2.0/share/xcat/netboot/fedora/genimage +++ b/xCAT-server-2.0/share/xcat/netboot/fedora/genimage @@ -182,7 +182,7 @@ sub mkinitrd { print $inifile " cd /sysroot\n"; print $inifile " echo -n \"Extracting root filesystem:\"\n"; print $inifile " zcat /rootimg.gz |cpio -idum\n"; - print $inifile " echo Done"; + print $inifile " echo Done\n"; print $inifile "else\n"; print $inifile " echo -n Failed to download image, panicing in 5...\n"; print $inifile " for i in 4 3 2 1 0; do\n";