Unable to boot from USB flash drive, when another USB mass storage device is connected (LT4T 32.5.1)

Hello guys, I am successfully using USB flash drivers for rootfs, on my Jetson Nanos (have 20 of them).

Usually they are recognised as /dev/sda1 , but i rather use root=PARTUUID= in extlinux.conf, which i believe is recommended if you have multiple USB flash drivers inserted in USB3.0 ports.

And here comes my issue. When I do attach USB external SATA drive (USB3->SATA) I am unable to boot Jetson Nano After restart. And this is valid for all my Jetson Nanos . It is just stuck in NVIDIA logo screen.

I have read L4T manual over 10 times, and to my knowledge, bootloader (which is in QSPI-NOR starting L4T 32.5) should search for /boot/extlinux/extlinux.conf , find rootfs and start.

I understand that my external SATA drive is faster (so it is identified as sda) while my boot USB flash card is (sdb), but bootloader should not find extlinux.conf on sda and move onto sdb.

As far as I remove external SATA drive, I am able to boot again.

UPDATE : also when i copy /boot to /dev/sda1 (usb3-sata) , i am able to boot rootfs from USB flash (samsung flash). So it really seems that bootloader can not move on onto sdb when extlinux.conf is not found on sda ?

I have even tried to reflash QSPI-NOR ( sudo ./flash.sh jetson-nano-qspi sda1 ) also tried with sdb1 , to make sure I have latest bootloader, but it did not help.

I would appreciate any kind of help, since this is blocker for me to move onto production.

Thanks!

You should share the log.

Hey, @WayneWWW

so here is the log when both USB->SATA drive and USB flash disk are attached

U-Boot 2020.04-g6b630d64fd (Feb 19 2021 - 08:37:46 -0800)

SoC: tegra210
Model: NVIDIA Jetson Nano Developer Kit
Board: NVIDIA P3450-0000
DRAM:  4 GiB
MMC:   sdhci@700b0000: 1, sdhci@700b0600: 0
Loading Environment from SPI Flash... SF: Detected mx25u3235f with page size 256 Bytes, erase size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  0 
MMC: no card present
Card did not respond to voltage select!
starting USB...
Bus usb@7d000000: tegrausb: Invalid dr_mode 2 for host mode
probe failed, error -1
Bus xusb@70090000: 
Firmware size 124416
Firmware timestamp: 0x5da88fc3, Version: 50.25 release

Register HCSParams1: 9000124 NbrPorts: 9
Starting the controller
USB XHCI 1.00
scanning bus xusb@70090000 for devices... 7 USB Device(s) found
       scanning usb for storage devices... 2 Storage Device(s) found

Device 0: Vendor: WDC  WDS Rev: 0    Prod: 500G2B0B-00YS70 
            Type: Hard Disk
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
... is now current device
Scanning usb 0:1...

Device 0: unknown device

Warning: eth_rtl8169 using MAC address from ROM
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 172.16.15.59 (569 ms)
*** Warning: no boot file name; using 'AC100F3B.img'
Using eth_rtl8169 device
TFTP from server 172.16.15.1; our IP address is 172.16.15.59
Filename 'AC100F3B.img'.
Load address: 0x84000000
Loading: T T T T T T T T T T 
Retry count exceeded; starting again

what i can see that it detects 2 storage devices, tries to boot from device 0 and it ends with Device 0: unknown device,

and it do not even checks for second device …

and this is log , when only one USB FLASH drive is attached (SAMSUNG Flash Drive FIT) . it works ok.

Loading Environment from SPI Flash... SF: Detected mx25u3235f with page size 256 Bytes, erase size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  0 
MMC: no card present
Card did not respond to voltage select!
starting USB...
Bus usb@7d000000: tegrausb: Invalid dr_mode 2 for host mode
probe failed, error -1
Bus xusb@70090000: 
Firmware size 124416
Firmware timestamp: 0x5da88fc3, Version: 50.25 release

Register HCSParams1: 9000124 NbrPorts: 9
Starting the controller
USB XHCI 1.00
scanning bus xusb@70090000 for devices... 6 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Device 0: Vendor: Samsung  Rev: 1100 Prod: Flash Drive FIT 
            Type: Removable Hard Disk
            Capacity: 61188.1 MB = 59.7 GB (125313283 x 512)
