dd
is a 1:1 copy, it copies the entire device regardless what's on it. If you only copy a partition (sdf1
) it's unlikely to be bootable as the bootloader usually resides on sdf MBR.
If the free space is zeroed, you could save the free space by use of gzip.
To zero the free space, you may use:
mount /dev/sdf1 /mnt/tmp
dd if=/dev/zero bs=1M | split -b 1G - /mnt/tmp/zerofile
sync
rm /mnt/tmp/zerofile*
umount /mnt/tmp
To create a gzip compressed image:
dd if=/dev/sdf bs=1M | gzip > win7.img.gz
To restore from that image, it's:
gunzip < win7.img.gz | dd of=/dev/sdf bs=1M
Other alternatives are partimage
or ntfsclone
(in case of ntfs), which only store files, not free space, however the result may not be bootable as it's not a 1:1 copy.
Rather than using WOEUSB, try using a piece of software that I can confirm to work, called MKUSB (also known as "Do USB Stuff" / dus
). (Ubuntu Wiki pages: MKUSB, MKUSB GUI)
There may be versions of this in the repositories already, but I prefer to have the 'latest' so I keep using the PPA, which is why I indicate to set up the PPA on your system specifically here.
First, install the MKUSB PPA so we get the latest MKUSB version:
sudo add-apt-repository ppa:mkusb/ppa
sudo apt-get update
sudo apt-get install mkusb mkusb-common dus guidus
Next, run mkusb
. It'll ask you if you want to run the version called 'dus', we want to hit Yes at that screen.
![enter image description here](https://i.stack.imgur.com/sJRJ4.png)
It will open a terminal window for the console output, which is very useful to have so you can see the progress of the write tasks.
![enter image description here](https://i.stack.imgur.com/Tz5Uz.png)
It should prompt you for your sudo
credentials as well, however I'm running this from a Live USB at the moment so it doesn't prompt me, it just goes to the next screen in the GUI:
![enter image description here](https://i.stack.imgur.com/VQlgH.png)
Once you click OK you'll see this screen. Choose "Install (make a boot device)" and hit OK:
![enter image description here](https://i.stack.imgur.com/teqFq.png)
Then choose "Extracting Windows installer"
![enter image description here](https://i.stack.imgur.com/hD80v.png)
It will then open a page asking you to navigate to the ISO. Go to the ISO file, select it, then hit OK.
It'll then ask you to select the device you want to write to. This will overwrite all data on the selected device, so make sure you select the right one (in my system, /dev/sdc
is the USB stick I'm going to put the Windows installer disk onto)
![enter image description here](https://i.stack.imgur.com/hwOD2.png)
Click "OK" and it'll confirm you want to begin the write process.
It'll list the tasks it wants to do, and ask you if you really want to do this. Select "Go", then hit "Go" when you're ready for it to run.
The console window will gain focus and you can watch the 'progress':
![enter image description here](https://i.stack.imgur.com/bVIWY.png)
This will take many of your system resources and will result in some slowness on your computer at times, so you might want to go get a coffee or read the newspaper or take a quick walk. This will take some time to complete, because it clones the ISO to a tarball, and then extracts the tarball to the target device.
When it's done, the GUI will return with this screen if it successfully created the disk:
![enter image description here](https://i.stack.imgur.com/rxF7c.png)
Hit OK, and remove the disk from your computer. You can then shut down and boot to the installer USB stick that was created.
A warning: Once you install Windows, you will then need to boot to a LiveUSB for Ubuntu, and follow the steps to run Boot Repair (the link is from the Ubuntu Wiki) in order to restore Grub so you can boot into Linux again. Otherwise, you will only be able to boot into Windows (this is why Windows is typically installed first before you install Ubuntu).
Best Answer
WoeUSB requires that the target device (the USB drive that you inserted) be unmounted before it can write anything to it. Open the Disks application, select the USB device that you inserted in the left pane of Disks and unmount it. Click the black square marked by a red arrow in the below screenshot to unmount the selected partition.