make_win_usb: add mbr info for xp/2000/2003 and Vista.

This commit is contained in:
Jeremy Gardais 2015-11-17 22:12:43 +01:00
parent bcd72aaffd
commit 5a291a1ee8
1 changed files with 8 additions and 3 deletions

View File

@ -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