Tuesday, August 14, 2012

Create Windows 7 64bit USB flash install media on Linux PC

(this was so easy before I never bothered to blog it, but this time, maybe because it was 64bit, maybe because of the colour of the moon, it took about 4 different attempts, so here it is…)

Use either df or other command to find your USB device

$ df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda1       691G  488G  169G  75% /
udev            3.8G   12K  3.8G   1% /dev
tmpfs           1.6G  940K  1.6G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.9G  436K  3.8G   1% /run/shm
/dev/loop0      5.3G  5.3G     0 100% /mnt/iso
/dev/mmcblk0p1  3.8G   32K  3.8G   1% /media/72AD-2013_
/dev/sdb 8G 0G 8G 0% /media/usbdrive

 

Check what device your USB media is assigned above it is /dev/sdb.

 

Use gparted to dismount and format the drive to NTFS (creates /dev/sdb1 on /dev/sdb)

 

Mount ISO and USB media:

$ sudo mkdir /mnt/iso

$ sudo mkdir /mnt/usb

$ sudo mount -o loop Windows7-64bit.iso /mnt/iso

$ sudo mount /dev/sdb1 /mnt/usb

 

Copy over all files (GUI or command line):

$ cp -r /mnt/iso/* /mnt/usb/

 

Download, untar, and install (make, sudo make install) ms-sys from here.

Use ms-sys to install a Windows 7 Master Boot Record on the USB stick:

$ ms-sys -7 /dev/sdb

 

And away you go…

No comments:

Blog Archive