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

It is known that the Raspberry Pi 3B had problems that the Foundation tried to fix but could still make problems. You can try to use Special bootcode.bin-only boot mode or extend the time for which it waits for the mass storage device to initialize. Look at Raspberry Pi boot modes how to do it and for further information about troubleshooting.

  • Oh my friend, I am so not booting from usb drivers any more. Have a look at this: raspberrypi.stackexchange.com/a/100064/68240 – papatrexas Nov 29 '19 at 11:18
  • 1
    @papatrexas You should accept one answer here or make your own short answer and accept it after two days. Only this will finish your question and it will not pop up again and again. – Ingo Nov 29 '19 at 11:32

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

After Ingo's suggestion, for me this answers my question. In short, I don't suggest booting from usb sticks. https://raspberrypi.stackexchange.com/a/100064/68240

  • It's a pity that you don't accept my answer ... – Ingo Dec 3 '19 at 11:08
  • I can't mate, I really can't "accept" booting from usb stick or anything related to it. I still have nightmares from it. – papatrexas Dec 4 '19 at 12:14

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.