Hot swappable SDcard on NX

We have an SDcard image we would like to switch between identical Jetson based hardware. Question, if i use:

./flash.sh [boarddev] mmcblk1p1

Shouldn’t that allow me to hot swap the SDcard across identical Jetson units? Is there anything else that needs to be done so a single SDcard image can be hot-swapped across identical Jetson devices? Is there an issue that could arise from the bootloader trying to find a PARTUUID?

What do people do to create identical SDcards? I was just going to use dd.

Hi,
If you use Xavier NX module with emmc, may refer to this webpage to put rootfs in external storage:
Jetson/L4T/Boot From External Device - eLinux.org

That doesn’t answer my question.

If we flash with the above line, is PARTUUID even looked at by Uboot? My understanding is it shouldn’t. We want to be able to take an sdcard from one NX to another without having to reflash.

What we are seeing is if we flash a unit as per above, zonk the sdcard in it, the NX boots up. But then on reboot, we see something strange: Failure to mount rootfs because it thinks the PARTUUID for the sdcard is for the emmc and fails to mount (like it tried to mount the emmc first failed, and then never went to mount the sdcard).

Also, on older JP units, we are seeing that if we take an sdcard and just put it in without reflashing it, modify the extlinux.conf to change rootfs from mmcblk0p1 to mmcblk1p1 the units don’t try to boot the sdcard at all when the doc clearly states the sdcard is always tried first.

Why?

You can try to share the log. Such description does not help much. We don’t know whether you are talking about is correct or not.

But then on reboot, we see something strange: Failure to mount rootfs because it thinks the PARTUUID for the sdcard is for the emmc and fails to mount (like it tried to mount the emmc first failed, and then never went to mount the sdcard).

Also,

mmcblk0p1 to mmcblk1p1 the units don’t try to boot the sdcard at all when the doc clearly states the sdcard is always tried first.

I think you don’t understand situation. If your sdcard is “mmcblk1p1” instead of “mmcblk0p1”, then it is a external storage. From hardware point of view, it is some extra sdcard slot added by board vendor on the carrier board.

But what we support is the internal sdcard, which means the sdcard is on the module, not carrier board.

No that’s not right either. The ConnectTech Photon has ONBOARD SDcard, no carrier:

How about this: What is the procedure to make an SDcard that can boot on mulitple Xavier NX boards? What is the flash command?

I assume just: ./flash.sh [board] /dev/mmcblk1p1 <---- THAT SHOULD TELL uBoot to always look for the sdcard first, right? Should i remove any vesitges of the l4t-root-partuuid file so flash.sh ignores it (I would assume it would always ignore it if i want a device based boot).

Or another way, if I flash multiple units with the same flashing env that has the same l4t-rootfs-uuid.txt, shouldn’t they all boot in exactly the same way?

Again, using:

./flash.sh [board] /dev/mmcblk1p1 (or external)

Why would the boot ever look at the internal emmc to boot?

Hi,

Sorry that you still don’t get the point. “On board” just means the carrier. There are no other terms. “ConnectTech Photon” is the carrier.
We only have 2 components here. A Xavier NX module and a carrier, or you call it board, which has no difference.

There are two kinds of “modules”, one has sdcard slot on the “module”. That is why we provide “sdcard image”. Such image is for this kind of module.

The other kind of module has no sdcard slot, and it only has emmc.

The link and the picture you posted mean this is ConnectTech’s custom carrier board. There is a sdcard slot on this “carrier board”. This is added by ConnectTech because they want to support sdcard. You can know that this kind of carrier board is mostly for emmc module and sdcard image does not support such sd slot.

Also, flash.sh is not able to flash any “external storage”.

And uboot does not care about what parameters you give to flash.sh.

I assume just: ./flash.sh [board] /dev/mmcblk1p1 <---- THAT SHOULD TELL uBoot to always look for the sdcard firs

This command only tells the kernel cmdline, “mount the file system from /dev/mmcblk1p1”. Which means it is for kernel to read. Not uboot.

You can read my post here to understand.

If you really want to check what is going on, share the uart log from your board.

If you just want a conclusion:

No matter what case, uboot will look internal emmc. Just to search for kernel.

After kernel loads up, if no other accident, then “./flash.sh [board] mmcblk1p1” shall tell kernel cmdline to mount file system from sdcard slot.

Wayne, doesn’t uBoot look at the SDcard first?

From above comments, you may know the difference between internal sdcard slot and external sdcard slot now. Your boards are all using external sdcard slot case.

There is one case that uboot does not support the external sdcard slot on that carrier board. So it is no way for uboot to scan it out.

I mean yeah, maybe it is really trying to read sdcard first, but uboot does not have any customization so uboot does not know sdmmc3 has a sdcard slot at all.

Generally, those vendors come for us to help so that their extra sdcard could be loaded in their “kernel”. That is why there are lots of “I want to enable sdcard slot” topics in this forum.

But they don’t enable it in “uboot” for most cases, so I guess it might be the problem for your case.

As I said, if you really want me to tell the exact scenario, share the boot log. Otherwise we are just keep guessing and guessing.

What boot.log do you want exactly? The console output or something more elaborate.

As an experiment, i made a bootable SDCard with one partition and a PARTUUID of all 1’s. I flashed the Xavier Nx and I do see “Root Device Found: PARTUID=1111…” but then it tries to mount /mnt???

mount: /mnt/: can’t find PARTUUID=1111111-111…

forever until i get a bash shell. Note that “/mnt” is actually the nvme that is connected to this board.

1 Like

I want to check uart log. When I said “boot log”, it is always the uart log.

I don’t know if you have the same pin on your carrier board. You can consult it with your board vendor.

And I just realize that this is Xavier NX issue. So there is no “uboot” at all. All we got is the cboot.
And cboot by default won’t be able to boot from external sdcard slot. Unless it has some customization.

Forget about UUID, just use the mmcblk1p1 to try.

The precise command should be

sudo BOOTDEV=mmblk1p1 ./flash.sh board mmcblk1p1

You’re right about cboot vs uboot. Sorry about that (I’m flipping between boards).

Let me try that - I was just looking at BOOTDEV in flash.sh!!! Great timing Wayne.

IT’s hard for me to setup serial but I can. Grump.

1 Like

It will always be more clear to check uart log when dealing with boot issue.

Otherwise you won’t be able to know the exact situation.

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