I have been using Option 2 on a running system but cannot use it in my current issue, more details below.
Cloned the Image from a running system using,
sudo ./flash.sh -r -k APP -G system.img jetson-tx2 mmcblk0p1
this gave me system.img and system.img.raw
Next I tried to restore this image on a different system but there is a kernel panic during boot up at the early stages and it continuously reboots. In both cases, L4T release is same (R28.1).
I thought there is a mismatch between device tree/kernel so I have cloned image of device tree and kernel (from the running system) using,
sudo ./flash.sh -r -k kernel-dtb -G ~/dtb_backup.img jetson-tx2 mmcblk0p1
sudo ./flash.sh -r -k kernel -G ~/kernel.img jetson-tx2 mmcblk0p1
Now, dtb_back.img is renamed to correct dtb filename and I have flashed this file but still not able to boot. I have also mounted system.img.raw and copied the /boot/Image file and tried to flash this as new kernel image but this is also not helping.
The kernel.img that I cloned above is of 67MB (as compared to ‘/boot/Image’ file size of 20MB).
Previously I was able to simply clone and restore that image (system.img) in a different system with no issues but in this case I am not able to do that for some reason.
My understanding is that kernel partition contains only kernel image (i.e., /boot/Image) but their sizes are considerably different (is it a non-sparse image perhaps?).
Could you suggest anyway to be able to restore my system and get it working?
How can I flash kernel.img that is extracted above?