What’s the best way to clone a J4012 running Jetpack 6.1? I had a way to do it with Jetpack 5.1.2 in the past (basically just copy the rootfs, run l4t_create_default_user.sh, then run the l4t_initrd_flash.sh --external-device nvme0n1p1
etc… command). Now with Jetpack 6.1, Seeed provides the mfi_recomputer-orin-j401 BSP/flashing package and uses this command for flashing, which is somewhat different: sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 1 --network usb0 --showlogs
Update to this question:
I have found that I can just use the backup-restore script and it works well; however, only if I use the same NVME drive. If I try to clone to a smaller drive than the one I imaged from, then it throws errors (Error: Unable to partprobe /dev/nvme0n1
). I tried tweaking the nvpartitionmap.txt for the smaller drive, but it didn’t work. I’m wondering if someone has a procedure for cloning from a larger drive to a smaller one (could be with backup-restore, or some other way).
Using backup-restore.sh
on a Smaller Drive is not recommended.
Manually edit tools/backup_restore/nvpartitionmap.txt
with smaller sizes.
Recreate GPT image using tools/kernel_flash/gen_gpt_secondary.py
Replace the gpt_backup.img
in the BSP folder.
Use:
sudo ./tools/backup_restore/restore_backup.sh -d /dev/nvme1n1 -b <path-to-backup>
But expect problems unless you deeply understand partition alignment and bootloader placement.