I have a Linux Ubuntu 14.04 generic installed on an external SATA hard disk connected via USB 2.0 or 3.0 (depending on which PC it is connected to).
Sometimes, when I accidentally touch the cable, the USB connection between the disk and the PC apparently is affected by this, I get a lot of error messages and the whole operating system crashes.
Sometimes I even forget that I should not detach the cable and I detach it on purpose, then the same happens.
But in both cases, the problem is still the same.
Is there a way to configure the OS such that it 'freezes' waiting for the USB connection to be available again, so that when it is back the system continues the execution normally?
Especially in the last months, probably the plug on the external HD is becoming old and sometimes even just touching the cable the whole system crashes, and I risk to lose important data or even to damage the HD.
This does not happen if I mount the HD in another Linux in order to use it just to access some data files, probably because in that case the OS correctly waits for the USB connection to be stable again. Is there a way to achieve this even if the operating system is running on that very HD?
Thanks to everyone Andrea
I had similar problem, that usb cable was to close to where I used my mouse. Fixed it by using a usb hub and moving cable out of the way. Can also try to use a new cable or changing the usb port to another one.