Auto-unmounting USB drives in Linux

From Organic Design wiki
Revision as of 02:42, 18 July 2011 by Nad (talk | contribs) (hardware not help)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

One advantage that Windows has over Ubuntu is that USB devices such as memory sticks or external hard drives can be removed from the Windows machine by simply unplugging the USB device, without going through the "unmount" procedure first. Windows is not affected by this behaviour, however from the perspective of a Linux-like system, things can get into a real mess if external drives are removed from Windows machines without being properly ejected or unmounted first. Often this will lead to the drive not being able to be mounted in Ubuntu, requiring the user to connect the device to a Windows machine again and then unmounting it properly from there. This is a very important problem to fix, especially when the Linux system is to be used by non-technical people, for instance in classrooms or internet cafes.

DynUsb is a simple utility (only 13K of source code) which makes it safe to spontaneously pull devices out without any problem.

It seems to work really well, but if you've recently written to the drive, its still best to unmount in case not all cached data has been written.


Download the latest version from here. If you have a 32bit i386 architecture and are running a Debian based system such as Ubuntu or Mepis then you can install from the .deb, otherwise you'll need to download the source, unpack it and run make install in it's directory. It is extremely minimal and builds and starts almost instantly.