I have:
- ISO image of Windows 7 install media
- 4 GB USB flash drive
- no DVD drive
- Linux installed
|
|
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:
Call Open gparted, select the USB drive, right-click on the file system, then click on "Manage Flags". Check the boot checkbox, then close. ...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:
Note, this copies the whole device! — which is usually (much) bigger than the files copied to it. So instead I propose
Thus for example with 8 M extra bytes:
As always, double check the device names very carefully when working with The method creating a bootable USB presented above works also with Win10 installer iso. I tried it running Ubuntu 16.04 copying Win10_1703_SingleLang_English_x64.iso (size 4,241,291,264 bytes) onto an 8 GB USB-stick — in non-UEFI [non-secure] boot only. After execution dd reports: 8300156+0 records in 8300156+0 records out 4249679872 bytes (4.2 GB, 4.0 GiB) copied, 412.807 s, 10.3 MB/s Reverse if/of next time you want to put the Windows 7 installer onto USB. |
|||||||||||||||||||||
|
|
You can accomplish this with dd, if your PC supports UEFI, and, by extension, GPT disks. 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. |
|||||||||||||||||||||
|
|
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?):
|
|||
|
|
|
Instead of
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 or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?