A couple of years or so ago, Ubuntu‘s file manager, Nautilus, gave you the ability to “Safely Remove Drive” when right-clicking an attached USB hard drive (or flash drive), rather than just simply “Unmount” it. The difference between the two is that when you simply unmount a drive, it is still listed as attached (but not mounted) in Nautilus‘s left-pane. For many, seeing the drive completely removed was reassuring, since it could then be unplugged safe in the knowledge there would be no data loss, or physical damage to the device.
However, in the Ubuntu 12.10 upgrade, we lost this option, and now only have “Unmount” and “Eject” (which is exactly the same as “Unmount“, except in the case of CD/DVD drives where it will eject the disc tray).
While “Safely Remove Drive” may yet make a return (it has caused a flood of complaints about this backward move), for now you can do it via the command-line if you really prefer this to simply unmounting.
First, if you’re unsure what the drive’s address is, run the following in the terminal:
mount|grep ^'/dev'
If you only have one internal hard drive, and no other storage devices attached, it should be something like /dev/sdb. To safely unmount and totally remove the drive, enter the following command, replacing /dev/sdb with your own drive’s designation if need be:
udisks --
unmount /dev/sdb1 && udisks --
detach /dev/sdb
You should now see your drive disappear from the file manager’s left-pane.
Note that in the unlikely event you have a partition other than the first partition on the drive mounting, you will need to change the “1” (ie: sdb1) in the command to reflect that.
☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻☻
Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!
Yet another Unity annoyment to add to the very long list methinks. Unmounting (or “dismounting” if you wish to be grammatically correct) disks manually via the terminal is something that one had to do in the old days. To be forced to do it today is quite absurd in my view.
To skirt round the problem, along with the hundreds of other problems caused by this appealing, half-arsed, dumbed-down Unity interface, I’d recommend installing the latest KDE instead.
KDE was not without its issues, of course. Problem is that KDE 4 was released long before it was fit for the purpose – and many KDE fans abandoned it as a result. Even Linus Torvalds dumped it. But five years (and 8 minor versions) down the track, it really is rather good now.
IMHO KDE is probably the smoothest, most feature-packed and the prettiest interface available for any modern personal computing platform. It feels very “grown-up” and sophisticated compared to Unity’s “Fischer-Price” look and feel. A friend of mine describes it as the difference between sipping a Martini or fine malt whisky compared to guzzling a plastic beaker full of Sunny-D!
And many of today’s KDE/QT4-based apps are lovely. For example, comparing Kate (KDE Advanced Text Editor) to Gedit, or comparing KDE’s Okular to Gnome’s clunky document viewer is like comparing a Porsche to a Trabant.
Added to which, you get a grown-up file manager (Dolphin) along with shedloads of small, optional, unsung gems such as KRename, KRuler and the Midnight-Commander-like Krusader.
Okay, enough banging of the proverbial drum. My apologies.
To install KDE on a Unity box, open a terminal emulator window, type the following and hit the return key. There is usually about 700MiB to download, so make yourself a cup of tea or pour a long cold beer while it all downloads and APT sorts all the dependencies for you. It’s well worth the wait, IMHO:-
sudo apt-get install kubuntu-desktop
Best wishes, G.
Actually, this has more to do with Gnome and particularly Nautilus development than Unity (I actually use “Classic” desktop). I manually upgraded Nautilus after the 12.10 upgrade, to see if I got that back, but instead lost recursive search through sub-folders (which had many people scratching their heads as to why it was removed), so downgraded it back to the officially-supported version. Obviously, things like the recursive search will be added back in, and if the outcry regarding “Safely Remove Drive” is big enough, I guess that will be too, at some point (fingers crossed!).
But yeah, KDE has always been nice, and is even flashier now, and I have that and other desktop environments installed along with Gnome Fallback/Classic. Also, Gnome-Shell is pretty damned good, and there are all sorts of cool plugins/extensions and Shell themes available for it now.
As for this issue, I think it is rather stupid that when right-clicking a USB device, there are 2 options that do the same thing, especially since “Eject” for a non-DCD/DVD makes you think it will do the same as “Safely Remove Drive”.
PS: Technically, I think “dismounting” applies more to horses, hehe! I think in computing terms, “unmounting” is correct (and I’m pretty much a stickler when it comes to grammar, hehe).
NB the word “appealing” in paragraph 2 should have read “appalling”. sorry.
Hahaha! You had me worried there, hehe… (though, seriously, more and more are indeed finding Unity appealing, especially as bugs are fixed, ability to customise added, plugins developed, and new features to Dash added).
“First, if you’re unsure what the drive’s address is, run the following in the terminal:
mount|grep ^’/dev’
If you only have one internal hard drive, and no other storage devices attached, it should be something like /dev/sdb. To safely unmount and totally remove the drive, enter the following command, replacing /dev/sdb with your own drive’s designation if need be:
udisks –unmount /dev/sdb1 && udisks –detach /dev/sdb
You should now see your drive disappear from the file manager’s left-pane.
Note that in the unlikely event you have a partition other than the first partition on the drive mounting, you will need to change the “1” (ie: sdb1) in the command to reflect that.”
Yep- sooooo much better than, “right-click, safely remove”…
Wtf?! Why does this sort of thing happen? It’s so stupidly ridiculous when something useful gets scrapped. This sounds like something MS would do (like scrapping the start button, ffs). I thought better of Ubuntu.
Agreed, but remember this is the fault of the Nautilus developer, not the Ubuntu team. They’ve actually held back on including the latest Nautilus, which has even more alarming omissions, like recursive search through sub-folders. There has been a lot of backlash against Nautilus for these, especially the recursive search (which makes Nautilus pretty useless for searching for files). Hopefully all this will be rectified soon.
Okay- I’ll reserve my “grrrr!” for the naughty-Nautilus team! And I didn’t know that about recursive search- omg!
Just when you think things are advancing nicely, someone puts a stick in it.
Good grief!
May I have some help? I’ve posted the device I want to remove.
mark@Lexington-19:~$ mount|grep ^’/dev’
/dev/sda3 on / type ext3 (rw,errors=remount-ro)
/dev/sda1 on /media/System_Reserved type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sda2 on /media/sda2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sda5 on /home type ext3 (rw,user_xattr)
/dev/sdb1 on /LEXAR type vfat (rw,uid=1000,gid=1000,umask=022)
/dev/sdc1 on /media/1-gig-non-win type ext3
(rw,nosuid,nodev,uhelper=udisks)
/dev/sdf1 on /media/4E8C-BD69 type vfat
(rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)
mark@Lexington-19:~$ udisks –unmount /dev/sdf1 && udisks –detach /dev/sdf1
Detach failed: Device is not a drive
WTF?
The second part of the command (or 2nd command, as it is in fact 2 commands stuck together) shouldn’t have a 1 on the end. Have a look again at the original command, and you’ll see the first part has the partition number – as you unmount partitions, not whole drives – while the second part only has the drive, since you don’t detach partitions, but whole drives. In other words, just get rid of that 1 on the very end. That should fix things!
[…] Ubuntu USB Storage: How to Safely Remove Drive When Eject and Unmount Are Only Options […]