New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Installation failed !" "Exit code: 256" in GUI #30

Open
Lin-Buo-Ren opened this Issue Feb 13, 2016 · 63 comments

Comments

Projects
None yet
@Lin-Buo-Ren
Collaborator

Lin-Buo-Ren commented Feb 13, 2016

Install log(when running winusbgui as normal user)

Installation failed !
Exit code: 256
Log:
**blank**

_001

Install log(when running winusbgui as root)

Installation failed !
Exit code: 256
Log:
Formatting device...
Wait 3 seconds for block device nodes to populate...
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
mkfs.fat 3.0.28 (2015-05-16)
Mounting...
mount: /dev/loop0 is write-protected, mounting read-only
Copying...
Installing grub...
Installing for i386-pc platform.
Installation finished. No error reported.
Installing grub.cfg...
Exiting...
Syncing...
/usr/local/bin/winusb: 行 78: 20260 終止                  while true; do
    sleep 0.05; echo 'pulse';
done
Cleaning...
/usr/local/bin/winusb: 行 78: 20593 終止                  while true; do
    sleep 0.05; echo 'pulse';
done
Unmounting and removing '/media/winusb_iso_1455346491_15903'...
Unmounting and removing '/media/winusb_target_1455346491_15903'...

P.S. "終止" in the output approximately means "terminated".

Reporter's Environment

Operating System

Ubuntu 15.10 AMD64

WinUSB

commit f3bd9ec

Software Installation Prefix

/usr/local

WxWidgets

3.0.2+dfsg-1.2 from Ubuntu 15.10 software source

Locale

LANG=zh_TW.UTF-8
LANGUAGE=zh_TW:zh_HK:zh_CN:en_US:en
LC_CTYPE="zh_TW.UTF-8"
LC_NUMERIC=zh_TW.UTF-8
LC_TIME=zh_TW.UTF-8
LC_COLLATE="zh_TW.UTF-8"
LC_MONETARY=zh_TW.UTF-8
LC_MESSAGES="zh_TW.UTF-8"
LC_PAPER=zh_TW.UTF-8
LC_NAME=zh_TW.UTF-8
LC_ADDRESS=zh_TW.UTF-8
LC_TELEPHONE=zh_TW.UTF-8
LC_MEASUREMENT=zh_TW.UTF-8
LC_IDENTIFICATION=zh_TW.UTF-8
LC_ALL=
@slacka

This comment has been minimized.

Owner

slacka commented May 17, 2016

@Lin-Buo-Ren
Do you have gksudo command installed on your system?

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented May 17, 2016

@slacka

Do you have gksudo command installed on your system?

I'm pretty sure I have it installed

@Justinzobel

This comment has been minimized.

Justinzobel commented Jun 25, 2016

Exit code: 32512
Log:

Also error while installing. I don't have gksudo but I do have pkexec so perhaps it could look for which is installed when compiling and use that?

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Jul 8, 2016

@Justinzobel That can be done in runtime.

BTW the 'winusb' package does depend on 'gksu' package, which provides 'gksu' and 'gksudo' commands

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Jul 8, 2016

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Jul 9, 2016

I can't reproduce the issue in the latest build, may re-open it when I notice it agian

@Lin-Buo-Ren Lin-Buo-Ren closed this Jul 9, 2016

@muzena

This comment has been minimized.

muzena commented Jul 20, 2016

@Lin-Buo-Ren
I have same problem in In Mint 18 and Ubunt Xenial

@slug45

This comment has been minimized.

slug45 commented Sep 12, 2016

I think you need the destination partition/drive to be unmounted to make it work.

@johnnirmal007

This comment has been minimized.

johnnirmal007 commented Oct 2, 2016

I got same problem but solved now by
"sudo apt-get install gksu"
"gksudo winusbgui"
(i.e..type it without quotes)

@Lin-Buo-Ren Lin-Buo-Ren changed the title from "Installation failed !" in GUI but not in CLI to "Installation failed !" in GUI but not in CLI (/usr/bin/winusb: line 78: 18265 Terminated ) Nov 8, 2016

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Nov 8, 2016

Reopen issue as there's new incoming report.

_060

@Lin-Buo-Ren Lin-Buo-Ren reopened this Nov 8, 2016

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Nov 8, 2016

Hi again, please use the latest revision in GitHub repo and see if it's still reproducible(it should be, as we never fixed the problem anyway).

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Nov 8, 2016

The problem seems to be on the pulse function, however I have no idea why it's failing...

pulseCurrentPid=0
function pulse()
{
    if [ "$forGui" -eq 1 ]; then
        if [ ! "$pulseCurrentPid" -eq 0 ]; then
            kill "$pulseCurrentPid"
            #wait "$pulseCurrentPid"
            pulseCurrentPid=0
        fi

        if [ "$1" = 'on' ]; then
            cd /; while true; do sleep 0.05; echo 'pulse'; done &
            pulseCurrentPid="$!"
        elif [ "$1" != 'off' ]; then
            echo "Pulse: bad argument" >&2
            exit 1
        fi
    fi
}
@OrDuan

