FYI, clone provides two files: One is the backup.img, and this is “sparse”…it cannot be edited or viewed; the second file is the backup.img.raw…and the raw file can be loopback mounted, explored, edited, and used for flash. I throw away the sparse image and keep only the raw image. Clone will work for what you want and won’t add all of the difficulties of different methods of copy.
Example:
sudo -s
mount -o loop backup.img.raw /mnt
# cd to /mnt, edit, explore...
cd
umount /mnt
cp backup.img.raw /where/ever/Linux_for_Tegra/bootloader/system.img
# flash steps...
exit
FYI, sparse files are faster to flash, but the raw file, if named as “bootloader/system.img”, will flash just fine (it just takes longer).
The raw file will be an exact match to the size of the partition. If you originally flashed with “-S 14580MiB”, then the size will be exactly “14580 * 1024 *1024 = 15288238080” bytes. If you originally flashed with “-S 14GiB”, then the size will be exactly “14 * 1024 * 1024 * 1024 = 15032385536” bytes. By examining the size of the raw file you can figure out the original flash size. Then, assuming it was “-S 14580MiB” originally:
sudo ./flash.sh -S 14580MiB -r jetson-tx2 mmcblk0p1
If you cover this raw image with loopback, then gdisk and gparted will work on the image (via the name of the loopback device) just like it would for a real partition. So long as size sticks to the “MiB” or “GiB” “-S” size increments you can also resize a loopback raw clone image.