Wait 3 seconds after formatting the drive. Fixes #10.

This commit is contained in:
ValdikSS 2020-08-15 10:48:30 +03:00
parent 79aa386d84
commit 4dbe548678

View File

@ -192,6 +192,9 @@ then
echo "${bold} == Creating new MBR-formatted partition table ==${normal}" echo "${bold} == Creating new MBR-formatted partition table ==${normal}"
format_drive "dos" "$dev" format_drive "dos" "$dev"
echo "${bold} == Waiting 3 seconds to settle new partition layout ==${normal}"
sleep 3
echo "${bold} == Creating NTFS partition ==${normal}" echo "${bold} == Creating NTFS partition ==${normal}"
create_partitions "dos" "$dev" create_partitions "dos" "$dev"
mkfs.ntfs -L "$isolabel" -f "$(get_dev_partition_num "${dev}" "1")" mkfs.ntfs -L "$isolabel" -f "$(get_dev_partition_num "${dev}" "1")"
@ -217,6 +220,9 @@ then
echo "${bold} == Creating new GPT-formatted partition table ==${normal}" echo "${bold} == Creating new GPT-formatted partition table ==${normal}"
format_drive "gpt" "$dev" format_drive "gpt" "$dev"
echo "${bold} == Waiting 3 seconds to settle new partition layout ==${normal}"
sleep 3
echo "${bold} == Creating UEFI FAT partition ==${normal}" echo "${bold} == Creating UEFI FAT partition ==${normal}"
create_partitions "gpt" "$dev" create_partitions "gpt" "$dev"
mkfs.vfat -n "${isolabel:0:11}" "$(get_dev_partition_num "${dev}" "1")" mkfs.vfat -n "${isolabel:0:11}" "$(get_dev_partition_num "${dev}" "1")"
@ -230,6 +236,9 @@ then
echo "${bold} == Creating new GPT-formatted partition table ==${normal}" echo "${bold} == Creating new GPT-formatted partition table ==${normal}"
format_drive "gpt" "$dev" format_drive "gpt" "$dev"
echo "${bold} == Waiting 3 seconds to settle new partition layout ==${normal}"
sleep 3
echo "${bold} == Creating UEFI FAT and Microsoft NTFS partitions ==${normal}" echo "${bold} == Creating UEFI FAT and Microsoft NTFS partitions ==${normal}"
create_partitions "gptntfs" "$dev" create_partitions "gptntfs" "$dev"
write_uefintfs "$(get_dev_partition_num "${dev}" "1")" write_uefintfs "$(get_dev_partition_num "${dev}" "1")"