Can I use Ubuntu to write a Windows 7 ISO to USB? [duplicate]

Method 1

Using gparted format the drive FAT16, set the boot flag.

Using Archive Manager extract the iso to the drive.

(or just copy the DVD to the drive).

That's it.

works for me

Method 2

To create your bootable installer disc, select an ISO image or CD/DVD disc, and click Install enter image description here

This will create your Windows Vista/7 installer USB. It is worth mentioning here that the tool might also work with Windows 8; however, it has not been tested. Having said that, the developer has mentioned that the supported images include, “Windows Vista, Seven+.” You can install WinUSB either from the Deb package given at the developer’s website (for Oneiric, Natty, Maverick and Lucid), or from the PPA given below.

sudo add-apt-repository ppa:colingille/freshlight
sudo apt-get update
sudo apt-get install winusb

Since WinUSB also works from the command line, you can create a Windows 7 or Windows Vista USB installer by following the command line format given below

sudo winusb --format <iso path> <device>

Once the USB is formatted using the above method, install a Windows partition and edit the Master Boot Record:

sudo winusb --install <iso path> <partition>

Its a simple process.

For BIOS: MBR partition scheme

  1. Format the USB to FAT32 and mark it with the 'boot' flag. (NTFS works too, but for this tutorial I'm using FAT32 because you can make it UEFI bootable this way.)
  2. Mount the USB somewhere, for example /media/<user>/<disc_label>
  3. Install grub to the USB using:

    grub-install --force --no-floppy --boot-directory=/media/<user>/<disc_label>/boot /dev/sdX
    

    (Install to the disk; not partition!)

  4. Extract the contents of the iso onto the root of the USB stick; I personally use 7z for this:

    7z x /path/to/win.iso
    

    (Note that the Win7 iso has a boot dir; you will need to 'overlap' the boot dir created with grub with the contents of the iso. )

    You should end up with something like this

    ├── autorun.inf
    ├── boot
    │   └── grub
    ├── bootmgr
    ├── efi
    ├── setup.exe
    ├── sources
    ├── support
    └── upgrade
    
  5. Edit/create boot/grub/grub.cfg so it contains the following menuentry:

    menuentry 'Windows 7 AIO Installer' --class windows --class os {
      set root=(hd0,1)
      insmod part_msdos
      insmod fat
      insmod ntldr
      ntldr /bootmgr
    }
    
  6. When you reach the grub prompt (grub>) type boot and press Enter

  7. Enjoy your bootable stick.

    It may be a bit of a runaround, but this lets you add addtional resources as needed via edits to the grub.cfg file. I personally have a Windows 7 All In one (9 editions of win7) installer, Mini Windows XP (from hirens), DOS 6.22, memtest, and gparted live on one usb stick this way.

For UEFI: GPT partition scheme *

  1. Copy efi/microsoft/boot one level upward:

    cp -r efi/microsoft/boot efi/boot/
    

    (The path may be all uppercase, lowercase, or a mix, due to the case-insensitive nature of the FAT32 filesystem and differing mount options. Adjust commands to fit your situation.)

  2. Extract 1/Windows/Boot/EFI/bootmgfw.efi from sources/install.wim

    7z e sources/install.wim 1/Windows/Boot/EFI/bootmgfw.efi
    
  3. Place this file as efi/boot/bootx64.efi

    mv bootmgfw.efi efi/boot/bootx64.efi
    
  4. Enjoy your UEFI-bootable windows 7 USB!