From 5a291a1ee8cf01a0b372beb1b6a5ebf1797fb953 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Tue, 17 Nov 2015 22:12:43 +0100 Subject: [PATCH] make_win_usb: add mbr info for xp/2000/2003 and Vista. --- make_win_usb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/make_win_usb b/make_win_usb index 6929fac..b9ec6b5 100755 --- a/make_win_usb +++ b/make_win_usb @@ -26,7 +26,7 @@ sudo parted ${WIN_USB} mkpart primary 0% 100MS-partition table sudo parted ${WIN_USB} set 1 boot on sudo mkfs.ntfs ${WIN_USB}1 --fast --no-indexing -# Mount USB key +# Mount first partition of the USB key sudo mkdir -p -- "${WIN_USB_MNT_PATH}" sudo mount ${WIN_USB}1 "${WIN_USB_MNT_PATH}" @@ -35,14 +35,13 @@ sudo mkdir -p -- "${WIN_ISO_MNT_PATH}" sudo mount "${WIN_ISO_FILE}" "${WIN_ISO_MNT_PATH}" -o loop,ro # Copy all files from ISO to USB -sudo cp -rv "${WIN_ISO_MNT_PATH}"* "${WIN_USB_MNT_PATH}" +sudo cp -rv -- "${WIN_ISO_MNT_PATH}"* "${WIN_USB_MNT_PATH}" # Umount and remove mount path sudo umount "${WIN_USB_MNT_PATH}" sudo umount "${WIN_ISO_MNT_PATH}" sudo rmdir -- "${WIN_USB_MNT_PATH}" "${WIN_ISO_MNT_PATH}" - ## Make the key bootable # Ensure gettext is available @@ -64,4 +63,10 @@ fi # For Win 7/8 sudo ms-sys --mbr7 "${WIN_USB}" +# For Win XP/2000/2003 +#sudo ms-sys --mbr "${WIN_USB}" + +# For Win Vista +#sudo ms-sys --mbrvista "${WIN_USB}" + exit 0