How Can I Create a Windows Bootable Usb Stick Using Ubuntu?
I'd Like to Create a Windows Bootable Usb Stick, but I Don't Have a Windows Machine with Me at the Moment to Do So. How Could I Achieve the Same Using Ubuntu?...
I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?
16 Answers
WinUSB is old, obsolete, and outdated. It can cause problems on newer systems. You should be using WineUSB or other software in place of WinUSB.
This answer is, however, left here as-is for historical purposes.
Create a bootable Windows USB (Vista and above) from Ubuntu through WinUSB software.
Ubuntu 12.04 through 15.04
Run the below commands on terminal to install WinUSB from a PPA,
sudo add-apt-repository ppa:colingille/freshlight
sudo apt-get update
sudo apt-get install winusb
Warning for Ubuntu EFI:
installing WinUSB on EFI loaded Ubuntu will uninstall the grub-efi packages in order to install the grub-pc packages. It will make your system unbootable if you don't manually reinstall grub-efi package before rebooting.
To do the manual re-install do:
sudo update-grub
sudo grub-install /dev/sda
sudo update-grub
sudo reboot
Any Ubuntu version
even other Linux distros as long as GParted and GRUB are installed.
Install GParted, GRUB, 7z, and NTFS on Ubuntu with:
sudo apt-get install gparted grub-pc-bin p7zip-full ntfs-3g
Must Read
For BIOS: MBR partition scheme
Using GParted, rewrite the USB drive's partition table as msdos, format it as NTFS, and then "Manage flags" and add the
bootflag.In GParted, right click the USB partition and select Information. Copy the UUID somewhere as you will need it.
Mount your Windows ISO or DVD and copy all its files to the USB drive.
Go to the USB drive, and if the folder named
boothas uppercase characters, make them all lowercase by renaming it.Install GRUB on the USB drive.
In the below command, replace
/dev/sdXwith the device (e.g./dev/sdb, not/dev/sdb1) and replace<USB_mount_folder>with the folder where you mounted the USB drive (which could be like/media/<username>/<UUID>).sudo grub-install --target=i386-pc --boot-directory="/<USB_mount_folder>/boot" /dev/sdXCreate a GRUB config file in the USB drive folder
boot/grub/with the namegrub.cfg.Write this into the file, replacing
<UUID_from_step_2>with the UUID you copied down in step 2.echo "If you see this, you have successfully booted from USB :)" insmod ntfs insmod search_fs_uuid search --no-floppy --fs-uuid <UUID_from_step_2> --set root ntldr /bootmgr bootUnmount the USB drive.
Now to use it, restart your PC, and boot from the USB drive.