TX2 clone, how to mount the .img file

Hi,

I was doing some testing with the built in camera of TX2 devkit and somehow it written a video that filled the complete eMMC. Now the device does not boot. It gets stuck in the boot texts, screen goes blank and same window appears. So I believe that the eMMC is just too full for it to boot.

I managed to do a clone of the system because I have some files on the TX2 which I need. Question is: how can I mount the created .img file to copy the files?

clone command line from inside the Jetpack folder: sudo ./flash.sh -r -k APP -G /media/dan/Elements/Dippatyo/TX2backup20200105/backup.img jetson-tx2 mmcblk0p1

I did the clone on a NTFS USB HDD.

Here how I tried to mount:

  1. mkfs ext3 -F backup.img
  2. sudo mount -o loop backup.img /mount/ -> this gives error: mount: /mount/: mount point does not exist.

Can you please help me solve this? Or are there other ways to copy a couple of small (< 1 Mb) files from the eMMC?

And got it working!

The mount was suucesful after using the .img.raw file instead of .img.

One thing to note is that the file has to be mounted on the computers harddisk. I tried to mount it on the USB HDD but it failed.

Steps:

  1. Create clone of TX2:
    a) connect TX2 with micro USB cable to your computer and start it in recovery mode (push rec + pwr util leds go on. Then release pwr and then rec)
    ab go to your SDK manager folder in terminal. Mine is: /home/dan/nvidia/nvidia_sdk/JetPack_4.2.1_Linux_GA_P3310
    c) run the following command. In my case it puts the backup on my USB HDD named Elements to the folder “dippatyo/TX2backup20200105”: sudo ./flash.sh -r -k APP -G /media/dan/Elements/Dippatyo/TX2backup20200105/backup.img jetson-tx2 mmcblk0p1

  2. Mount the created image:
    a) create a folder on your computer harddisk. For example: mkdir ~/mountFolder
    b) go to the folder where you specified the image to be placed in. In my case: media/dan/Elements/Dippatyo/TX2backup20200105/
    run command: sudo mount -o loop backup.img.raw /~/mountFolder
    c) run: cd ~/mountFolder and there you have it!
    d) When you are finished unmount the image: sudo umount ~/mountFolder

I hope this helps someone. Im not an Linux wizard so tried to write the instruction to someone as nood ab me.

External disks and thumb drives are not actually excluded from having mount points on them. However, some filesystem types may not support this, e.g., NTFS does not support random mount points within this of other filesystems. You are probably best served with “mkfs.ext4” instead of “mkfs.ext3”, but the two are compatible when mixed.