balena etcher cli installation in raspberry pi

Hi All
i have tried installing balena-etcher-electron_1.5.63_Raspbian_Buster_armhf.deb it was successful. After that i tried to flash one image on sd_card inside raspberry Pi which is already flashed with raspberry OS using balena local flash image command.After selecting drive im getting error like
EBUSY: resource busy or locked, open ‘/dev/mmcblk0’
need help to resolve the issue

Hi there, apologies if I’ve mis-understood - you tried to flash an sd card that was already in a raspberry pi, which the raspberry pi had booted from, with another OS image - while the pi was running?

I wouldn’t expect this to work smoothly if this is the case - but correct me if I’ve misunderstood

Exactly u understood it correctly. If we need to extract another image how we can do that in raspberry pi. Is their any way to do that

Let me try to understand your use case a little more

  1. You want to flash an image (the “2.118.15.img”?) to an SD card - I can understand that much
  2. You want to flash it to an SD card that a raspberry pi has already booted from - from the same pi - is this necessary? Is there something preventing you from flashing this SD card from another device? Does this overwrite have to happen?
  3. What is the end goal of your use case

Things that I’d provisionally recommend before I have further understanding:

  1. Flash the SD card from a laptop or other machine with 2.118.15.img before putting it in the pi, this
  2. use a usb-sd sd card adapter to flash a second sd card from the pi, instead of overwriting the one that the pi has booted from
  3. (complicated, but I’ve seen it done before) - use network boot to boot the PI from the network, and flash the SD card from there - that way you won’t be overwriting the OS that the device has booted from