1

I am trying to run the system as an appliance style device (no monitor, keyboard, etc.) To keep the OS protected, I have made the root file system read only and moved config files and mysql to a separate partition which is then sym-linked from the RO root directories.

The system boots up and runs fine for awhile, but after a random amount of time (anywhere from hours to days) it crashes and damages the file system so it won't boot again. The last one says that there is a bad magic number in the file system of the root partition.

My question then is, how can a read-only file system get corrupted? Is there any way the kernel can write to it still, or must there be some other electrical issue going on to cause the problem?

Matt
  • 11
  • 2

4 Answers4

0

You cannot run Linux on a RO file system (without extensive reconfiguration). There are too many temp and log files etc.

What you can do is use a file system on a disk or USB Key. You need to change /boot/cmdline.txt so it uses the external storage.
Currently this will contain something like root=/dev/mmcblk0p2 rootfstype=ext4 which points to the SD Card

If you search this Forum you will find more detailed instructions.

Milliways
  • 54,718
  • 26
  • 92
  • 182
0

SD cards contain a chip which handles communication, data reads/writes, CRCs, wear levelling etc. This chip will be active whenever power is applied to the SD card. If it decides to do do wear levelling or another internal operation at the time that power is pulled that may cause a problem.

However anecdotal evidence suggests that some people seem to be immune whereas others suffer all the time from corrupted SD cards. Perhaps those who don't suffer have been lucky enough to buy original unfaked SD cards.

joan
  • 67,803
  • 5
  • 67
  • 102
  • I have verified that my SD cards are not faked, so I don't think that is the problem. Thanks for the reply. – Matt Sep 19 '14 at 17:29
0

sounds like power issues.

Please unplug everything and check the power test points.

Its also worth noting that USB power plugs often fail to supply the require 5v EVEN if they are labelled to do such.

My own experiments showed that a difference of just 0.15v(avg) was enough to cause sporadic stability issues, that would affect the image on the SD card.

rob
  • 2,793
  • 2
  • 20
  • 31
  • Well, the power supply level looks nice and stable, but I will keep an eye on that. Thanks for the suggestion and links. – Matt Sep 19 '14 at 18:12
0

I believe that the issue was a USB wireless adapter (Netgear N150 WNA1100) that I had plugged in and using as an access point for an iPad. I think that the transmitter was coupling and interfering with the hardware and causing the corruption. The solution was to get a USB extender cable to move the adapter further away from the board.

Matt
  • 11
  • 2