Create a bootable USB flash drive with Windows 7 in Debian / Ubuntu

So, we have

ISO image of Windows 7
USB-stick (/ dev / sdb1)
Linux Ubuntu / Debian

Format the flash drive in NTFS: The

sudo mkntfs -f / dev / sdb1

Provided that it has been prepared and properly marked before.
If it is not, then set Gparted

sudo apt-get install gparted

And through the interface format the flash drive to NTFS, do not forget to install flazhёk «boot»

The next stage, mount ISO-image in some folder (/ mnt / iso), install the USB flash drive into some directory (/ mnt / flash) and copy the contents of the folder with the ISO-image in a folder with flash.
I got this:

sudo mount -o loop ~ / soft / windows / windows7.iso / mnt / iso /
sudo mount / dev / sdb1 / mnt / flash /
sudo cp -r / mnt / iso / * / mnt / flash /

Now the hardest part, you need to install ms-sys, which is not in the repository.
The program needs to write the correct boot sector on the stick.
Downloading the latest version of the source code.

Unpack and install:

tar -xzvf ms-sys-2.3.0.tar.gz
cd ms-sys-2.3.0 /
sudo make
sudo checkinstall
sudo dpkg -i ms-sys_2.3.0-1_amd64.deb

Remove then will be using the commands

sudo dpkg -r ms-sys

Write the Windows 7 boot loader on the stick (optional -7 responsible for Windows 7, there are other versions of Windows):

sudo ms-sys -7 / dev / sdb