operating-system icon indicating copy to clipboard operation
operating-system copied to clipboard

Raspberry PI5 boot from USB3.0 port not possible

Open ragman11 opened this issue 1 year ago • 10 comments
trafficstars

Describe the issue you are experiencing

Boot from USB with an SSK NVME Adapter. Works fine when using the USB2.0 ports on the PI5, When I plug it into the USB3.0 port no boot possible. Get stuck on bootup.

With USB2 cables boot is fine, only with USB3 cable it does not work

Adapter:

SSK Aluminium M.2 NVME SATA SSD Gehäuseadapter, USB 3.2 Gen 2 (10 Gbit/s) auf PCI-E NGFF M-Key/(B+M) Key Solid State Drive Externes Gehäuse unterstützt UASP Trim für NVME/SATA SSDs 2242/ 2260/2280

What operating system image do you use?

rpi5-64 (Raspberry Pi 5 64-bit OS)

What version of Home Assistant Operating System is installed?

11.4

Did you upgrade the Operating System.

No

Steps to reproduce the issue

  1. Boot from USB SSK NVME adapter on usb2.0 port - HA is running fine.
  2. trying the same plugged into the USB3.0 port - no boot possible

Anything in the Supervisor logs that might be useful for us?

na

Anything in the Host logs that might be useful for us?

na

System information

System Information

version core-2024.1.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.63-haos-raspi
arch aarch64
timezone Europe/Vienna
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4998
Installed Version 1.33.0
Stage running
Available Repositories 1378
Downloaded Repositories 34
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 11.4
update_channel stable
supervisor_version supervisor-2023.12.0
agent_version 1.6.0
docker_version 24.0.7
disk_total 228.5 GB
disk_used 9.0 GB
healthy true
supported true
board rpi5-64
supervisor_api ok
version_api ok
installed_addons Mosquitto broker (6.4.0), HoyMiles Solar Data Gateway Add-on (0.24.1d), Terminal & SSH (9.8.1), File editor (5.7.0), HoyMiles Solar Gateway Addon (1.0.9), evcc (0.123.8), Studio Code Server (5.15.0), HoyMiles Solar Gateway Edge Addon (1.2.2), Home Assistant Google Drive Backup (0.112.1), OneDrive Backup (2.2.4)
Dashboards
dashboards 1
resources 34
views 12
mode storage
Recorder
oldest_recorder_run January 4, 2024 at 13:19
current_recorder_run January 14, 2024 at 09:47
estimated_db_size 1068.65 MiB
database_engine sqlite
database_version 3.41.2

Additional information

No response

ragman11 avatar Jan 14 '24 17:01 ragman11

I tested it again with USB 3.0 cables, 3 different nvme Adapter, all are working and booting on PI4 USB 3.0 port.

Raspian is booting up fine from USB3 ports on Pi5

ragman11 avatar Jan 17 '24 16:01 ragman11

Screenshot_20240119_084043_Gallery With an USB3 Cable it does not boot, USB 2 cable runs fine

ragman11 avatar Jan 19 '24 07:01 ragman11

I have no problem with booting from usb3. Ugreen usb3.2 case with kingston a400 ssd.

manmei80 avatar Jan 19 '24 19:01 manmei80

I have no problem with booting from usb3. Ugreen usb3.2 case with kingston a400 ssd.

are you using a usb 3.2 cable? blue inside usb connector. With a usb2.0 cable I can boot too. I tried the same ugreen 3.2 with 2 different nvme

ragman11 avatar Jan 19 '24 19:01 ragman11

I use the cable that comes with the case. It is a 3.2 cable.

manmei80 avatar Jan 19 '24 19:01 manmei80

I use the cable that comes with the case. It is a 3.2 cable.

ok, still strange, I‘m using a Intenso 250GB M.2 SSD PCIe Premium, 2100 MB/s, (PCI Express Gen.3x4 NVMe 1.3, Solid State Drive)

second one is fanxiang S500 Pro 256GB NVMe SSD M.2 PCIe Gen3x4 2280 SLC Cache 3D NAND TLC, Bis zu 2800 MB/s

Raspian is working fine with this seTup on USB3

ragman11 avatar Jan 19 '24 20:01 ragman11

I am seeing similar behavior with SQUASHFS errors on first boot.

Booting haos_rpi5-64-11.5.dev20240117 on a nvme ssd in ugreen USB enclosure. Using enclosure provided USB 3.2 cable in USB3 port of pi 5 (either).

Drive: TEAMGROUP MP44 1TB SLC Cache Gen 4x4 M.2 2280 PCIe 4.0

Enclosure: UGREEN SSD Enclosure

Booting from sdcard works fine. Just found out that booting using the USB2 ports also work fine.

ryansyah avatar Jan 20 '24 03:01 ryansyah

I had trouble as well booting my Realtek RTL9210B controller. Raspian did work well, but HA OS was only booting from USB2. It might be unsupported UAS or the controller itself. I‘m technically not deep inside this issue. Something seems to be missing right now.

I could solve this by adding usb-storage.quirks for my adapter id inside cmdline.txt.

By googling you will find many howtos for fixing this.

RacingHell avatar Jan 22 '24 07:01 RacingHell

@RacingHell, thanks for your input.

Per your suggestion, I have added usb-storage.quirks=0bda:9210:u to /mnt/boot/cmdline.txt in the host OS. The setting appears to have taken:

# dmesg | grep usb-storage
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 smsc95xx.macaddr=D8:3A:DD:C4:0C:F5 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000  usb-storage.quirks=0bda:9210:u zram.enabled=1 zram.num_devices=3 rootwait cgroup_enable=memory fsck.repair=yes console=tty1 root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rauc.slot=A systemd.machine_id=5b9074b69ae14dd88d4aca0a312ad6b8
[    0.403815] usbcore: registered new interface driver usb-storage
[    1.160761] usb-storage 3-2:1.0: USB Mass Storage device detected
[    1.161307] usb-storage 3-2:1.0: Quirks match for vid 0bda pid 9210: 800000
[    1.161773] scsi host0: usb-storage 3-2:1.0

With this setting in place, I can confirm that HAOS will fully boot from the nvme ssd drive + enclosure using either USB 3.2 port, which is an improvement in behavior. I'll monitor this system for stability and report back.

P.S. - I found instructions for doing this modification here: STICKY: If you have a Raspberry Pi 4 and are getting bad speeds transferring data to/from USB3.0 SSDs, read this

UPDATE: ~24 hours in, stable system and no issues to report.

ryansyah avatar Jan 22 '24 20:01 ryansyah

There hasn't been any activity on this issue recently. To keep our backlog manageable we have to clean old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant OS version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 23 '24 05:04 github-actions[bot]

Same on pi4 I have changed in cmdline.txt (from a PC) dwc_otg.lpm_enable=0 console=tty1 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u to dwc_otg.lpm_enable=0 console=tty1 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u

slapin95 avatar Aug 11 '24 18:08 slapin95