Factory state would imply flashing to R27.0.1, but the earliest published update is R27.1 (this was more or less just purely a bug fix release).
Every mountable partition has a file system on it. The software designed to mount this has a driver for treating a block device as a certain filesystem type…in this case ext4. Loopback allows a file to be treated as if it is a block device…the file looks like a hard drive partition when loopback covers it. Anything you can do with for example hard drive partition “/dev/sda1” (assuming it is ext4) you can do with “/dev/loop0” (assuming loop0 covers your file).
Normally you would mount a partition something like this (a contrived example, I’m assuming sdb1):
sudo mount /dev/sda1 /mnt
ls /mnt
sudo umount /mnt
The “-o” option to mount says to use options during the mount. This will cause a loop device to cover a file such that the file is mounted as if it were a hard disk:
sudo mount -o loop /where/ever/it/is/Linux_for_Tegra/clone.img /mnt
ls /mnt
sudo umount /mnt
Do beware that during a clone you will probably get a compressed/sparse version named with “.img", whereas you need the raw/uncompressed version, named with ".img.raw”. If you flash the flash software won’t care if you place “bootloader/system.img” with a raw or a sparse file, it’ll just “do the right thing”. Raw files are slower.
Some commands automatically cover a file with the loopback device. “mount -o loop” is one of those commands. You can manually add or remove loop device coverage with losetup, but beware that loop devices are dynamic and are generated as needed…and only root can generate them. Non-root can often use these devices.
If non-root runs “losetup --find” it will show the name of the first unused loop device. If the device does not exist, then it will not be created. If you run “losetup --find” as root (using sudo), then not only will this tell you the name of the first unused loop device, it will also create this device. If this command replied “/dev/loop0”, and if loop0 did not previously exist, the sudo version will actually create the file.
If you have an unused loop device you can also manually manipulate what the loop device is attached to, and then name the loop device as if it were a hard drive. “man losetup” explains this, but it can be easier to just google for examples. The one you might want to be aware of is how to detach a loop device from a file (which requires the loop device to not be mounted), e.g., if the device is loop0:
sudo losetup -d /dev/loop0
What you want is to find the system.img.raw (or whatever .raw file it is from your clone), and then “sudo mount -o loop /the/file/system.img.raw /mnt”. Then you can cd to “/mnt” and edit or copy however you desire. Then umount as it it were a spare disk.
FYI, if you were in a production environment you might consider clone a full backup. You can then rsync from the Jetson to update a clone on loopback if you’ve done something like update packages or customize something.