System.img failed to set up loop device Xavier NX Jetpack 5.1

Hi all,

I am trying to flash a xavier nx devkit with Jetpack 5.1 and it keeps on failing on

losetup: system.img: failed to set up loop device: No such file or directory
mapping system.img to loop device failed

I used the following command:

./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1

I noticed that this was a bug in Jetpack 5.0.1, has it not been fixed?

This Topic seems to be similar but it doesnt seem solved? SDK Manager on Docker: "losetup: system.img: failed to set up loop device"

Thanks

Are you using standalone Ubuntu18.04 or 20.04 as your host PC?

Does your Xavier NX devkit come with eMMC or SD card module?

I am using 18.04 on my host and my Xavier NX is with eMMC memory

A thought on this is that the command line flash requires sudo. You didn’t mention that, but if not, then that might be the cause.

If you did use sudo, then the command would first generate “Linux_for_Tegra/bootloader/system.img.raw”, and then generate the sparse “bootloader/system.img” from that. This is a lot of file space, and if your system does not have enough space, perhaps it stopped. From the “Linux_for_Tegra/” directory, what do you see from “df -H -T .” (the “.” is important…you could instead name the full path to the “Linux_for_Tegra/” location).

Also, if you go to “Linux_for_Tegra/bootloader/”, what do you see from “ls -lh system.img*”?

If you are using the devkit, you could just flash with SDK Manager.
Install Jetson Software with SDK Manager :: NVIDIA SDK Manager Documentation

For the flash.sh, you need sudo permission.

Ive found the issue,
I did use Sudo, however I was missing some install packages. Ive copied the install list from this repo GitHub - atinfinity/sdk_manager_docker: Dockerfile to use NVIDIA SDK Manager on Docker container into my own Docker image and it works fine now.

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