# CBoot with USB Storage issue

**URL:** <https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916>\
**Category:** Jetson Xavier NX\
**Tags:** cboot\
**Created:** [May 19, 2020, 8:19pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916 "2020-05-19T20:19:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![gtj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/gtj/32/11962_2.png) [@gtj](https://forums.developer.nvidia.com/u/gtj)\
**Post date:** [May 19, 2020, 8:19pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/1 "2020-05-19T20:19:08Z")

</div>

```auto
[0004.038] I> ########## USB boot ##########
[0004.047] W> No valid slot number is found in scratch register
[0004.048] W> Return default slot: _a
[0004.059] I> USB Firmware Version: 60.06 release
[0004.114] I> regulator of usb2-0 already enabled
[0004.120] I> regulator of usb2-1 already enabled
[0004.127] I> enabling 'vdd-usb2-5v' regulator
[0005.191] I> USB 2.0 port 2 new high-speed USB device detected
[0005.192] W> WARNING: event and command not matching, cmd_trb_ptr = 0xa0e9e800, cmd_ring.dma = 0xa0e9e840
[0005.193] E> slot id is 1
[0005.194] W> WARNING: event and command not matching, cmd_trb_ptr = 0xa0e9e800, cmd_ring.dma = 0xa0e9e840
[0005.204] W> WARNING: event and command not matching, cmd_trb_ptr = 0xa0e9e800, cmd_ring.dma = 0xa0e9e840
[0005.206] I> 
[0005.206] I> Enumerated USB Device 0bda:5489
[0005.208] I> 
[0005.209] E> Enumerated device doesnt belong to MSD class or protocol is not bulk-only!!
[0005.217] E> USBMSD: Failed to initialize Enumerated USB device either not an MSD device or supported protoco[0005.227] E> USBMSD: Failed to open usbmsd open, 0.
[0005.231] E> Error opening USBMSD driver 0, err: 7c7c0312
[0005.237] E> Failed to initialize device 5-0
[0005.241] E> USB boot failed, err: 2088502034

```

After some investigation I realized that the device being complained about is the Realtek 4 port USB hub on the carrier board. 0bda:5489. CBoot is testing that for MSD class and bulk transfer (which it won’t have) and then then completely bails and fails to test any other enumerated USB devices.

Shouldn’t there be a loop enumerating the devices and moving on the the next one if the conditions aren’t met? I don’t see one in the CBoot sources.

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [May 20, 2020, 2:55am UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/3 "2020-05-20T02:55:45Z")

</div>

Hi gtj,

How did you get into this error? Are you trying to boot from usb?

---

<div class="post-metadata">

**Author:** ![gtj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/gtj/32/11962_2.png) [@gtj](https://forums.developer.nvidia.com/u/gtj)\
**Post date:** [May 20, 2020, 12:35pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/5 "2020-05-20T12:35:59Z")

</div>

> [@WayneWWW](#):
>
> Hi gtj,
> 
> How did you get into this error? Are you trying to boot from usb?

Yes. I removed the SD card and attached a USB \<\> Sata drive. CBoot is never getting far enough to check the drive as it fails checking the hub.

> [@WayneWWW](#):
>
> ctually, usb firmware loading has some problem in Xavier and AFAIK it has no clear ETA to get this fixed yet.

It looks like the firmware _is_ loading…  
`USB Firmware Version: 60.06 release`  
unless that’s a bogus message.

Anyway, it’s not critical for me. I just thought I’d test and report.

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [May 20, 2020, 1:31pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/6 "2020-05-20T13:31:48Z")

</div>

Ok. Then what I remember is for uboot on Nano but not NX. Sorry for that info. I deleted them already.

What was your step to hit this error? If firmware is loading then USB boot should support. Put rootfs/kernel/kernel-dtb on usb device should work.

---

<div class="post-metadata">

**Author:** ![gtj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/gtj/32/11962_2.png) [@gtj](https://forums.developer.nvidia.com/u/gtj)\
**Post date:** [May 20, 2020, 2:17pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/7 "2020-05-20T14:17:38Z")

</div>

- On my host, I flashed the sd card image (nv-jetson-nx-sd-card-image-r32.4.2) to an SSD.
- I attached the SSD to a USB\<\>SATA adapter and plugged it into a running NX and verified that I could see the device and partitions including kernel-dtb and kernel-dtb\_b.
- I powered the NX off and removed the SD card from the NX module.
- I powered the NX back on.
- I got the error posted above and the boot process stopped.

CBoot isn’t even checking the USB\<\>SATA adapter. It’s still checking the hub (0bda:5489) for MSD and bulk transfer and when it fails, it doesn’t move on to the actual USB devices.

Here’s the entire boot log…  
[bootlog-nx-usb.log](https://forums.developer.nvidia.com/uploads/short-url/u5c9Eox3f0TxiobLtHW1zJmv2r6.log) (20.3 KB)

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [May 27, 2020, 5:42am UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/10 "2020-05-27T05:42:39Z")

</div>

Hi

We’ve confirmed boot from kernel and kernel-dtb with pendrive is working on r32.4.2/Xavier.

Steps:

1. Connect USB stick to linux PC.
2. Check the USB device name (ex: /dev/sdb or /dev/sdd or /dev/sdc)  
$ sudo lshw -quiet -short -c disk
3. Create new gpt (assuming it is /dev/sdb, it will get at runtime)  
$ sudo parted /dev/sdb mklabel gpt
4. Add kernel partition and allocate 64MB  
$ sudo parted /dev/sdb mkpart kernel 0MB 64MB
5. Add kernel-dtb partition and allocate 1MB  
$ sudo parted /dev/sdb mkpart kernel-dtb 64MB 65MB
6. Print start/end/size in sectors of partitions  
$ sudo parted /dev/sdb unit s print
7. write kernel image to the kernel partition **(need used signed file)**  
$ sudo dd if=/boot.img of=/dev/sdb1
8. write kernel-dtb image to the kernel-dtb partition **(need used signed file)**  
$ sudo dd if= kernel-dtb.dtb of=/dev/sdb2

---

<div class="post-metadata">

**Author:** ![gtj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/gtj/32/11962_2.png) [@gtj](https://forums.developer.nvidia.com/u/gtj)\
**Post date:** [May 27, 2020, 4:19pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/11 "2020-05-27T16:19:32Z")

</div>

I followed your instructions but got the same error.

I then went back to the docs and followed the guide here…  
[https://docs.nvidia.com/jetson/l4t/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E0UH0HA](https://docs.nvidia.com/jetson/l4t/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E0UH0HA)

Same error.

```auto
[0004.021] I> ########## SD boot ##########
[0004.025] I> No sdcard
[0004.027] I> -0 params source = 
[0004.031] E> Blockdev open: exit error
[0004.034] E> SD boot failed, err: 724238353
[0004.038] I> ########## USB boot ##########
[0004.047] W> No valid slot number is found in scratch register
[0004.048] W> Return default slot: _a
[0004.059] I> USB Firmware Version: 60.06 release
[0004.113] I> regulator of usb2-0 already enabled
[0004.117] I> regulator of usb2-1 already enabled
[0004.122] I> enabling 'vdd-usb2-5v' regulator
[0005.186] I> USB 2.0 port 2 new high-speed USB device detected
[0005.187] W> WARNING: event and command not matching, cmd_trb_ptr = 0xa0e9e800, cmd_ring.dma = 0xa0e9e840
[0005.188] E> slot id is 1
[0005.189] W> WARNING: event and command not matching, cmd_trb_ptr = 0xa0e9e800, cmd_ring.dma = 0xa0e9e840
[0005.199] W> WARNING: event and command not matching, cmd_trb_ptr = 0xa0e9e800, cmd_ring.dma = 0xa0e9e840
[0005.201] I> 
[0005.201] I> Enumerated USB Device 0bda:5489
[0005.203] I> 
[0005.204] E> Enumerated device doesn't belong to MSD class or protocol is not bulk-only!!
[0005.212] E> USBMSD: Failed to initialize Enumerated USB device either not an MSD device or supported protoco[0005.222] E> USBMSD: Failed to open usbmsd open, 0.
[0005.226] E> Error opening USBMSD driver 0, err: 7c7c0312
[0005.232] E> Failed to initialize device 5-0
[0005.236] E> USB boot failed, err: 2088502034
[0005.240] I> ########## Fixed storage boot ##########
[0005.245] E> Blockdev open: exit error
[0005.249] E> kernel boot failed

```

---

<div class="post-metadata">

**Author:** ![gtj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/gtj/32/11962_2.png) [@gtj](https://forums.developer.nvidia.com/u/gtj)\
**Post date:** [May 27, 2020, 5:09pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/12 "2020-05-27T17:09:55Z")

</div>

Just a thought… Are you using a newer cboot than what’s in the 32.4.2 release?

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [May 28, 2020, 2:24am UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/13 "2020-05-28T02:24:38Z")

</div>

No, we are just using the rel-32.4.2. I think the difference here is that you are using USB\<\>SATA adapter but we are using only pure USB pendrive.

---

<div class="post-metadata">

**Author:** ![gtj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/gtj/32/11962_2.png) [@gtj](https://forums.developer.nvidia.com/u/gtj)\
**Post date:** [May 28, 2020, 1:48pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/14 "2020-05-28T13:48:37Z")

</div>

Sorry, I should have been clearer. I had tried with a pen drive and an SD card adapter. It never gets beyond testing the hub for MSD and bulk transfer.

Ah well. Maybe it’s just me. I don’t actually need the capability anyway so there’s no need to troubleshoot further unless someone else encounters the issue.

---

<div class="post-metadata">

**Author:** ![gtj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/gtj/32/11962_2.png) [@gtj](https://forums.developer.nvidia.com/u/gtj)\
**Post date:** [May 28, 2020, 4:33pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/15 "2020-05-28T16:33:17Z")

</div>

This post explains why it’s not working. No support for hubs in CBoot.

> [@NX DevKit Boot Process: First Impressions](https://forums.developer.nvidia.com/t/nx-devkit-boot-process-first-impressions/123502/18):
>
> Lots of good info in this thread, gtj. Thanks for posting! Let me just talk about XNX and USB first. Both Nano and NX have a RealTek USB hub on-board (that’s the “USB Device 0bda:5489” you see in during CBoot’s USB boot attempt). Unfortunately, neither CBoot nor U-Boot currently support hubs, so you can’t boot from USB on either platform. We’re working on it, and hope to have USB hub support out in a (near) future release. Note that the kernel DOES support the hub, so you can put data and/or y…

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 6:44pm UTC](https://forums.developer.nvidia.com/t/cboot-with-usb-storage-issue/123916/17 "2021-10-18T18:44:01Z")

</div>


