Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer
1  
You also need to format the ntfs partition with mkfs. –  lzm Mar 3 '12 at 11:40
    
sudo mkfs.ntfs /dev/sdc1 step missing. Also to enable the boot flag you type "a" then "1" then enter. –  Matt H Oct 2 '12 at 21:05
    
@MattH: where should I do that step? This is a community wiki, you can modify the answer instead of commenting. Thanks! –  Olivier Lalonde Oct 8 '12 at 14:15
    
Shouldn't that be 'cp -a /mnt/iso/* /media/usb', otherwise I get a folder called iso inside /media/usb –  Aaron J Lang Aug 30 '13 at 22:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.