I have flashed it using tftpd. NOW thing is whenever i reboot or shutdown the router it loses all the configuration.First tftp then i did a sys upgrade "openwrt-mr3420v5-GO2019-03-10-samba-upgrade" please help.
You're using a custom image that has too much crammed into it, going by the custom image name.
Note how your df output clearly shows your overlay missing (it's tmpfs in your case - ie RAM).
Check logread for pointers, pretty sure there's messages in there about there not being enough free blocks to set up a JFFS2 overlay and falling back to RAM.
Given the 6 MB rom size, I'm pretty sure that there is also a considerable amount of user (runtime-) installed packages on top, enough to overflow the overlay and make it unable to mount.
what should i do? i wanted the ROOter image so that my jiofi(usb dongle) can provide internet for longer period as on the stock firmware it keeps crashing?
i installed the "openwrt-18.06.4-ramips-mt76x8-tplink_tl-mr3420-v5-squashfs-tftp-recovery.bin"
and it did not lose any config even after power off but cannot access internet as it somehow does not get internet from usb dongle.
Is the expected result, you don't have enough free space (>=3 erase blocks) for the overlay. The options are to go for a device with more flash - or to reduce the size of your firmware. For a 4/32 device, only the former is a viable option, while yours (h/w rev v5) seems to be a 8/64 one, that still is rather little for the amount of software you want to install.
thanks for quick reply. i cannot buy a new device as i recently purchased this and another stuff for my homeserver. how can i reduce the size of firmware?