This comment has been minimized.

OrDuan commented Nov 17, 2016

I was encountered this issue right now, with windows 10.
I'm on ubuntu 16.04 and WinUSB 1.0.11

I tried to run the installation anyway and it worked(I just ignored the error).

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Nov 17, 2016

@OrDuan Hi, please use the latest revision in the repository (instead of latest released version) for reproducing the issue.

We've have changed a quite amount of code since 1.0.11

@temyrrian

This comment has been minimized.

temyrrian commented Nov 21, 2016

I got similar problem and solve it!
I dont now why, but if you use GUI its not work. Use command line in way:
sudo winusb --format /path-to-ISO-file/filename.iso /dev/sdb (or other way to your flash)

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Nov 22, 2016

@temyrrian The issue title already tell that CLI(command line interface) works.
This issue is about the GUI problem

@lin90577

This comment has been minimized.

lin90577 commented Jan 19, 2017

The GUI fix is to blank the USB, DO NOT FORMAT drive this is for the Error 256 issue.

@a-n-d-r-e-i

This comment has been minimized.

a-n-d-r-e-i commented Jan 26, 2017

I was able to reproduce this error using the GUI version and in my case simply ignore the error haven't solved the problem.

Log as root

Installation failed !
Exit code: 256
Log:
Formatting device...
Wait 3 seconds for block device nodes to populate...
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
mkfs.fat 3.0.28 (2015-05-16)
Mounting...
Copying...
Installing grub...
Installing for i386-pc platform.
Installation finished. No error reported.
Installing grub.cfg...
Exiting...
Syncing...
/usr/bin/winusb: line 78: 32619 Terminated              while true; do
    sleep 0.05; echo 'pulse';
done
Cleaning...
/usr/bin/winusb: line 78:  3517 Terminated              while true; do
    sleep 0.05; echo 'pulse';
done
Unmounting and removing '/media/winusb_iso_1485449591_28119'...
Unmounting and removing '/media/winusb_target_1485449591_28119'...

Environment

I do have gksu package installed.

Operating System

Ubuntu 16.04 AMD64

Locale

LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE=pt_BR.UTF-8
LC_NUMERIC=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=pt_BR.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=pt_BR.UTF-8
LC_NAME=pt_BR.UTF-8
LC_ADDRESS=pt_BR.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_MEASUREMENT=pt_BR.UTF-8
LC_IDENTIFICATION=pt_BR.UTF-8
LC_ALL=

WinUSB

commit 28ff500

CLI

I'm also getting an error when I try using the CLI:

