Error Removing USB Stick


8 posts
by moallen » Thu Jan 03, 2013 9:48 pm
Apparently when I insert a usb stick, it gets automatically mounted when using the LXDE gui, as everything on it shows up in File Manager (PCManFM 0.9.10). But when I click 'eject removable media' to remove it using File Manager, I get an error saying 'error starting job: failed to execute child process "eject" (no such file or directory). This is without having written anything to the stick. BTW, I'm using Raspian Wheezy 2012-12-16. Should I be doing something else to unmount and remove a stick on my RPi?
http://allenmlab.blogspot.com/
User avatar
Posts: 36
Joined: Fri Dec 28, 2012 6:37 pm
by chris57100 » Fri Jan 04, 2013 7:20 am
Manually, you can use the umount command
Code: Select all
umount <path>

or
Code: Select all
umount /dev/<id of the stick>
Raspberry Pi Home Server : http://www.pihomeserver.fr
Software and electronic tutorials : Samba, Airplay, CUPS, Time machine, Nginx, Owncloud, rTorrent, Wordpress, etc.
Tablet application dedicated to the Raspberry Pi: http://mypi.pihomeserver.fr
Posts: 466
Joined: Wed Sep 12, 2012 7:23 pm
Location: Thionville
by moallen » Fri Jan 04, 2013 3:04 pm
Thanks - this works for me
umount /media/CRUZER
http://allenmlab.blogspot.com/
User avatar
Posts: 36
Joined: Fri Dec 28, 2012 6:37 pm
by Shawn333 » Sat Jan 12, 2013 3:25 pm
Hi
I have found this problem as well, after stumbling across the much simpler GUI means of mounting and unmounting flash drives.
It appears that the error message is a glitch, as I have found that if I mount the drive using the GUI method and then try changing directory to that drive in command mode (and running ls -1) I get a list of files on the drive. If I then unmount and try the same I get a message that no such directory exists.
Note that when changing directory in command mode i used cd /media/E813-2764, as this is what the flash drives seemed to be labelled as in file manager.

When using the GUI method, I use file manager to display the drive contents and then go up a level such that the whole drive is a folder. At this point I select this folder and then right click on the 'places' icon for the drive on the left where it is usually identified as the size of the drive in MB's and 'Filesystem'. Right clicking on this produces a couple of drop down options, one to Mount Volume (greyed out) and one to Eject. Clicking on the eject option still produces the error message but the folder on right then disappears, and the eject icon in the 'places' column similarly goes. Right-clicking on the places icon for the volume you then get the option to mount the drive. try this and the folder reappears.
Posts: 17
Joined: Tue Jan 01, 2013 2:03 pm
by Shawn333 » Tue Jan 29, 2013 9:11 am
Subsequent to my post above, I have found that flash media does not always come up as E813-2764 in the file manager (I just happened to have 2-3 memory sticks that consecutively did this). As such have backed off the Exec line one step to just /media/

If anyone knows how to show the contents of a sub-folder using a wildcard, that would be great as I could then reinstate the Exec command to open the flash drives contents as before. Have tried using ls /media/* at the command line level which does this, but it does not work within a symbolic link (aka 'shortcut' to windows folk).
Posts: 17
Joined: Tue Jan 01, 2013 2:03 pm
by sdjf » Tue Jan 29, 2013 4:46 pm
It would help if you posted details about the symlink not working, for help with figuring out why it does not work, because if you do it correctly, it should work just fine.

You might want to create other folders that sticks can mount on, as in:

mkdir /media/memorystick
mkdir /media/CRUZER

And then mount your stick from commandline to one of the above.

mount /dev/sda1 /media/memorystick

It might prompt for filetype, if you left it the way it came from factory, following should work

mount /dev/sda1 -t vfat /media/CRUZER
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1297
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by ghans » Tue Jan 29, 2013 7:06 pm
Does the problem persist after issuing :

Code: Select all
apt-get install eject

?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4592
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by Shawn333 » Wed Feb 06, 2013 1:30 pm
Yes the 'apt-get install eject' solution worked a treat.

Thanks :D
Posts: 17
Joined: Tue Jan 01, 2013 2:03 pm