In cases where you generate an image from JetPack/SDK Manager, the sample rootfs in “Linux_for_Tegra/rootfs/” normally is just Ubuntu with packages added via “sudo ./apply_binaries.sh” (NVIDIA-specific drivers on top of an otherwise unmodified Ubuntu 18.04)
During a flash on command line with “sudo ./flash.sh jetson-nano mmcblk0p1” a file is generated which becomes the rootfs, seen in sparse form at “bootloader/system.img” (raw form at “bootloader/system.img.raw”). Aside from some “rootfs/boot/” additions/edits, this is mostly an exact clone of “rootfs/”. If you have an image, and you place it in “rootfs/” instead of the sample rootfs, then you will get this after the flash is done.
Method 1: Put your raw content in place of the sample rootfs at “rootfs/” (but be very careful to preserve permissions. Allow an image to be generated from this, along with whatever the “/boot” edits are. It doesn’t hurt to run “sudo ./apply_binaries.sh” again, but it also doesn’t help…a running system already has that content.
Method 2: Put a binary rootfs clone image in at “bootloader/system.img” (from either an SD card partition dd or a clone of eMMC), and then flash with the “-r” option to flash.sh. The “-r” option says to reuse whatever system.img is there, and to not generate a new one. If the image size is not the default, then you may need to specify this. However, the basic flash would become:
sudo ./flash.sh <b>-r</b> jetson-nano mmcblk0p1