sudo winusb -v --format ~/Downloads/win10.iso /dev/sdb1
Formatting device...
Error: Partition(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 
on /dev/sdb1 have been written, but we have been unable to 
inform the kernel of the change, probably because it/they are in use.  
As a result, the old partition(s) will remain in use.  
You should reboot now before making further changes.
@fedix23

This comment has been minimized.

fedix23 commented Feb 28, 2017

I think i have a solution
I used gparted to unmount the usb then format it to ntfs and it's work

@LuccaPrado

This comment has been minimized.

LuccaPrado commented Apr 18, 2017

@fedix23 This worked for me too, but, now the question is where the error come from?

@dvnrsn

This comment has been minimized.

dvnrsn commented Apr 28, 2017

Kubuntu 16, similar response to @a-n-d-r-e-i

@murilopan

This comment has been minimized.

murilopan commented Apr 28, 2017

I went through all the suggestions above, none worked... the only thing that worked for me was:
*Format the Flash the USB Stick

Now if you excuse me, gonna install the crap Windows onto somebody else's machine, hope my hands don't get infected... LOL

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Jun 12, 2017

No longer reproduced and the /usr/bin/winusb: line 78: 18265 Terminated message probably comes from the pulse function in src/woeusb, closing...

Lin-Buo-Ren added a commit that referenced this issue Jun 12, 2017

src/winusb: Silent the confusing "/usr/bin/woeusb: line XXX: XXXXX Te…
…rminated" message

Related-GitHub-issue: #30
Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Jun 14, 2017

According to WebUpd8 the issue still can be reproduced, reopened.

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Oct 11, 2017

/usr/local/bin/woeusb: line 360: local: -n: invalid option
local: usage: local [option] name[=value] ...

This is due to the GNU Bash version you using doesn't support nameref parameter attributes, which version of GNU Bash you're using?

Anyway this should be filed as a separate issue as the symptom isn't exactly the same.

@HarshSharma12

This comment has been minimized.

HarshSharma12 commented Oct 11, 2017

@depadiernos

This comment has been minimized.

depadiernos commented Oct 26, 2017

So I encountered this issue as well. However, as @slug45 mentioned, unmounting the volume with umount /dev/sdb1 fixed my issue. Perhaps a check to see if it's mounted and unmounting it if it is would be the solution?

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Oct 26, 2017

The core script src/woeusb already checks the mount status of all partitions in target device at https://github.com/slacka/WoeUSB/blob/master/src/woeusb#L519 , is this issue still can be reproduced on the latest release of WoeUSB?

@kode54

This comment has been minimized.

kode54 commented Nov 6, 2017

It seems to emit that error here if the target media is formatted FAT when preparing Windows 10 boot media. Maybe some cases should prepare NTFS instead?

E: It's failing trying to install i386 Grub on the boot media, since my installed Grub doesn't support i386, I think. I don't need Grub anyway, since it's Windows install media.

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Nov 6, 2017

@kode54

It seems to emit that error here if the target media is formatted FAT when preparing
Windows 10 boot media. Maybe some cases should prepare NTFS instead?

Only boot media contains an install image over 4GiB should use NTFS, this doesn't include any of the Microsoft-released official Windows install images.

E: It's failing trying to install i386 Grub on the boot media, since my installed Grub doesn't
support i386, I think. I don't need Grub anyway, since it's Windows install media.

i386-pc variant GRUB data is required if you need to boot it in legacy PC mode because we can only chainload Windows BOOTMGR under this case.

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Nov 6, 2017

The suspicious "terminated" line is found to be the job control message issued by the interpreter itself, and is not related to this issue. This message is eliminated since commit 75e875e.

@arigit

This comment has been minimized.

arigit commented Nov 7, 2017

Run into this error - after trying workarounds like removing the partition in the USB, FAT, NTFS format etc, I ended up using command line (--device) and sudo and it worked. The problem might be related to the GUI under Wayland

@shubhamkumar13

This comment has been minimized.

shubhamkumar13 commented Jan 8, 2018

I was able to create a bootable image after formating the usb drive with NTFS file system.
Didn't need to unmount it.

@adonespitogo

This comment has been minimized.

adonespitogo commented Jan 16, 2018

I have a usb flash drive formatted ext4. I had to unmount it first for it to work.

@eutektoid

This comment has been minimized.

eutektoid commented Feb 14, 2018

I wanted to create a bootable Win10-Stick too. At first I used dd (which does not work). Then I came across a tutorial about woeusb.
So I typed into the Terminal:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install woeusb

When I started the program via GUI, I received the error 256 as well during the process (close to the end). The stick was already bootable, but before the installation of Win10 would start it was asking about a driver for a media device.
So like some of you I tried to unmount, format to NTFS before, etc.
After that I tried to use the CLI too.
I typed:

woeusb --help

and read through the options.
I found the interesting line:

--target-filesystem, --tgt-fs <filesystem name>
Specify the filesystem to use as the target partition's filesystem.
Currently supported: FAT(default)/NTFS

So in the end I tried the following command:

sudo woeusb --device image.iso /dev/sdb --tgt-fs NTFS --verbose

This took a very long time compared to the process via GUI, but in the end it read:

Done :)
The target device should be bootable now

Hooray!
Btw: Installing the GRUB bootloader took ages... (at least with my machine). So don't worry - it'll run through!

@houcheng

This comment has been minimized.

houcheng commented Mar 5, 2018

I format the usb stick and un-mount it. Then the installation succeed.

@watercolorhearts

This comment has been minimized.

watercolorhearts commented May 16, 2018

Installation failed!
Exit code: 256
Log:
WoeUSB v@@WOEUSB_VERSION@@

Error: Target device is currently busy, unmount all mounted partitions in target device then try again
Target device is busy, please make sure you unmount all filesystems on target device or shutdown the computer before detaching it.

I am still getting this error on latest of KDE Neon. How do I unmount a drive?

@MatthewMazaika

This comment has been minimized.

MatthewMazaika commented Jul 4, 2018

