-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootloader can't boot via USB-HDD after system reboot #151
Comments
The bug report doesn't provide any of the information in the template so ignoring for now |
My fault, sorry. This information is what you needed? |
It doesn't say which hard drive you are using. A few other people are successfully using JPMicron SATA adapters. It might be worth trying a powered hub as well. |
I'm using Seagate ST9320325AS connected via sata to usb3 adapter(there's 2 cables, one for data and second for additional power supply) |
XHCI_DEBUG is documented here, The UART or NETCONSOLE trace would determine whether the USB port shows the connected state or not after a reboot. Ideally, it would be set to 0xff for full traces, which is very verbose so a one off trace log. Before, that, if you could try the following bootloader which forces a reset of port power at reboot that would be useful. It's just a guess so really I just want to know if there is any observable change in behaviour. |
I've tried this bootloader and it works fine. Thanks! Now Pi successfully boots after rebooting. |
The external power supply is not under the control of the USB host controller (it's invisible) and I don't think external power supplies know about the USB state. |
I am assuming that the "two cables" statement means one with the data pairs, and one with extra power wires. If both the cables are plugged into the Pi, then the device gets power cycled across a reboot. It could be getting upset because the power cycle isn't long enough - is there a configurable wait parameter for pausing prior to attempting MSD boot? |
In the attached patch it's a non-configurable 100ms in the off state. The default bootloader does not toggle port power. What's not clear is why a device works from a cold reboot but needs the port power to be toggled after a soft reset. |
Does the assertion of PCIe fundamental reset (as would happen over a reboot) not disable port power on the VL805? |
No, PCIe fundamental reset does NOT appear to disable port power. The reboot case is more confusing now because if there is no SD-card or the board has the SD PWR switch (8GB) then the PMIC won't be reset which I think does reset the port power. PCIE_0_RGR1_SW_INIT_1 |= PCIE_0_RGR1_SW_INIT_1_PCIE_BRIDGE_SW_INIT_SET; |
I just made a comment that I thought may be relevant to this issue, but it was just deleted... I was encountering the same issue and had some extra screenshots/recordings to help with those who may also encounter the issue. Should I repost that information, or did I do something wrong? |
@geerlingguy The comment adds a slightly annoying animation indicating a power issue but gave no information about the hardware being used. Create a new bug report and fill out the required information. |
That sounds fine; I was just trying to assist others who may encounter the same issue as in the OP and that I was having—basically stating in simple terms that the fix (without further modifying the firmware) is to power down the Pi completely (e.g. unplug it), then power it back on (a 'hard' reboot). It took me a few cycles and searching for this issue before I connected the dots that this bug (regardless of what kind of USB volume is used) is only related to soft reboots. |
Understood but the assertion that this happens "regardless of what kind of USB volume is used" is not correct. We have successfully tested with multiple adapters and SSDs and so have people on the forums. There may well be a class of devices which require an extended power off on reset but we'll never know what that is if bug reports aren't specific. |
If you have details of the SATA adapter (e.g. an Amazon link) that would be useful. |
Just as a point of comparison, I wonder if @ghollingworth encountered similar issues with the USB MSD boot on 3B / 3B+ ? |
I've searched this adapter in internet and found nothing useful. I buy this in a local store so i guess this adapter from china (aliexpress i think). All the useful information i found: |
No problem, I think we are going to have to get hold of a selection of adapters because logging or even protocol analysers don't really help if the USB port doesn't detect the device. |
I can send a photo of an adapter if it helps |
FYI the adapter I'm currently testing with is the Inateck 2.5" SATA HDD External Enclosure, FEU3NS-1 on Amazon. With that enclosure, the Pi 4 does not soft reboot successfully. I also have an Inland SATA adapter and one from Startech.com, so I'll try with those and see if they allow a soft reboot or if they fail in the same way. |
Thanks, I can now add that to the purchase order :) Please could you try the soft reboot with rpi-eeprom-recovery-c1325cd20.zip which is attached to this bug, flash using the Raspberry Pi Imager. If you happen to have a powered USB hub then it would be useful to know if that changes behaviour with the experimental bootloader. |
@timg236 - I followed the directions in the the I didn't test with a powered USB hub yet though. Would I need to re-re-flash it back to something else again? |
So some results with the other adapters:
This is all using the |
Thanks @geerlingguy and @wildrun0 those are really useful data points, I think the default behaviour needs to change to power off ports for a short while at boot (which is what this patch does). Although, I might add an option to disable that, even if there are too many options already. |
* Reset Ethernet MAC + PHY if final boot mode is not network boot See: Kernel warning and network failure when attempting to use the network after bootloader times out. raspberrypi#144 * Improve handling of multiple bootable USB devices and remove USB_MSD_BOOT_MAX_RETRIES * Resolve: No DHCPACK with DHCP relay agent raspberrypi#58 * Toggle USB root hub port power for 200ms on the first USB MSD boot attempt See: Bootloader can't boot via USB-HDD after system reboot raspberrypi#151 * Update bootloader handover to support uart_2ndstage - requires a newer start.elf firmware which will be via rpi-update. * Assert PCIe fundamental reset if the final bootmode was not USB-MSD because the OS might not do this before starting XHCI.
Resolved in pieeprom-2020-06-15 |
Just out of curiosity @timg236 , did you manage to work out why some devices need a power-cycle after a warm-reboot? (but are fine from a cold-boot) |
Just an FYI I recently bought 4 RPi 4's, which I immediately updated to the latest firmware:
Two of the pi's boot from SSD no problem at all, but two failed with After a bit of trial and error I eventually updated/downdraded the bootloader to the 16th July 2020 version I then updated the bootloader to the 31st July version and they still booted. It would appear that the 16th July version does 'something' which the 31st July version does not... |
I am also experiencing a soft-reboot stuck with the latest stable eepron on a 8gb rpi 4, an non-powered orico usb-c to sata adapter and a sandisk sata ssd, powered only through the adapter. On a soft reboot the bootloader screen will report that an SD card is found while there is none, iterate through the usb devices and appears stuck afterwards. A hard reset will make it start.
|
Hi All I also have the same issue, but even an extended power down (with the cable removed) is not solving my issue. I think my issue is that I used a NVME SSD and used a NVME to USB3 adaptor instead of SATA to USB3? The drive does show up as removable storage in raspbian and I can copy the SDCard contents to it but it doesn't get recognised during boot. If someone with more knownledge could just confirm that my issue is due to using NVME rather than SATA then that will be great. Thanks |
@Laser128128 Did you try upgrading to |
Hi @matonb Yes I did. I managed to get it working in the end by following this guide: It is lightning fast now and I have more storage space to work with. I still can't get it to work completely without the SD card. From my limited understanding it still needs the SD card to tell the pi to boot from the SSD, I can live with this for now and will probably look at moving away from the SD card completely at a later stage. Thanks |
Hi @Laser128128, Maybe your combination of NVME drive and Adpator is missing the sweet spot at the mo. When I got USB Boot to work I no longer need an SD card installed at all. Regards, |
@Laser128128 - That blog post was written before the Pi Foundation released new firmware updates to support direct booting from USB drives. You need to follow the updated process to make sure your Pi's firmware has this feature enabled. See my more recent blog post: https://www.jeffgeerling.com/blog/2020/im-booting-my-raspberry-pi-4-usb-ssd Specifically, you'll need to:
Change the "critical" to "stable" and save that file. Then update the firmware:
(Note the firmware version—the pieeprom file date—might be newer since I last updated that post. Check that folder for the latest version with |
@geerlingguy I had problems getting USB Boot to work if I didn't update to That happend on two fo the 8GB pi's I bought and one 2GB so it's a bit hit and miss... |
I'm having the same problem with an Ubuntu desktop USB flash drive on RPI 400. 20200903 eeprom I think this must a drive or Ubuntu issue because it does not happen with raspbian and another drive. |
I can confirm this is happening with an SSD Intel 454s (Using 2020-07-16 eeprom and also latest update) USB Adapter: All raspis are using ADATA ED600 adapter. Swapping drives confirms that the problem is the intel drive |
The original issue was resolved. If other configurations are failing then it will be a different issue albeit with similar symptoms. For hardware interop please create a separate issue if the USB devices are not the same as the original report. |
After rebooting (sudo reboot), im getting stuck in bootloader with this loop:
If at this moment i replug usb-hdd, it will boot correctly, And sometimes it says that: 'SD: card detected' but there isnt no sd card in rpi.
Bootloader version:
Bootloader configuration:
lsusb -vvv output:
The text was updated successfully, but these errors were encountered: