diff --git a/init.sh b/init.sh index 01cba0c..7dc5b0d 100755 --- a/init.sh +++ b/init.sh @@ -147,19 +147,17 @@ then create_dir $MOUNT_DIR mount ${dest}1 $MOUNT_DIR echo "copying all file to USB drive" - cp ${TMP_DIR}/* $MOUNT_DIR &> /dev/null - sync + cp -R ${TMP_DIR}/* $MOUNT_DIR &> /dev/null umount $MOUNT_DIR + echo Unmounting key, please wait ... + sleep 5 # Make key bootable if bios. if [[ $BOOT_TYPE == "bios" ]] then # In this mode, we need to write syslinux MBR. echo "Writing syslinux mbr.ini fo $dest" dd bs=440 count=1 conv=notrunc if=${syslinux_mod}/${BOOT_TYPE}/mbr.bin of=${dest} - sleep 5 - #cd ${TMP_DIR}/syslinux-${SYSLINUX_VERSION}/bios/linux/ syslinux --directory syslinux --install ${dest}1 - cd $current_dir fi exit 0 fi