Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bootcode.bin USB storage discovery

159 views
Skip to first unread message

bob prohaska

unread,
Nov 17, 2021, 11:06:50 AM11/17/21
to
I'm having difficulties getting a Pi3b+ to reliably detect
a USB hard drive on boot. Getting into the shell on u-boot
it's possible to repeatedly probe using
usb reset
and eventually the drive shows up. At that point
run bootcmd_usb0
seems to work, but I so far havent found the "magic words"
to make the disk show up on the first try. Using the special
version of bootcode.bin offred at
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#special-bootcode-bin-only-boot-mode

doesn't seem to help, leaving the machine in an unrecoverable network boot
loop that can only be stopped by cycling power, even with the serial
connection turned on.

The randomness of detection makes it seem like some sort of timing problem.
Once the drive is detected it works just fine, so I don't think there's
anything intrinsically wrong with it. There is a timeout file on the
microSD and a config.txt file containing the line
program_usb_boot_timeout=1
along with a second timeout file on the target hard disk (not sure
if that's even involved).

If anybody has suggestions they'd be much appreciated.

Thanks for reading,

bob prohaska

c...@nospam.com

unread,
Nov 17, 2021, 12:19:48 PM11/17/21
to
bob prohaska <b...@www.zefox.net> wrote:
> I'm having difficulties getting a Pi3b+ to reliably detect
> a USB hard drive on boot. Getting into the shell on u-boot
> it's possible to repeatedly probe using
> usb reset

Power the hard drive from its own supply and give it time to
warm up before starting the pi.
The pi's ability to supply power to a usb hd is marginal at best.

--
http://www.netunix.com/

Lew Pitcher

unread,
Nov 17, 2021, 12:52:11 PM11/17/21
to
Further: use a powered USB hub between the Pi and the USB HD
The hub will supply the power for the HD, taking the load off the Pi,
and you can use the hub to supply power to the Pi.



--
Lew Pitcher
"In Skills, We Trust"

bob prohaska

unread,
Nov 17, 2021, 8:39:50 PM11/17/21
to
Understood and done from the beginning. The Pi is not powering the
disk, but it does appear to be starting and stopping the disk; the
power/activity light flashes when the Pi resets.

The only boot timing parameters I know of are the timeout file on
the DOS partition of the microSD card and usb_pgood_delay set as
an environment variable understood to be milliseconds in u-boot.
I've played with usb_pgood_delay from 1 to 40000 milliseconds and
it seems to make no consistent difference. I just tried renaming
the timeout file on the microSD and that didn't cause an obvious
change of behavior, with the disk discovered on the second usb reset.

Repeating the usb reset command several times eventually resulted
in failure, by which time the disk drive light was off, as if the
drive had gone to sleep.

I wonder if there might be some parameters on the disk which could
be set, such as never sleep. I do however have two other examples
of the same drive/enclosure combo, both on Pi4B machines, and
neither displays such narcolepsy.

Thanks for writing,

bob prohaska

0 new messages