mirror of
https://github.com/ValdikSS/windows2usb.git
synced 2023-08-10 21:13:16 +03:00
Perfer ntfs-3g for NTFS mounting. Fixes #13.
This commit is contained in:
parent
b0d00df519
commit
79aa386d84
@ -167,6 +167,11 @@ then
|
|||||||
uefimode=
|
uefimode=
|
||||||
[[ "$labeltype" == "gpt" ]] && uefimode=1
|
[[ "$labeltype" == "gpt" ]] && uefimode=1
|
||||||
[[ "$labeltype" == "gptntfs" ]] && uefimode=1
|
[[ "$labeltype" == "gptntfs" ]] && uefimode=1
|
||||||
|
mountntfs_cmd="mount.ntfs-3g"
|
||||||
|
if ! command -v "$mountntfs_cmd" > /dev/null;
|
||||||
|
then
|
||||||
|
mountntfs_cmd="mount"
|
||||||
|
fi
|
||||||
|
|
||||||
check_requirements
|
check_requirements
|
||||||
check_iso_and_device "$isopath" "$dev"
|
check_iso_and_device "$isopath" "$dev"
|
||||||
@ -196,7 +201,7 @@ then
|
|||||||
ms-sys -n "$(get_dev_partition_num "${dev}" "1")"
|
ms-sys -n "$(get_dev_partition_num "${dev}" "1")"
|
||||||
|
|
||||||
echo "${bold} == Mounting data partition ==${normal}"
|
echo "${bold} == Mounting data partition ==${normal}"
|
||||||
mount "$(get_dev_partition_num "${dev}" "1")" "$partpath"
|
"$mountntfs_cmd" "$(get_dev_partition_num "${dev}" "1")" "$partpath"
|
||||||
|
|
||||||
# GPT
|
# GPT
|
||||||
elif [[ "$labeltype" == "gpt" ]];
|
elif [[ "$labeltype" == "gpt" ]];
|
||||||
@ -231,7 +236,7 @@ then
|
|||||||
mkfs.ntfs -L "$isolabel" -f "$(get_dev_partition_num "${dev}" "2")"
|
mkfs.ntfs -L "$isolabel" -f "$(get_dev_partition_num "${dev}" "2")"
|
||||||
|
|
||||||
echo "${bold} == Mounting data partition ==${normal}"
|
echo "${bold} == Mounting data partition ==${normal}"
|
||||||
mount "$(get_dev_partition_num "${dev}" "2")" "$partpath"
|
"$mountntfs_cmd" "$(get_dev_partition_num "${dev}" "2")" "$partpath"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${bold} == Extracting files from ISO to the partition ==${normal}"
|
echo "${bold} == Extracting files from ISO to the partition ==${normal}"
|
||||||
|
Loading…
Reference in New Issue
Block a user