diff -Nurpd uck-code-orig/libraries/remaster-live-cd.sh uck-code-squash/libraries/remaster-live-cd.sh --- uck-code-orig/libraries/remaster-live-cd.sh 2013-07-08 22:49:51.487268167 +0200 +++ uck-code-squash/libraries/remaster-live-cd.sh 2013-07-09 19:52:31.213604419 +0200 @@ -513,8 +513,8 @@ function pack_rootfs() GUEST_KERNEL_VERSION=`ls /boot/config-* | sed 's/.*config-//' | cut -d '-' -f1 | sort -r | head -n1` if [ `echo -e "${SQUASHFS_VERSION}\n4.2" | sort | head -n1` = "4.2" ]; then if [ `echo -e "${GUEST_KERNEL_VERSION}\n2.6.30" | sort | head -n1` = "2.6.30" ]; then - echo "Squashfs>=4.1, guest kernel>=2.6.30: Enabling XZ compression for squashfs..." - EXTRA_OPTS="${EXTRA_OPTS} -comp xz" + echo "Squashfs>=4.1, guest kernel>=2.6.30: Enabling $SQUASH_COMP compression for squashfs..." + EXTRA_OPTS="${EXTRA_OPTS} -comp $SQUASH_COMP" fi fi diff -Nurpd uck-code-orig/uck-gui uck-code-squash/uck-gui --- uck-code-orig/uck-gui 2013-07-08 22:49:51.499268230 +0200 +++ uck-code-squash/uck-gui 2013-07-09 19:57:33.331102538 +0200 @@ -284,6 +284,13 @@ if [ $? -ne 0 ] ; then failure_user fi +# the default xz compression provides the best possibly compression, but slows bootup down on older or less capable systems +# lzo compression performs very well on less capable systems, speeding up boot times and application start times +SQUASH_COMP=`dialog_menu $'Which squashfs compression do you want to use' xz gzip lzo` +if [ $? -ne 0 ] ; then + failure_user +fi + dialog_msgbox "Ready to build" "$PRE_START_TEXT" echo "Preparing build environment..." @@ -325,7 +332,7 @@ echo "Running build process..." ( echo "Build ($0 $SAVED_ARGS) started at `date +'%Y-%m-%d %H:%M:%S'`" export UCK_USERNAME="$USER" -sudo bash "$SCRIPTS_DIR"/uck-remaster $USE_MOUNT "$ISO_IMAGE" "$BUILD_DIR" "$REMASTER_HOME" +sudo bash "$SCRIPTS_DIR"/uck-remaster $USE_MOUNT "$ISO_IMAGE" "$BUILD_DIR" "$REMASTER_HOME" "$SQUASH_COMP" RESULT=$? if [ $RESULT -ne 0 ]; then diff -Nurpd uck-code-orig/uck-remaster uck-code-squash/uck-remaster --- uck-code-orig/uck-remaster 2013-07-08 22:49:51.507268275 +0200 +++ uck-code-squash/uck-remaster 2013-07-09 20:50:33.774873535 +0200 @@ -24,7 +24,7 @@ function usage() { - echo "Usage: $0 [-m] iso-file.iso [customization-scripts-dir] [remaster-home]" + echo "Usage: $0 [-m] iso-file.iso [customization-scripts-dir] [remaster-home] [squash-comp]" } function check_exit_code() @@ -57,6 +57,7 @@ fi ISO_IMAGE="$1" CUSTOMIZE_DIR="$2" REMASTER_HOME=${3:-~/tmp} +SQUASH_COMP="$4" if [ -z "$ISO_IMAGE" ]; then usage @@ -197,9 +198,9 @@ fi if [ "$CUSTOMIZE_ROOTFS" = "yes" ] ; then if [ "$CLEAN_DESKTOP_MANIFEST" = "yes" ]; then - $SCRIPTS_DIR/uck-remaster-pack-rootfs -c "$REMASTER_HOME" + $SCRIPTS_DIR/uck-remaster-pack-rootfs -c "$REMASTER_HOME" "$SQUASH_COMP" else - $SCRIPTS_DIR/uck-remaster-pack-rootfs "$REMASTER_HOME" + $SCRIPTS_DIR/uck-remaster-pack-rootfs "$REMASTER_HOME" "$SQUASH_COMP" fi check_exit_code fi diff -Nurpd uck-code-orig/uck-remaster-pack-rootfs uck-code-squash/uck-remaster-pack-rootfs --- uck-code-orig/uck-remaster-pack-rootfs 2013-07-08 22:49:51.495268223 +0200 +++ uck-code-squash/uck-remaster-pack-rootfs 2013-07-09 20:50:08.006745669 +0200 @@ -24,7 +24,7 @@ function usage() { - echo "Usage: $0 [remaster-dir] [-c|--clean-desktop-manifest]" + echo "Usage: $0 [remaster-dir] [squash-comp] [-c|--clean-desktop-manifest]" } function failure() @@ -55,6 +55,7 @@ do done REMASTER_HOME="$1" +SQUASH_COMP="$2" if [ -z "$REMASTER_HOME" ]; then REMASTER_HOME=~/tmp fi @@ -68,4 +69,4 @@ fi ISO_REMASTER_DIR="$REMASTER_HOME/remaster-iso" REMASTER_DIR="$REMASTER_HOME/remaster-root" -pack_rootfs \ No newline at end of file +pack_rootfs