diff --git a/export-noobs/prerun.sh b/export-noobs/prerun.sh index a531be6..6065ae8 100755 --- a/export-noobs/prerun.sh +++ b/export-noobs/prerun.sh @@ -14,13 +14,12 @@ BOOT_DEV=/dev/mapper/${LOOP_DEV}p1 ROOT_DEV=/dev/mapper/${LOOP_DEV}p2 mkdir -p ${STAGE_WORK_DIR}/rootfs -mkdir -p ${STAGE_WORK_DIR}/bootfs mkdir -p ${NOOBS_DIR} mount $ROOT_DEV ${STAGE_WORK_DIR}/rootfs -mount $BOOT_DEV ${STAGE_WORK_DIR}/bootfs +mount $BOOT_DEV ${STAGE_WORK_DIR}/rootfs/boot -tar -I pxz -C ${STAGE_WORK_DIR}/bootfs -cpf ${NOOBS_DIR}/boot.tar.xz . -tar -I pxz -C ${STAGE_WORK_DIR}/rootfs -cpf ${NOOBS_DIR}/root.tar.xz . +tar -I pxz -C ${STAGE_WORK_DIR}/rootfs/boot -cpf ${NOOBS_DIR}/boot.tar.xz . +tar -I pxz -C ${STAGE_WORK_DIR}/rootfs --one-file-system -cpf ${NOOBS_DIR}/root.tar.xz . unmount_image ${IMG_FILE} diff --git a/scripts/common.sh b/scripts/common.sh index 0d2e837..fa8e44f 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -54,7 +54,7 @@ unmount_image(){ sleep 1 local LOOP_DEV=$(losetup -j ${1} | cut -f1 -d':') if [ -n "${LOOP_DEV}" ]; then - local MOUNTED_DIR=$(mount | grep $(basename ${LOOP_DEV} | head -n 1 | cut -f 3 -d ' ')) + local MOUNTED_DIR=$(mount | grep $(basename ${LOOP_DEV}) | head -n 1 | cut -f 3 -d ' ') if [ -n "${MOUNTED_DIR}" ]; then unmount $(dirname ${MOUNTED_DIR}) fi