Fails with uncaught exception "No such file or directory"

Bug #477529 reported by Nikolaus Rath
54
This bug affects 10 people
Affects Status Importance Assigned to Milestone
usb-creator (Ubuntu)
Fix Released
Undecided
Martin Pool

Bug Description

Binary package hint: usb-creator

After copying the files, the program aborts with the attached error.

ProblemType: Bug
Architecture: i386
Date: Sat Nov 7 10:37:13 2009
DistroRelease: Ubuntu 9.10
Package: usb-creator-gtk 0.2.12
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: usb-creator
Uname: Linux 2.6.31-14-generic i686

----

workaround: If you're experiencing this bug:

1- after clicking "Other" to select the ISO image, double-check that it's selected in the Source list
2- make sure you're actually trying to install a bootable Ubuntu image

Related branches

Revision history for this message
Nikolaus Rath (nikratio) wrote :
Revision history for this message
Nikolaus Rath (nikratio) wrote :
Revision history for this message
awkfan (coprhead) wrote :

I get the same identical error in Kubuntu 9.10. I have the same Architecture, ProcVersionSignature, Uname as the original submitter.
I'm using these packages:
usb-creator-common 0.2.12
usb-creator-kde 0.2.12
The last several lines of my ~/.usbcreator.log file are as follows:

usb-creator 2009-11-07 20:17:06,847 (DEBUG) install.py:459: Writing /media/945B-314F/.disk/base_installable
usb-creator 2009-11-07 20:17:06,848 (DEBUG) install.py:459: Writing /media/945B-314F/.disk/casper-uuid-generic
usb-creator 2009-11-07 20:17:06,848 (DEBUG) install.py:459: Writing /media/945B-314F/.disk/cd_type
usb-creator 2009-11-07 20:17:06,849 (DEBUG) install.py:459: Writing /media/945B-314F/.disk/info
usb-creator 2009-11-07 20:17:06,849 (DEBUG) install.py:217: mangle_syslinux
usb-creator 2009-11-07 20:17:06,874 (DEBUG) install.py:265: create_persistence
usb-creator 2009-11-07 20:17:06,874 (DEBUG) misc.py:127: ['dd', 'if=/dev/zero', 'bs=1M', 'of=/media/945B-314F/
casper-rw', 'count=2751']
usb-creator 2009-11-07 20:30:43,754 (DEBUG) misc.py:127: ['mkfs.ext3', '-F', '/media/945B-314F/casper-rw']
usb-creator 2009-11-07 20:30:43,809 (ERROR) install.py:147: Exception raised:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/usbcreator/install.py", line 143, in run
    self.install()
  File "/usr/lib/python2.6/dist-packages/usbcreator/install.py", line 487, in install
    self.create_persistence()
  File "/usr/lib/python2.6/dist-packages/usbcreator/install.py", line 286, in create_persistence
    popen(mkfs_cmd)
  File "/usr/lib/python2.6/dist-packages/usbcreator/misc.py", line 137, in popen
    startupinfo=startupinfo)
  File "/usr/lib/python2.6/subprocess.py", line 621, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
usb-creator 2009-11-07 20:30:43,823 (CRITICAL) install.py:92: An uncaught exception was raised:
[Errno 2] No such file or directory
usb-creator 2009-11-07 20:30:44,506 (ERROR) frontend.py:190: Installation failed.
None

TIA for looking into this. FWIW, when attempting to use the USB stick, it starts to boot, but hangs shortly after the UNR boot logo appears.

komputes (komputes)
Changed in usb-creator (Ubuntu):
status: New → Confirmed
Revision history for this message
Jouke (digigram) wrote :

same here: ubuntu 9.10, 386 version

tail of log:

usb-creator 2009-12-21 20:54:07,099 (DEBUG) install.py:459: Writing /media/6494-569E/WD SmartWare/what is this resources/images/SW_Icon_About.png
usb-creator 2009-12-21 20:54:07,101 (DEBUG) install.py:217: mangle_syslinux
usb-creator 2009-12-21 20:54:07,101 (ERROR) install.py:147: Exception raised:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/usbcreator/install.py", line 143, in run
    self.install()
  File "/usr/lib/python2.6/dist-packages/usbcreator/install.py", line 486, in install
    self.mangle_syslinux()
  File "/usr/lib/python2.6/dist-packages/usbcreator/install.py", line 221, in mangle_syslinux
    os.path.join(self.target, 'syslinux'))
  File "/usr/lib/python2.6/os.py", line 199, in renames
    rename(old, new)