... is now current device
Scanning usb 0:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
840 bytes read in 2 ms (410.2 KiB/s)
1:      primary kernel
Retrieving file: /boot/initrd
7159329 bytes read in 40 ms (170.7 MiB/s)
Retrieving file: /boot/Image
34338824 bytes read in 191 ms (171.5 MiB/s)
append: tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,4 early 
## Flattened Device Tree blob at 83100000
   Booting using the fdt blob at 0x83100000
ERROR: reserving fdt memory region failed (addr=0 size=0)
ERROR: reserving fdt memory region failed (addr=0 size=0)
   Using Device Tree in place at 0000000083100000, end 000000008317e68d
copying carveout for /host1x@50000000/dc@54200000...
copying carveout for /host1x@50000000/dc@54240000...

Starting kernel ...

btw it happnes with each combination of 2 usb storage devices (i have tried it also with 2 samsung usb flash cards), in case boot device end-ups as a second device, see :

SoC: tegra210
Model: NVIDIA Jetson Nano Developer Kit
Board: NVIDIA P3450-0000
DRAM:  4 GiB
MMC:   sdhci@700b0000: 1, sdhci@700b0600: 0
Loading Environment from SPI Flash... SF: Detected mx25u3235f with page size 256 Bytes, erase size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  0 
MMC: no card present
Card did not respond to voltage select!
starting USB...
Bus usb@7d000000: tegrausb: Invalid dr_mode 2 for host mode
probe failed, error -1
Bus xusb@70090000: 
Firmware size 124416
Firmware timestamp: 0x5da88fc3, Version: 50.25 release

Register HCSParams1: 9000124 NbrPorts: 9
Starting the controller
USB XHCI 1.00
scanning bus xusb@70090000 for devices... 7 USB Device(s) found
       scanning usb for storage devices... 2 Storage Device(s) found

Device 0: Vendor: Samsung  Rev: 1100 Prod: Flash Drive DUO 
            Type: Removable Hard Disk
            Capacity: 30592.0 MB = 29.8 GB (62652416 x 512)
... is now current device
Scanning usb 0:2...
** Unable to read file / **

Device 0: unknown device

You can try to add some debug print to the uboot source and see why it checks the second storage in some case but didn’t happen when you use the disk from WDC.

well i’ve been playing with uboot configuration (via serial console, pressing key to disable autoboot) and this is what I have found out

printenv, showed that variable boot_targets= contains only usb0 as boot target, therefore in my situation usb0 is usb->sata device

after adding to boot_targets = usb0 usb1

and adding

bootcmd_usb1=devnum=1; run usb_boot

boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=usb0 usb1
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; run boot_pci_enum; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv boot;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_nvme0=devnum=0; run nvme_boot
bootcmd_pxe=run boot_net_usb_start; run boot_pci_enum; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=devnum=0; run usb_boot
bootcmd_usb1=devnum=1; run usb_boot

and executing saveenv, it works for me now!

But my question now is, how to modify this variables as a part of flashing, ie when doing

sudo ./flash.sh jetson-nano-qspi

because i have multiple jetsons (10) that needs to be set like this, and manual configuration is not an option for me

this is how booting looks like now (when added usb1 to boot_targets)

Bus xusb@70090000: 
Firmware size 124416
Firmware timestamp: 0x5da88fc3, Version: 50.25 release

Register HCSParams1: 9000124 NbrPorts: 9
Starting the controller
USB XHCI 1.00
scanning bus xusb@70090000 for devices... 7 USB Device(s) found
       scanning usb for storage devices... 2 Storage Device(s) found

Device 0: Vendor: WDC  WDS Rev: 0    Prod: 500G2B0B-00YS70 
            Type: Hard Disk
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
... is now current device
Scanning usb 0:1...

Device 1: Vendor: Samsung  Rev: 1100 Prod: Flash Drive FIT 
            Type: Removable Hard Disk
            Capacity: 61188.1 MB = 59.7 GB (125313283 x 512)
... is now current device
Scanning usb 1:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
876 bytes read in 2 ms (427.7 KiB/s)
1:      primary kernel
Retrieving file: /boot/initrd
7159329 bytes read in 40 ms (170.7 MiB/s)
Retrieving file: /boot/Image
34338824 bytes read in 190 ms (172.4 MiB/s)

Ill answer it myself, building custom u-boot and adding usb1 to boot_targets, then flashing to jetson solves issue.

i would suggest to update l4t documentation in U-Boot Customisation / Environment Configuration

It should be mentioned, that it boots only from first initialized USB Mass Storage by U-boot indentified as usb0.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.