Boot rootfs from USB drive or SD

Since I use jetson-xavier-nx-devkit-emmc .
If i follow these instructions to build external rootfs storage

And NX’s emmc is already loaded firmware,
Is it possible to boot ROOTFS from USB drive or SD card while plug-in usb pen drive or micro sd ?
Will it boot from emmc while usb drive and sd card remain unplug?
Or cboot required to be modified to change the rootfs boot order?

2nd issue,
As this thread told,
Is u-boot still not support USB hub to boot rootfs from usb?


1 Like

It looks like there have been several changes in c-boot since I wrote that post but I haven’t had time to test yet. I’l be doing so over the next few days though.


lk debug message shows some error of SD/USB boot.
Does it have some issue to implement external rootfs feature?

[0015.227] E> no regulator info present for vmmc-supply
[0015.228] E> Failed to initialize device 6-0
[0015.228] E> SD boot failed, err: 252641308
[0016.370] E> slot id is 1
[0016.378] E> Enumerated device doesn’t belong to MSD class or protocol is not bulk-only!!
[0016.379] E> USBMSD: Failed to initialize Enumerated USB device either not an MSD device or supported protoco[0016.380] E> USBMSD: Failed to open usbmsd open, 0.
[0016.380] E> Error opening USBMSD driver 0, err: 7c7c0312
[0016.381] E> Failed to initialize device 5-0
[0016.385] E> USB boot failed, err: 2088502034

[0020.329] E> tegrabl_linuxboot_add_disp_param, du 1 failed to get display params
[0020.329] E> tegrabl_linuxboot_add_disp_param, du 1 failed to get display params
[0020.330] E> Failed to get WIFI MAC address
[0020.330] E> Failed to get Bluetooth MAC address
[0020.335] E> add_disp_param: failed to get display params for du=1
[ 0.000000] Booting Linux on physical CPU 0x0

I haven’t been able to test yet but it looks like the same issue exists. Cboot isn’t enumerating the mass storage devices properly. It’s finding the hubs and testing them for mass storage which of course will fail. It never goes on to the connected devices to find the actual USB mass storage devices that may be connected to the hub.

So it looks like you still need to have the APP partition on the sdcard or emmc.

Having said that you do not need to have the rootfs partition on the sdcard or emmc. The APP partition only needs to have the /boot directory on it not the whole root filesystem. What I do is to have a basic root filesystem on the sdcard/emmc and have the /boot/extlinux/extlinux.conf APPEND line use root=/dev/sda1 where sda1 is the real root partition on a USB stick (or nvme or whatever) then in /etc/fstab mount /dev/mmcblk0p1 on /boot.

You can even create additional entries in extlinux.conf to allow you to easily switch between the rootfs on the emmc and the rootfs on the USB device.


Thanks for your reply
Since i’ve tried steps in flashing section of official docs,
using flash command with sda1/mmcblk1p1 parameter to generate system.img.raw and resync with sd card or usb drive on host pc , then plug into NX.
It still boot from mmcblk0p1 instead of sda1 or mmcblk1
I don’t know if the steps in docs have some issue or not.

I will try extlinux setup as you mentioned.

1 Like