How to create a Windows 7 installation USB from Linux or Mac?

I have a Windows 7 installation DVD that came with a computer with no optical drive. I have an empty USB thumb drive. I have access to two computers with optical drives, one running Linux and the other running Mac OS X.

Notably, I do not have access to any Windows computer at this time. With the tools that I have, how can I create a thumb drive that I can boot with and install Windows 7?

Do I have to look out for anything when making the ISO from the DVD (DRM or anything)?

After the ISO is made, will UNetbootin work? How about dd?


Interesting question -- let's assume your flash drive is sdc and your ISO is called w7.iso.

I guess the most short and hassle-free answer is to ask if your motherboard supports USB-CDROM style booting, because if so you can just DD the image directly to the raw device:

dd if=w7.iso of=/dev/sdc

If not, you will need ms-sys, and then you will need to do something like the following:

First unmount the USB disk...

umount /dev/sdc

Then go into fdisk...

fdisk /dev/sdc

Once you're in fdisk, delete each partition by using d and then inputting the number of the respective partition. Now create an entirely new partition filling the disk by doing the following sequence: n, p, 1, ENTER, ENTER. ENTER. After that check it's done with p. Now set it as an NTFS partition with t, then 7, and give it the boot flag with a, 1, ENTER. Finally press w to write the table to the usb stick.

Put the filesystem on the partition by running the following as root:

mkfs.ntfs /dev/sdc1

Now you're going to need to mount the iso as a vnd. To do this, do the following...

mkdir /mnt/iso
mount -o loop w7.iso /mnt/iso

And now mount the USB stick again...

mount /dev/sdc1 /media/usb

Copy everything recursively from the loop mount to the USB disk...

cp -a /mnt/iso /media/usb

Write the master boot record to boot from...

ms-sys -7 /dev/sdc (use -m for WinXP)

And there you go (hopefully).

I tried something similar to this on my Debian machine and it worked, this is a bit of a tweaked version.