How do I get Xavier's constant UUID value

When I flash the system every time,after starting the system,the mmcblk0p1 uuid changed.
And I boot the system from SSD, The UUID value changes each time when flash the system.How do I keep the UUID constant.

Can you try this node?

cat /etc/machine-id

Some added information…

If you need to identify the machine itself, then you’d use what @WayneWWW mentions. If you really need to the root filesystem partition to remain constant, then typically you would want to not regenerate the image from scratch like the flash default behavior does.

One way to keep the UUID of the partition is to tell flash.sh on command line to reuse the previous existing image via the “-r” option. If that previous image was the one installed before, then the UUID won’t change. You could perhaps even use a clone of some known working partition in the Xavier, and use that clone along with “-r”. Example from the “~/nvidia/nvidia_sdk/JetPack...version.../Linux_for_Tegra/” location on the host PC for flash:
sudo ./flash.sh -r jetson-xavier mmcblk0p1

Another possibility is to write down the UUID, and then modify the flash.sh script to use that UUID when formatting the new image. This implies adding an argument to the mke2fs command, which in turn might be indirectly through mkfs.ext4.

Inside of flash.sh you will see this line, which happens to be the line which performs the actual formatting of the loopback image:
mkfs -t $4 "${loop_dev}" > /dev/null 2>&1;

In this case “$4” will be ext4, the loop_dev you can ignore as it names the file being formatted by pretending it is a partition, but you’d end up with a new command directly after this to name the specific UUID. Something like this, where I will pretend the UUID is 1234-5678-abcd:
mke2fs -t $4 -U 1234-5678-abcd ${loop_dev} 2>&1;

Right after the format the loop filesystem is empty, and the mke2fs would duplicate some of the work, but the duplication would be harmless, and you’d have the UUID. I’m not sure how to pass UUID from the mkfs front end script.

Optionally you could use the mke2fs line if some option were passed which you added, or if it found a file such as a new “custom-uuid.conf” and if the file is found to not be empty (you’d have to do more bash programming, but it would be fairly simple to make the custom UUID easy to work with).

I try,Thank you very much.

I tried a couple of xaviers and they had the same machine-id, How do I make each Xavier have a different machine-id?

If you are looking to identify the module itself, and not partitions or disks, check this out:
cat /sys/firmware/devicetree/base/serial-number
(but realize that firmware might not be good to rely on for this)

I know,Thank you very much.