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

  • 1
    There isn't a configuration option, that I'm aware of, that would make your laptop pause when the connection to the drive is lost. The configuration would have to reside in your OS, and might not get loaded in time in the event of a sudden disconnect. Is there any reason you couldn't use internal drives to host your OS? Would a drive that is removable, but not as high profile (like a memory card) suffice? – Caturday Saint Dec 7 '16 at 21:55
  • Many thanks for your support, I guess this can only be prevented if there is a hardware or BIOS support for it (or software support if the machine is virtual). The reason why I need it on an external disk is that I boot it on a lot of different machines: my laptop, my netbook, my office PC, my friends' or relatives' PCs, etc. etc. etc. And it is nice, especially at office, to run your own OS with all your programs, configurations and data, and even root privileges that you would not have if you run the OS in the office machine internal HD... – Kubuntuer82 Dec 8 '16 at 12:18

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.

| improve this answer | |
  • Thanks for this suggestion, I have already considered these solutions, but since it would just be a workaround I was wondering whether an actual solution to the problem existed. But thanks again :-) – Kubuntuer82 Dec 8 '16 at 12:04
  • I had a similar experience with the audio socket on my laptop caused by repeatedly plugging the headphones in and out. I fixed it by plugging in a single to double port adapter into the audio socket permanently. An audio socket adapter is cheap and replaceable unlike the laptop's audio socket itself. A more expensive but aesthetically pleasing solution would be to connect the headphones to the laptop through an external amplifier/DAC. – karel Feb 25 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.