Ubuntu / Linux news and application reviews.

Update: you may want to check out WinUSB (fork) instead, a tool that can create bootable Windows 10 as well as 8 and 7 sticks from Linux. See here: Make A Bootable Windows 10 USB Install Stick On Linux With WinUSB Fork

I recently had to create a Windows 7 bootable USB flash drive for my girlfriend because she doesn't have a DVD-ROM, and I had to do it from Ubuntu as I don't have Windows (neither at work or at home).

What I ended up on using is the good old (just a figure of speech) UNetbootin which is available for both Windows and Linux. It's in the Ubuntu repositories so to install it, search for it in the Ubuntu Software Center. For Windows and other Linux distributions, get it from HERE.

At first I didn't think it'll work since you can't choose Windows from the UNetbooting options, but it actually works and I've successfully installed Windows 7 on my girlfriend's computer using UNetbootin. Here's what I did:


How to create a bootable Windows 7 USB Drive while using Ubuntu


Firstly, make sure you have a Windows 7 .ISO file (you can create it from the DVD) and a 4GB USB flash drive (or larger).


1. Install Gparted and format the USB drive to NTFS. In Ubuntu, use the following command to install Gparted:
sudo apt-get install gparted

To be able to format a drive to NTFS, you'll also need ntfs-3g - install it using the following command:
sudo apt-get install ntfs-3g

Gparted screenshot

To format the USB drive as NTFS, open Gparted via the System > Administration > GParted Partition Editor. Then select your USB drive from the top right drop-down. If you only have one hard disk, your USB drive should be "sdb". Now right click your USB drive in GParted and select "Unmount" and you'll then be able to select Partition > Format > ntfs. The drive will be formatted to NTFS in a few seconds.

I'm not sure if UNetbootin will mark the drive as bootable as my USB drive already had the "boot" flag enabled from Gparted, so you may want to enable it too: right click the USB drive and select "Manage flags", then check the "boot" flag.

Then you'll have to mount the USB drive back. You can do it from the command line or Disk Utility (System > Administration > Disk Utility) but to keep things simple, you can just unplug the USB flash drive and plug it back in to the computer.

2. Some users have reported that some recent Unetbootin versions no longer let you select an USB drive formatted to NTFS and by formatting it to FAT, the Windows 7 installation fails. So here's what to do: download Unetbootin version 494 from HERE (version tested and it should work).

Then, right click the downloaded Unetbootin file, select Properties and on the "Permissions" tab, check the "Allow executing file as program" box. Then simply double click it and it should open.

Using this (494) Unetbootin version, you have an option to "Show all Drives" which lets you select the NTFS formatted drive and write the Windows 7 ISO onto it. With newer version, this option is no longer available.


3. Open UNetbootin, select "Diskimage" and then browse for your Windows 7 ISO file.


Unetbootin screenshot

Now check the "Show all drives" box and select your USB drive from the list at the bottom of the Unetbootin dialog. For me, that's "/dev/sdb1" but it might be different for you (you should know this from Gparted which you've used to format the USB drive under step 1),

Now simply click the "OK" button and wait for the files to be copied to the USB drive.

After Unetbootin is done, you can use the USB stick to install Windows 7 on any computer that supports booting from an USB drive.

Update: you may want to check out WinUSB (fork) instead, a tool that can create bootable Windows 10 as well as 8 and 7 sticks from Linux. See here: Make A Bootable Windows 10 USB Install Stick On Linux With WinUSB Fork