Can we clone using the .img file ?

Hi all,

I cloned my jetson.
But as it takes quite a long time to flash a ghost image on a Jetson from a .img.raw file, i would like to know if there is a way to use .img instead ?

Thx for your help,

The raw image is an entire bit-for-bit exact copy of some span of eMMC being sent over USB2…it will be slow. The sparse image (“not raw”) is essentially a type of compression, and the Jetson itself accepts either format (the flash tool doesn’t care which you use so long as it is named “system.img” during flash). The normal process is that flash creates the raw image and then converts to sparse before transmitting. The tool is there:


In a sparse image the tool will want to know what to use for filling during the time when being decompressed…“0” is used. So it goes like this when the flash tool does the actual conversion, and you can do this as well (extra steps shown to understand what flash does):

cd bootloader
sudo mv system.img system.img.raw
sudo mksparse -v --fillpattern=0 system.img.raw system.img

…thus system.img.raw is the source, and system.img is the destination.

Beware if you need to modify or examine the image at a later date that there is no way to go back to raw image once it is sparse (open source tools don’t understand this version of sparse).

is there a way to reverse and made of system.img the raw image in a way the device can be flashed with dd and from the system.img that comes with jetpack, but without interface?

The clone also produces a “.raw” image, not just a sparse image. In theory there are a number of open source tools which work with conversion of sparse back to raw, but my experiments failed and it seems this kind of sparse image is not compatible with the open source sparse-aware tools. The only conversion I know of is to flash with the sparse image and allow the recovery mode Jetson to do the conversion.

The “mksparse” tool, with null byte fill pattern, is how the conversion is made from raw to sparse, but the reverse tool does not seem to exist.

Would anyone at NVIDIA be able to provide information on reversing the sparse back to raw without flashing?