Hi,
I am exploring BalenaOS for the first time and flashed the BalenaOS 2.51.1 rev1 using a Raspberry 3.
I wanted to change/install a new device using the same SD card. I have downloaded the new image and wanted to flash using BalenaEtcher but with no success with the following error: PhysicalDrive1:EPERM : operation not permitted, write.
I have tried to format the SD card using Linux and Win 10 tools/commands but no luck.
Any recommendations or suggestions would be very appreciated.
Yes, I have created an application on Balena Cloud and added a RPi as a new device by using the Etcher to flash the image. Everything worked fine. I was seeing the device online and was able to communicate with the device successfully.
I wanted to use the same SD card and burn a new image with Etcher (tried with Rufus as well) but with no success. SD card still works fine when I plug it back into the RPi. I cannot format this SD anymore. Is there anything on the BalenaOS that locks the SD and makes read-only and not be able to be formatted.
Hi @kyakouty – thanks for the additional detail. I can confirm that nothing in balenaOS or Etcher locks the SD card, makes it read-only, or prevents it from being formatted.
Hi @kyakouty – thanks for checking. Just to be double-sure, could you try turning on that lock/write-protection switch, then turning it off again? Sometimes the switch can behave badly. If that still doesn’t fix the problem, let us know and we’ll continue from there.
Hi Hugh,
As you have instructed, I have turned the switch on and off but with no success. I have also inserted the SD card in USB reader and same result.
Thanks
Hi there, are you able to open the SD card device (disk) with Windows diskpart.exe by any chance? If so, are you able to re-initialise it from there (i.e. delete the partitions)?
Yes I have tried the diskpart.exe and could not delete the partition with the command. I receive an Access Denied error message. I have also tried with GParted on Linux and no luck either.
Thanks
Hi Kamal, just to add one other additional bit of info here, I have experienced this same behavior several times in the past, and in each case it ended up being that the SD Card has a built-in mechanism for gracefully handling it’s death. Several times I have noticed, that a card will flip an internal flag that cannot be cleared no matter what, if it detects bad blocks or corruption. Some posts seem to indicate it’s a protection measure to allow to continue accessing the data, which is nice in a way, but also creates confusion when you get into a situation such as this. So, while I can’t say for certain, it is actually possible your card has died, but is still in a “semi-functional” state allowing your to read data from it, but not write to it. Coming full circle, neither Etcher or balenaOS do anything that prevents re-writing an SD Card however. In fact, I do this several times per day while testing.