Thursday, June 29, 2017

Creating a USB drive Windows 7 installer from Ubuntu 16.04

If you have an .iso file for the installer, do the following:

1. Mount the installer .iso using loopback device
    #mount win7.iso /mnt
2. Identify the device name in linux of your USB drive (ex. /dev/sdc)
    #fdisk -l
3. Open gparted on the USB drive device
    #gparted /dev/sdc
4. In gparted delete all partitions then do the following:
    a. Create a new partition table, select type: 'msdos'
    b. Create an NTFS partition
    c. Through "Manage flags" option, check 'boot'
    d. Exit from gparted
5. Copy all the contents of /mnt to the root of the newly prepared USB drive
6. Unmount the newly prepared USB drive (which was mounted automatically by the Ubuntu file manager when inserted earlier)
6. Install ms-sys (
7. Install the boot sector
    #ms-sys -7 /dev/sdc
8. Unmount /dev/sdc
9. Umount /mnt

No comments: