Flashing my tx2-nx

Not possible. The flash process does not care about what was pre-installed on it. Recovery mode is also pure hardware-triggered event.

when i connected new device now it is showing a prompt you don’t have enough space in the directory sda4 but that is a file!

Not quite sure what you mean here.

i was not getting this everytime but when i connected a new device with sd card i got this pop-up

Just means your host machine has no enough disk space on /dev/sda4.

Thank you @WayneWWW done with the falshing i was using the devkit version of tegra then I switched to custom i was able to flash my device!

Now I need to set my custome docker in it and get its image can you explain me in brief the process of doing it?

can i install my docker in all the devices in mass flash tbz2 so that it would be very much time efficient work ,flashing and pulling every time can be skipped?

do i need to install sdk components after flashing my device using mass flash? or they will be installed through that process?

I can’t answer mass flash questions, but the basic process for JetPack/SDK Manager is to flash using a base image generated from “Linux_for_Tegra/rootfs/” (plus “rootfs/boot/” content copied in at the last moment), and this does not include packages for optional software, e.g., CUDA. The flash completes, and then the Jetson reboots (and no longer is in recovery mode, but is instead operating normally). It is then that ssh is used for installing those components.

However, if you have a clone of a system which has the packages you desire, and you tell flash to “reuse” the image, where that image is the clone, then you get everything with that flash without ever generating the default image (it skips image build since you’ve specified it). Do beware though that this also clones things like passwords and user accounts. The clone is simply copied to “Linux_for_Tegra/bootloader/system.img” prior to flash (any failure to use the “reuse”/"-r" option will overwrite your system.img).

unable to install multimedia here are the logs

failed_multimedia_SDKM_logs_JetPack_4.5.1(rev.1)_Linux_for_Jetson_Nano_2022-06-13_00-52-58.zip|attachment (1.2 MB)

Hi,
If your rootfs is on emmc, the size is 16 GB and not enough for installing whole SDK components. We would suggest move the rootfs to NVMe SSD. May refer to this wiki page:
Jetson/L4T/Boot From External Device - eLinux.org