OSError: [Errno 2] No such file or directory
usb-creator 2009-12-21 20:54:07,125 (CRITICAL) install.py:92: An uncaught exception was raised:
[Errno 2] No such file or directory
usb-creator 2009-12-21 20:54:07,150 (ERROR) frontend.py:616: Installation failed.
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/usbcreator/install.py", line 143, in run
    self.install()
  File "/usr/lib/python2.6/dist-packages/usbcreator/install.py", line 486, in install
    self.mangle_syslinux()
  File "/usr/lib/python2.6/dist-packages/usbcreator/install.py", line 221, in mangle_syslinux
    os.path.join(self.target, 'syslinux'))
  File "/usr/lib/python2.6/os.py", line 199, in renames
    rename(old, new)
OSError: [Errno 2] No such file or directory

Revision history for this message
Jouke (digigram) wrote :

Oeps: above error was with the 32 bit server image, I had no problems with the 32 bit desktop image. I accidentally selected the wrong iso.

Revision history for this message
komputes (komputes) wrote :

I have seen this error before but am not able to reproduce it on demand. I think I may just not be using the image which causes issues. Can anyone give a link to the specific image(s) which caused this problem.

Revision history for this message
awkfan (coprhead) wrote : Re: [Bug 477529] Re: Fails with uncaught exception "No such file or directory"

I had the issue on Xubuntu and Kubuntu (both 9.10), using the Ubuntu Netbook
Remix ISO. The only link I can find is:

http://www.ubuntu.com/getubuntu/download-netbook

I haven't tried any other ISOs.

komputes wrote:
> I have seen this error before but am not able to reproduce it on demand.
> I think I may just not be using the image which causes issues. Can
> anyone give a link to the specific image(s) which caused this problem.
>

Revision history for this message
Robert Crowston (rec53) wrote :

I've been able to reproduce the same problem with a Sandisk cruzer usb drive. The problem didn't occur if I mounted the device but then unmounted the small 'U3 partiton' (/dev/sr0) before trying to run usb-creator.

Revision history for this message
komputes (komputes) wrote :

@Robert Crowston - What disc image (iso) were you using? Does this only happen on U3 keys with the pseudo-CD partition mounted?

@Nikolaus Rath - Was this originally reported while you were using a U3 (special) usb key? Can you provide the steps (including the image and type of usb key used) to reproduce this issue?

Thank you both.

Revision history for this message
Nikolaus Rath (nikratio) wrote :

I was using the 32 bit desktop image, and it might have been a Sandisk Cruzer usb stick. I'll try to reproduce the problem as soon as I find the time.

Revision history for this message
Nikolaus Rath (nikratio) wrote :

I just reproduced the problem with the 9.10 32bit desktop image and a Sandisk U3 Cruzer Micro.

Revision history for this message
Static (anthony-thefort) wrote :

Similar problem, and I believe I've isolated it. I used CD2USB to make the USB drive when the usb-creator failed. The CD2USB had the same problem, but was more verbose.

2010/01/22 19:35:17 ERROR 87 (0x00000057) Copying File J:\pool\main\l\linux\linux-image-2.6.31-14-generic_2.6.31-14.48_i386.deb

The parameter is incorrect.

This is from the ubuntu-9.10-netbook-remix-i386.iso

Revision history for this message
Martin Pool (mbp) wrote :

I also have a SanDisk Cruzer usb stick and am seeing this problem.

mount shows

/dev/sr0 on /media/U3 System type iso9660 (ro,nosuid,nodev,uhelper=devkit,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500)
/dev/sdb1 on /media/DE0B-1969 type vfat (rw,nosuid,nodev,uhelper=devkit,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1)

where sr0 turns up in the kernel logs as

