make_win_usb: add mbr info for xp/2000/2003 and Vista.
This commit is contained in:
parent
bcd72aaffd
commit
5a291a1ee8
11
make_win_usb
11
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 parted ${WIN_USB} set 1 boot on
|
||||||
sudo mkfs.ntfs ${WIN_USB}1 --fast --no-indexing
|
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 mkdir -p -- "${WIN_USB_MNT_PATH}"
|
||||||
sudo mount ${WIN_USB}1 "${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
|
sudo mount "${WIN_ISO_FILE}" "${WIN_ISO_MNT_PATH}" -o loop,ro
|
||||||
|
|
||||||
# Copy all files from ISO to USB
|
# 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
|
# Umount and remove mount path
|
||||||
sudo umount "${WIN_USB_MNT_PATH}"
|
sudo umount "${WIN_USB_MNT_PATH}"
|
||||||
sudo umount "${WIN_ISO_MNT_PATH}"
|
sudo umount "${WIN_ISO_MNT_PATH}"
|
||||||
sudo rmdir -- "${WIN_USB_MNT_PATH}" "${WIN_ISO_MNT_PATH}"
|
sudo rmdir -- "${WIN_USB_MNT_PATH}" "${WIN_ISO_MNT_PATH}"
|
||||||
|
|
||||||
|
|
||||||
## Make the key bootable
|
## Make the key bootable
|
||||||
|
|
||||||
# Ensure gettext is available
|
# Ensure gettext is available
|
||||||
|
@ -64,4 +63,10 @@ fi
|
||||||
# For Win 7/8
|
# For Win 7/8
|
||||||
sudo ms-sys --mbr7 "${WIN_USB}"
|
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
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue