From 00d4a7ea5a14e88ed3a644eff8c6524e849bccb1 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Fri, 7 Jan 2022 04:11:39 +0300 Subject: [PATCH] Make mode optional and assume MBR by default --- README.md | 10 +++++++--- windows2usb | 7 ++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b11d219..f96f184 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ Features: Windows 7/8/8.1/10/11 ISO to Flash Drive burning utility WARNING: this program will delete all existing data on your drive! -windows2usb +windows2usb [mbr/gpt/gptntfs/gpt+uefintfs] -mbr mode: the most universal, RECOMMENDED method. +mbr mode: the most universal, RECOMMENDED and DEFAULT method. This mode creates MBR partition table with FAT32 partition, installs BIOS and UEFI bootloaders, supports Secure Boot. install.wim file larger than 4 GiB will be split. @@ -44,7 +44,11 @@ gpt+uefintfs mode: alternative hacky installation method, not recommended. Download latest [portable AppImage version](https://github.com/ValdikSS/windows2usb/releases) from the **Releases** page, set *execution bit* (`chmod +x windows2usb-*.AppImage`) and run it from the terminal. -`windows2usb "` +`windows2usb ` + +For example: + +`./windows2usb.AppImage /dev/sdz /home/valdikss/windows10.iso` The program prints removable storage list if no arguments are supplied. diff --git a/windows2usb b/windows2usb index 9f17728..72c96ca 100755 --- a/windows2usb +++ b/windows2usb @@ -172,14 +172,14 @@ function sigint_handler() { umount_rm_path "$partpath" "$isomountpath" } -if [[ ! "$3" ]]; +if [[ ! "$2" ]]; then echo "${bold}Windows 7/8/8.1/10/11 ISO to Flash Drive burning utility" echo "WARNING: this program will delete all existing data on your drive!${normal}" echo - echo "$(basename "$0")" " " + echo "$(basename "$0")" " [mbr/gpt/gptntfs/gpt+uefintfs]" echo - echo "mbr mode: the most universal, RECOMMENDED method." + echo "mbr mode: the most universal, RECOMMENDED and DEFAULT method." echo " This mode creates MBR partition table with FAT32 partition," echo " installs BIOS and UEFI bootloaders, supports Secure Boot." echo " install.wim file larger than 4 GiB will be split." @@ -211,6 +211,7 @@ then isopath="$2" isolabel="" labeltype="$3" + [[ ! "$labeltype" ]] && labeltype="mbr" mountntfs_cmd="mount.ntfs-3g" if ! command -v "$mountntfs_cmd" > /dev/null; then