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:
Is there a way to make Windows boot from a USB image created on Linux?
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
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.
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
Once the USB is formatted using the above method, install a Windows partition and edit the Master Boot Record:
Its a simple process.
For BIOS: MBR partition scheme
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.)
Mount the USB somewhere, for example
/media/<user>/<disc_label>
Install grub to the USB using:
(Install to the disk; not partition!)
Extract the contents of the iso onto the root of the USB stick; I personally use 7z for this:
(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
Edit/create boot/grub/grub.cfg so it contains the following menuentry:
When you reach the grub prompt (
grub>
) typeboot
and press EnterEnjoy 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 *
Copy
efi/microsoft/boot
one level upward:(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.)
Extract
1/Windows/Boot/EFI/bootmgfw.efi
fromsources/install.wim
Place this file as
efi/boot/bootx64.efi
Enjoy your UEFI-bootable windows 7 USB!
For UEFI: GPT partition scheme - chapter 2 **
When I replaced my SSD with a more modern / faster / bigger one I made the old one into a USB drive. To reach the existing grub on that drive I did the following:
make an
efi/boot
directory (as above)copy
efi/debian/grubx64.efi
andefi/debian/grub.cfg
toefi/boot/bootx64.efi
andefi/boot/grub.cfg
.boot the new usb drive via the computer's boot menu.
I guess that this should be done whenever a new version of grub is installed. (but even the old version worked fine before I updated the system after 2 years)
You might want to disable os probing in
/etc/default/grub
(GRUB_DISABLE_OS_PROBER=true
) - see this page.