What are the nuisances of creating a bootable Windows 7 USB drive from linux with ms-sys or dd?
Solution 1:
The ms-sys
command is important. With the -7
option it creates a Windows 7 compatible boot sector on your flash drive.
You can't use dd because ISO's use an ISO Filesystem such as UDF or ISO9660, where-as your USB drive only properly supports disk file systems such as ext3, FAT32, or NTFS
Would be better use rsync instead of cp -r ?
Not really. cp -r
works perfectly fine. Just realize that NTFS handles permissions differently to Linux, so using rsync to keep everything intact doesn't matter too much. All that really matters is that the files from the ISO are on the USB and that the boot sector is formatted correctly using ms-sys -7
You can do all the steps as root if you want. The only 2 steps that really require root are mkfs
and the 2 mount
's
If you're getting permission problems even as root, you may need to mount your USB using ntfs-3g /dev/sdb1
as some Linux Distributions only supply a Read-Only driver for NTFS.
Solution 2:
I have tried with dd (dd if=/file/win7.iso of=/dev/sdb), and it doesn't work.
My steps to make it work:
- Install ms-sys
- gparted to create partition, and create NTFS filesystem.
Afterwards apply these commands:
# mount -o loop win7.iso /mnt/iso
# mount /dev/sdb1 /mnt/usb
# cp -r /mnt/iso/* /mnt/usb/*
# ms-sys -7 /dev/sdb*