In the last couple of years, we have seen tons on manufacturers developing single board computers and systems on modules.
In order to make the cost lucrative, they many a times have SD card interface and the same SD Card is used for OS.
Keeping OS on the SD card creates a couple of challenges which are very well known. The two most challenging ones are:
SD Card is prone to vibration as it connected using SD Card connector.
This can be solved by securing SD card using some mechanism which will ensure that SD card will not move in case device encounters vibration.
Second issue is while operating the SD card File systems getting corrupted.
Is it important to understand why this corruption happens.
While System is running and there is a power loss, SD Card can get corrupted.
So, what is the solution?
We need to add a small DC power back up for the board so that when power fails, processor will get power from the power backup circuit and also get some indication over GPIO so that Processor can initiate a peaceful shutdown of the Linux.
You can consider solutions like this: https://iiot-shop.com/supercap-ups-backup-power-supply-for-raspberry-pi-esp32-based-iiot-devices/, when power fails this unit will give the indication on RPI GPIO so your software can initiate a graceful shutdown
For cost optimization, in high volume requirement , one can custom design the power back up solution.
Also, it is always recommended to use Industrial-grade SD Card for commercial products.
Another thing which developer should do is, partition the Linux OS is such a way that Linux OS is on one partition and data is on another partition. Make the partition with Linux OS read-only so as to avoid any corruption issues.
For commercial products, it is highly recommended to use single board computer or system on module which supports OS on NAND or eMMC.
I hope above information helps you build a reliable product.
If you have any feedback, you can share it in the comments section or you can also contact me directly.
Read more interesting articles on Embedded Systems Design.
If you need help on custom embedded product development, do reach out to me.