Auto-unmounting USB drives in Linux

From Organic Design wiki

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.

Installation

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.