0

After having problems with corrupted SD cards, (probably because of a read disturb). I decided to boot from a USB drive. I was able to do that by changing the path in cmdline.txt to sda2. I Didn't want to do it the other way, (program_usb_boot_mode=1 in config.txt), because it was taking 1 minute to boot. As opposed to less than 30 seconds using an SD card for startup.

Everything seems to be working fine, but out of 100 raspberry Pi's I get 1 or 2 that are giving me problems after some time. It's as if someone is unplugging the USB drive (which if you do it it will make the Pi crash). What could cause this, and is there any way for the Pi to recover from it?

  • Have you tried to swap/mix/match all combinations of Pi's, USB cable and USB devices, to isolate the faulty component? – Stéphane Gourichon May 30 '18 at 18:11
0

What kind of USB drive do you use? Could there be a some USB cable issues that causes the USB link between host and drive to be reset? Or you may be tripping on some USB slave controller issues in your drives that only surface after some operation time and under certain environmental conditions (temperature in particular). This may also be caused by issues with the power supply of either the Pi or your drive. Remember that the Pi may shutdown USB under some serious undervoltage conditions to keep itself alive.

  • Hello and thank you for the reply. I am using a 24V switching power supply to drive some other things and then a proper 15£ 15W step down converter. I was suspecting the cable my self, which is the USBPNLAFAM1 from StarTech (or USBPNLAFAM2 depending on the application). I am using 2 of them per application, one for the usb stick and one for a WIFI dongle. There were some occasions where the dongle was not working, with the cable being the culprit. Is there a way to reset the USB link? Other that switching off and on the raspberry ofc. – papatrexas Jun 6 '17 at 9:33
  • The problem is probably that the USB link does reset, that is, the USB host controller detects that the slave (USB drive) is lost, then reconnects. But the upper layers, that is, the file system layer gets killed when you (temporarily) loose your root partition. Maybe putting the root and boot partitions on a directly connected USB thumb drive might help, and then (auto) mounting your USB drive separately may make your system more robust. I'm solely using directly connected USB thumb drives for USB MSD (mass storage device) boot. – TheDiveO Jun 6 '17 at 11:52

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.