[35727.332670] scsi 3:0:0:0: Direct-Access SanDisk SanDisk Cruzer 8.02 PQ: 0 ANSI: 0 CCS
[35727.333162] scsi 3:0:0:1: CD-ROM SanDisk SanDisk Cruzer 8.02 PQ: 0 ANSI: 0
[35727.333718] sd 3:0:0:0: Attached scsi generic sg1 type 0
[35727.339384] sd 3:0:0:0: [sdb] 7856127 512-byte logical blocks: (4.02 GB/3.74 GiB)
[35727.340625] sd 3:0:0:0: [sdb] Write Protect is off
[35727.340630] sd 3:0:0:0: [sdb] Mode Sense: 45 00 00 08
[35727.340634] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[35727.341134] sr0: scsi3-mmc drive: 48x/48x tray
[35727.341282] sr 3:0:0:1: Attached scsi CD-ROM sr0
[35727.341377] sr 3:0:0:1: Attached scsi generic sg2 type 5
[35727.345084] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[35727.345090] sdb: sdb1
[35727.349512] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[35727.349519] sd 3:0:0:0: [sdb] Attached SCSI removable disk

So it looks like this disk pretends to have both a hard disk and a cdrom (maybe holding the Sandisk Windows software.

mbp@lithe% lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 011: ID 0a5c:2110 Broadcom Corp. Bluetooth Controller
Bus 003 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 0781:5530 SanDisk Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Revision history for this message
Martin Pool (mbp) wrote :

@Static that doesn't really look like the same bug.

I think I know what's happening: the Cruiser stick has this fake cd. After you choose "Other" to pick the iso image, it's inserted into the list of available images, so it's easy to proceed with sr0 still selected instead of the image you actually want. Then when usb-creator tries to make the image, it fails to find the syslinux files that are present in the Ubuntu image but of course not in the Sandisk image. It gives a poor message.

I think you can work around this by just making sure the right image is selected.

To thoroughly fix this:

* if an iso is given on the command line it should actually be used by default
* when Other is pressed, the newly added image should be selected
* if renaming these files fail a sensible message should be shown

Changed in usb-creator (Ubuntu):
assignee: nobody → Martin Pool (mbp)
status: Confirmed → In Progress
Martin Pool (mbp)
description: updated
Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
VipX1 (vipx1) wrote :

I was making a bootable USB of a BartPE .iso of XP-SP3 when I got the error. Ubuntu 9.10

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 477529] Re: Fails with uncaught exception "No such file or directory"

On 15 February 2010 01:35, VipX1 <email address hidden> wrote:
> I was making a bootable USB of a BartPE .iso of XP-SP3 when I got the
> error. Ubuntu 9.10

VipX1, this tool is specific to Ubuntu. You can't make bootable
windows sticks with it.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Martin Pool (mbp) wrote :

evan/pitti, could you upload a new package before Lucid freezes?

Revision history for this message
Martin Pool (mbp) wrote :

Should be fixed in 0.2.18; test reports welcome.

Changed in usb-creator (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
awkfan (coprhead) wrote : Re: [Bug 477529] Re: Fails with uncaught exception "No such file or directory"

Any idea when it will be available through the standard update channel?

sudo apt-get install usb-creator-common=0.2.18
[sudo] password for XYZ:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '0.2.18' for 'usb-creator-common' was not found

Martin Pool wrote:
> Should be fixed in 0.2.18; test reports welcome.
>
> ** Changed in: usb-creator (Ubuntu)
> Status: In Progress => Fix Released
>

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 477529] Re: Fails with uncaught exception "No such file or directory"

At the moment it is in Lucid.
http://packages.ubuntu.com/search?keywords=usb-creator

To fix it in Lucid there are a few options: backport the whole thing,
or take just this change onto a cherrypick for an SRU.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
brooke a bearden (brooke-bearden) wrote :

Really? That's your workaround?

"1- after clicking "Other" to select the ISO image, double-check that it's selected in the Source list"
Make sure I selected the kubuntu .iso I just downloaded for the sixth time from the kubuntu DL link - and not some animated .gif with a blinking K? Check.
"2- make sure you're actually trying to install a bootable Ubuntu image"
See above.

Thanks for the help.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 477529] Re: Fails with uncaught exception "No such file or directory"

Hi Brooke, I don't understand your question, or if you're asking a question.
This particular bug should be fixed in current Ubuntu releases.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.