after getting this issue incessantly from the UI, i formatted as NTFS, deleted the new partition, and then ran from commandline and it worked (i'm sure it actually would have worked from the UI as well but i already had the command written up so I just re-ran it)

@undersound

This comment has been minimized.

undersound commented Jul 11, 2018

  1. First I had to umount /media/wherever/your/usb/got/mounted
  2. Then sudo woeusb --device /home/me/Desktop/Win10.iso /dev/sdd
@watercolorhearts

This comment has been minimized.

watercolorhearts commented Jul 12, 2018

@undersound

This comment has been minimized.

undersound commented Jul 12, 2018

@getSome6

This comment has been minimized.

getSome6 commented Jul 20, 2018

I had the same problem. I formatted the disk, and it still was giving me the same error. Installation failed!

**Exit code: 256
Log:
WoeUSB v@@WOEUSB_VERSION@@

Error: Target device is currently busy, unmount all mounted partitions in target device then try again
Target device is busy, please make sure you unmount all file systems on target device or shutdown the computer before detaching it.**

No matter how I tried to eject it would give me the same message. My guess, is because the flash drive i was using was made to be compatible with Windows Vista through 10. However I am using Ubuntu 15 Therefore when I would try to eject, because of the OS difference, it wouldn't do so completely.

I tried what some of you said you worked, which was download gparted, and unmounted the flash drive using that and after uploading the OS onto the drive worked for me. Prior to that I tried using the cmds listed, and that didn't work either.

Make sure your drive is compatible with your OS. Otherwise use gparted to unmount then try again

@codedumps

This comment has been minimized.

codedumps commented Aug 29, 2018

Пидорас ты криворукий. И программа твоя блядская мне душу всю выебла.

@yooneskh

This comment has been minimized.

yooneskh commented Sep 1, 2018

i had the same problem in the gui. only thing that worked for me was to delete the partition of the flash disk.

@getSome6

This comment has been minimized.

getSome6 commented Sep 2, 2018

@esipavicius

This comment has been minimized.

esipavicius commented Sep 15, 2018

Some error fixed form me then I go to original project github page(https://github.com/slacka/WoeUSB) and installed WoeUSB step by step. And its worked! :)

@peiyanyan

This comment has been minimized.

peiyanyan commented Oct 16, 2018

Installation failed!
Exit code: 256
Log:
WoeUSB v@@WOEUSB_VERSION@@

Mounting source filesystem...
Wiping all existing partition table and filesystem signatures in /dev/sdc...
/dev/sdc: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sdc: calling ioctl to re-read partition table: Success
Ensure that /dev/sdc is really wiped...
Creating new partition table on /dev/sdc...
Creating target partition...
Making system realize that partition table has changed...
Wait 3 seconds for block device nodes to populate...
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
mkfs.fat 4.1 (2017-01-24)
Mounting target filesystem...
Applying workaround to prevent 64-bit systems with big primary memory from being unresponsive during copying files.
Copying files from source media...
cp: cannot create regular file '/media/woeusb_target_1539701806_4163/./pesetup/'$'\260\262''װpe.cmd': Invalid argument
The command "cp "${source_file}" "${dest_file}"" failed with exit status "1", program is prematurely aborted
/usr/bin/woeusb: line 1747: local: only_for_gui: readonly variable
The command "cp "${source_file}" "${dest_file}"" failed with exit status "1", program is prematurely aborted

Meet the error;
first i used formed ,it does not work,
second i use gparted ,it does not work too!
but i used successfully installed by winxp;it unmount !
maybe error because umount!

@peiyanyan

This comment has been minimized.

peiyanyan commented Oct 16, 2018

ok i tried fat32 ,fail! maybe i need check my iso ducument!

@Flashwalker

This comment has been minimized.

Flashwalker commented Oct 23, 2018

3.2.10 Fails on Ubuntu 14.04

$ gksu /usr/bin/woeusbgui

Installation failed!
Exit code: 256
Log:
WoeUSB v@@WOEUSB_VERSION@@
==============================
Mounting source filesystem...
Wiping all existing partition table and filesystem signatures in /dev/sdc...
wipefs: WARNING: /dev/sdc: appears to contain 'dos' partition table
Ensure that /dev/sdc is really wiped...
Error: check_if_the_drive_is_really_wiped: Partition is still detected after wiping all signatures, this indicates that the drive might be locked into readonly mode due to end of lifespan.
The command "return 1" failed with exit status "1", program is prematurely aborted
Unmounting and removing "/media/woeusb_source_1540260138_20188"...
You may now safely detach the target device

... the drive might be locked into readonly mode due to end of lifespan...

And it's not.

@Flashwalker

This comment has been minimized.

Flashwalker commented Oct 23, 2018

Works after:
sudo fdisk /dev/sdc, then d, then w.

@Lin-Buo-Ren

This comment has been minimized.

Collaborator

Lin-Buo-Ren commented Oct 25, 2018

@Flashwalker Please file a separate issue, this issue is specifically for the GUI subprocess return status handling.

@edmundlaugasson

This comment has been minimized.

edmundlaugasson commented Nov 16, 2018

Using woeusb 3.2.10-1~webupd8~bionic0 and 64-bit Linux Mint 19 and same issue with GUI. Tried to write Win10_1809Oct_English_x64.iso As a workaround used
sudo woeusb --device image.iso /dev/sdb --tgt-fs NTFS --verbose
... but problem with GUI still persist...
Would propose to allow choose target filesystem (FAT, NTFS) also through GUI, not only CLI. Also allow create UEFI partition and whatever needed through GUI to succeed writing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment