14

I am unable to solve this problem, I'm using Ubuntu 14.04. I already tried as root, and I still have not had success.

WinUSB reports this error:

Installation failed!
Exit code: 512
Log:
Formatting device...
Mounting...
mount: block device /home/flavio/Área de Trabalho/windows xp sp3 sata.iso is write-protected, mounting read-only
Copying...
Installing grub...
Installing for x86_64-efi platform.
grub-install: error: /media/winusb_target_1405019929_19723 doesn't look like an EFI partition.
.
Error occurred!
Syncing...
/usr/bin/winusb: line 78:  5376 Terminated               while true; do
    sleep 0.05; echo 'pulse';
done
Cleaning...
/usr/bin/winusb: line 78:  6975 Terminated               while true; do
    sleep 0.05; echo 'pulse';
done
Umounting and removing '/media/winusb_iso_1405019929_19723'...
Umounting and removing '/media/winusb_target_1405019929_19723'...
Braiam
  • 67,791
  • 32
  • 179
  • 269
user3773212
  • 161
  • 1
  • 1
  • 5
  • It is possible to use mkusb to create a USB boot drive with Windows 7 -10. See this link, https://askubuntu.com/questions/289559/how-can-i-create-a-windows-bootable-usb-stick-using-ubuntu/837380#837380 – sudodus Feb 17 '17 at 08:57

4 Answers4

18

The problem here is with the method used to install GRUB. It has nothing to do with the current filesystem on thumbdrive as WinUSB formats it.

To fix it you must edit the winusb script which is located in /usr/bin. Open it with any text editor with root permissions (e.g. gksu gedit /usr/bin/winusb). Now search for grub-install in that file (it may be on line 401 - 402) and change that line so it looks like this:

grub-install --target=i386-pc --boot-directory="$partitionMountPath/boot" "$device"

Save the script. Install the package grub-pc-bin as follows:

sudo apt-get install grub-pc-bin

Now, try again to use WinUSB.

WinUSB only creates MBR bootable USB drives. If you want to install Windows in EFI mode a different method should be used.

I also wrote about this on my website.

Cornelius
  • 9,483
  • 4
  • 40
  • 62
  • The "better method" worked in getting me a successful installation on the usb drive. – Tyler Nov 23 '14 at 14:55
  • ^ This guy not the hero we need, he's the hero we deserve! Thank you, you solved an very irritating issue. – Mr.Turtle Aug 12 '16 at 08:27
  • 1
    I was using the iso file from a NTFS partition. Above fix didn't worked but moving the files to desktop did the trick. Also I formatted the pendrive with FAT format. – Abhishek Sachan May 11 '17 at 14:13
0

To solve the problem, it's very simple. Just type

sudo winusbgui

in the terminal and you're playing

A.B.
  • 90,397
-1

Format USB to ntfs before using winusb.

Vishnu N K
  • 595
  • 5
  • 22
-1

Copy the iso file to some other location (Destop or home directory). After that format the usb pendrive to FAT32 filesystem using gparted partition Editor.

Remove the pendrive and then re-insert it.

It will automatically get mounted, then run winusb application.

Select the copied iso file and create a bootable windows flash drive.

Caner
  • 11
  • I don't know why this is downvoted, worked perfectly for me, differently from the answers above. I was trying to use an iso file from an external disk, then getting error 512, but moving it to home directory solved. Formatting to FAT32 was not necessary, though. – Hugo Passos Jan 30 '19 at 15:02