webtest
Posts: 16
Joined: Sun Mar 29, 2015 3:16 pm
Location: Carlisle PA, USA

How To: Eject/Safely Remove USB drive???

Sun Mar 29, 2015 8:51 pm

Esteemed Forum Participants and Lurkers:
==========================
RPi2 Raspbian Newbie Alert!

I am using several USB flash drives for my Pi projects. I haven't figured out how to "eject"/"Safely Remove" a drive when I want to change from one drive to another. Every other system I have used has some simple way to 'deactivate' the drive so it can be safely removed.

Thank you for any and all comments, suggestions, and assistance with this question.
Blessings in abundance, all the best, & ENJOY!
Art in Carlisle PA, USA

User avatar
xoopha
Posts: 106
Joined: Mon Feb 09, 2015 9:52 pm

Re: How To: Eject/Safely Remove USB drive???

Sun Mar 29, 2015 8:55 pm

You just unmount the volume and that's it.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: How To: Eject/Safely Remove USB drive???

Sun Mar 29, 2015 10:26 pm

If you're doing it from the Desktop and want it a little more automated and similar to what you're used to you could put a shell script on your Desktop named "Eject USB". Then you could just click on that to unmount the drive.

User avatar
DougieLawson
Posts: 37099
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: How To: Eject/Safely Remove USB drive???

Sun Mar 29, 2015 10:33 pm

There is an eject command
sudo apt-get install eject
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

cpc464
Posts: 218
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: How To: Eject/Safely Remove USB drive???

Mon Mar 30, 2015 1:54 pm

In a shell, just do a "df" at the command prompt. If the device is not mounted, you can pull it out safely.

If the device is mounted, unmount it with

sudo umount /dev/sdb1 (or whatever)

or use Dougie's eject command above.

If it refuses to unmount and says it is in use, check other programs or shells you have open and confirm none of them is using data on the device. Check your shells do not have their current working directory set to a directory on the device. If they have, kill them or cd out of the device. Then repeat the unmount or eject command. After is successfully unmounts, pull it out.
Unix engineer since 1989

thradtke
Posts: 492
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL

Re: How To: Eject/Safely Remove USB drive???

Tue Mar 31, 2015 9:14 pm

There used to be an eject-button in the file manager. Now it's not even an option in the devices view's context menu anymore. Why? It would be really nice to do it on the GUI level.
Rocket Scientist.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: How To: Eject/Safely Remove USB drive???

Tue Mar 31, 2015 10:00 pm

thradtke wrote:There used to be an eject-button in the file manager. Now it's not even an option in the devices view's context menu anymore. Why? It would be really nice to do it on the GUI level.
That's why I put a shortcut (script) on the desktop to unmount it. Since I always mount a USB to the same location, I just double click on the script, then unplug it, and plug in another. If you're using the Desktop it's a lot easier than opening a terminal just to unmount a USB drive.

thradtke
Posts: 492
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL

Re: How To: Eject/Safely Remove USB drive???

Wed Apr 01, 2015 10:04 am

Thanks, Jimmy! If I must, I will do this. I was under the impression that previous versions of Raspbian offered an icon to eject such drives, but I might be mistaken.

If there's a wishlist for xmas, I'll place my wish there.

Edit: sudo pcmanfm does what I want. Now I need to find out how to place that on the lxpanel in a system conforming way.
Rocket Scientist.

c15jon
Posts: 3
Joined: Tue Feb 23, 2016 6:07 pm

Re: How To: Eject/Safely Remove USB drive???

Thu May 05, 2016 8:04 am

There's an eject button in the extreme top right-hand corner of the X desktop.

pine
Posts: 16
Joined: Sun Jun 24, 2012 8:32 pm

Re: How To: Eject/Safely Remove USB drive???

Sun Jul 17, 2016 2:38 pm

Thanks, c15jon!

Please moderators: There should be some way of highlighting this simple, accurate and very useful answer!

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: How To: Eject/Safely Remove USB drive???

Sun Jul 17, 2016 3:14 pm

c15jon wrote:There's an eject button in the extreme top right-hand corner of the X desktop.
You've posted to an old thread. There is an eject button now, there wasn't when this thread was started a year ago and you had to DIY.

akash257
Posts: 1
Joined: Sat Oct 14, 2017 8:44 am

Re: How To: Eject/Safely Remove USB drive???

Sat Oct 14, 2017 8:47 am

JimmyN wrote:
Sun Jul 17, 2016 3:14 pm
c15jon wrote:There's an eject button in the extreme top right-hand corner of the X desktop.
You've posted to an old thread. There is an eject button now, there wasn't when this thread was started a year ago and you had to DIY.
Hey full... Just comment if you know the comment. dont tell us GUI

buchrob
Posts: 2
Joined: Wed Oct 16, 2019 2:27 am

Re: How To: Eject/Safely Remove USB drive???

Mon Nov 25, 2019 5:48 am

File Manager > Select the volume in the top left pane (Home Folder, Filesystem Root, volumexxx) and right click. Choose unmount volume.

rick_pi
Posts: 1
Joined: Sat Dec 07, 2019 3:41 am

Re: How To: Eject/Safely Remove USB drive???

Sat Dec 07, 2019 4:01 am

Hi!
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Just click the up arrow in the top or bottom (depends on the setting) screen. Then select and click on your device. Now you can unplug your device.

Return to “Beginners”