I have a Western Digital 1TB external USB hard drive.  Under Debian, it worked some of the time, but would power itself off in the middle of major copy jobs.  The drive would unmount very ungracefully and my copy would end with “input/output error” for every file after the first few.

The drive works fine with my Ubuntu Hardy laptop, so I started digging to figure out why it wasn’t working in Debian.

After lots of research, I figured out the problem.  Some versions of the Linux kernel have a USB 2.0 module which doesn’t work.  I tried loading other kernels, but couldn’t come up with one that solves the problem for that drive.

To fix the problem, I had to just remove that module (as root):

#modprobe -r ehci_hcd

For a more permanent solution, you must rename the module so it doesn’t get reloaded on reboot.  There’s probably a more elegant way to do this, but here is what I did in my new Ubuntu Intrepid setup:

#cd /lib/modules/2.6.27-11-generic/kernel/drivers/usb/host/

#mv ehci-hcd.ko kk_ehci-hcd.ko

Without this module, the drive works fine, though very slowly.  I’ve moved all my video clips to the internal hard drive for editing.

Details here: Bug #88746 in linux-source-2.6.20 (Ubuntu): “ehci_hcd module causes I/O errors in USB 2.0 devices”