Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to create a Windows installation USB drive from an ISO file. I used UNetbootin which seems to be the only tool that can write non-Linux images.

The USB disk boots (sort of), but it gets stuck at the very first stage. A UNetbootin splash screen appears that keeps counting down from 10 to 0, and then restarts.

The screen looks like this:

enter image description here

Is there a way to make Windows boot from a USB image created on Linux?

share|improve this question
    
As far as I know it only works on an NTFS partition, so re-format your thumb drive. This brings another problem, because version 494 of unetbootin is the latest that could write to ntfs partitions, so use that one instead of the current. –  Cumulus007 Aug 25 '12 at 21:29

2 Answers 2

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>
share|improve this answer
    
You mean you do not even need to use unetbootin or similar tools? –  Salim Fadhley Mar 28 '12 at 23:35
    
That will copy the ISO content to USB, but will it make the USB bootable? –  mikewhatever Mar 28 '12 at 23:39
1  
Yes that will make USB bootable only u have to format the drive into FAT16 using gparted tool –  Gaurav_Java Mar 28 '12 at 23:42
    
This is usless to me unless it boots? I do not understand how Gaurav_Java's technique could make the disk bootable. Setting the boot flag only marks a partition as bootable but does not tell the computer what to boot. How on earth could this work? –  Salim Fadhley Mar 28 '12 at 23:46
1  
@SalimFadhley, remember that method 1 also talks about using the Archive Manager to extract the Win7 ISO on the pendrive, so it does work, but as far as I know, doesn't it should also work with FAT32? Thumbs up for the WinUSB method. –  crackout12 Mar 29 '12 at 0:04

Its a simple process.

  1. Format the usb to fat32 (I've heard ntfs works too, but I've never tested it myself, so for this tutorial I'm using fat32)
  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. 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.

EDIT: Works with ntfs; for UEFI booting its pretty simple, make a fat32 usb, extract the iso to its root, and you'll have to pull a certain file from sources/install.wim and stick it in /EFI/BOOT/BOOTX64.EFI Once I remember/refind the file I'll update this answer again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.