I have been reading some web pages and posts (here and in other forums) about how to create a Windows 7 installation USB media from linux (to install Windows 7)
I asked in TechNet about this, and I got a reply with general information on how to do it:
"I personally am not very familiar with linux, but basicaly all that you need to do... in whatever way you do it is the following:
Format a usb flash drive, either fat32 or ntfs create a partition that is large enough to host the windows installation (give or take 3GB for 64bit, aroudn 2.5gb for 32bit) and mark that partition as active/bootable. Since this can be done with windows, but just as well with a tool like gparted, you should be able to do the same in debian.
Once you have created that partition, mount the iso that you download, and copy all files starting from the root, into the root of the usb flash drive.
That's all there's to it."
I found another method in various places, that is almost the same what was mentioned at TechNet. However, there seems to be a missing step in this method and/or a step that I'm not sure is necessary.
dd doesn't always work. Basically, the missing step was to write a proper boot sector to the usb stick, which can be done from linux with
ms-sys. This works with the retail version of
Here is the complete rundown, see serverfault question for more details:
- Install ms-sys.
- Check what device your usb media is assigned (
fdisk -l) here we will assume it is
Delete all partitions, create a new one taking up all the space, set type to NTFS, and set it bootable:
Create NTFS filesystem:
mkfs.ntfs -f /dev/sdb1
Mount iso and usb media:
mount -o loop win7.iso /mnt/iso
mount /dev/sdb1 /mnt/usb
Copy over all files:
# cp -r /mnt/iso/* /mnt/usb/
Write Windows 7 MBR on usb stick:
# ms-sys -7 /dev/sdb
Make sure the write is flushed (be patient it can take a few minutes):
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.
Shouldn't the usb work without doing the last step
# ms-sys -7 /dev/sdb? Or is it to make the usb bootable? Does it only to mark the partition as bootable?
Wouldn't it be better use rsync instead of
Do all this steps have to be done as
root? If not, do I need to
chmodall files to
chownall the directories that are used to mount the USB device and the ISO image? I suppose that it's just easier to copy the data as
rootand it not affect the data.
Has anyone tried this method or some similar like copying the iso with