- ISO image of Windows 7 install media
- 4 GB USB flash drive
- no DVD drive
- Linux installed
You can accomplish this with dd.
Open up a terminal, your going to need to find what device is your pendrive. If you have the drive mounted you can find the name of the device by typing "mount" and looking at it's entry. Something like the following:
In this case the first partion of /dev/sdb is mounted at /media/USBDISK. Open a root shell and unmount the drive.
Go to the directory where your ISO is stored in a root shell and type in the following: (Replace windows7.iso with whatever the iso is called, and /dev/sdb with the device id of your usb stick).
If your motherboard supports booting off of a pendrive it should be able to boot off it. This will get the installer on the pendrive not the OS itself.
OK, after unsuccessfully trying all methods mentioned here, I finally got it working. Basically, the missing step was to write a proper boot sector to the USB stick, which can be done from Linux with
Here is the complete rundown again:
Install ms-sys - if it is not in your repositories, get it here. Or alternatively, make sure lilo is installed (but do not run the liloconfig step on your local box if e.g. Grub is installed there!)
Check what device your USB media is assigned - here we will assume it is
Create an NTFS filesystem:
Write Windows 7 MBR on the USB stick (also works for windows 8), multiple options here:
Mount ISO and USB media:
# mount -o loop win7.iso /mnt/iso # mount /dev/sdb1 /mnt/usb
Copy over all files:
...and you're done.
After all that, you probably want to back up your USB media for further installations and get rid of the ISO file... Just use dd:
and reverse if/of next time you want to put the Windows 7 installer onto USB.
As always, double check the device names very carefully when working with
|show 2 more comments|
PCambell's suggestion is good but you will also want to clear the MBR, the linux equivalent is below
I tried this and it worked (I'm not sure why the dd method failed but seems the partition had to be ntfs?):
If you could manage to do all these tasks from within your linux desktop, you'll be rocking the house.
I think the toughest part would be fiddling with all the operations that Windows' Diskpart does. Making the partition marked as 'active' and 'boot', 'primary', etc.
you write as
(ADD 1 at the end or whatever your USB drive is placed at.)
Thank you for your interest in this question.
Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?