Using the BBB in an embedded system, power down issues

Now I’ve been messing about with the BBB as I am looking at writing my own Aquarium controller but in Linux.

I currently use Arduinos for my tinkering but wanted to play with the BBB as we are doing more linux at work so figured I’d have a go. I’m an embedded engineer but haven’t really done any linux development.

Now I’m thinking maybe Linux and the BBB isn’t going to work for the application. Twice in the last few days I seem to have corrupted the eMMC by pulling the power out rather than shutting linux down. I’ve done it agina this evening by turning the power off at work and bringing it home. Now I just have ‘C’ characters coming out of the debug port so it looks like corruption again.

Now for the aquarium controller it’s very possible the power will get pulled, either by the user, or a power failure. So am I wasting my time with the BBB and Linux, or is there an easy way to prevent the issue?

Easy way? . You can add a battery, send and interrupter when main power pulled and let Linux shut down. You can try making the filesystem red only.

Gerald

or mark the filesystem as read only. Or boot from a tftp / nfs server, or . . .

Lots of options. well a few anyhow.

Presumably there would have to be a section of the filesystem marked RW for logging etc?

OK so chatting to a colleague here he’s using a RPi and he pulls the power on that all the time and has never had an issue.

So what would be the cause of the BBB corrupting the filesystem and not the RPi?

I don’t see how using a RPi or an x86 is going to solve the issue, neither of the two give me easy access to a screen and IO like the BBB.

I probably should have stated that this is with the standard angstrom release. 2013-8-20 I think I have.

I do not think it is a hardware problem. More likely it is a software, or fstab setting related problem. Personally I have experienced this issue early on, but once I started working on and using a different custom kernel, and thus my own fstab settings this problem has stopped happening.

Granted, I almost always issue shutdown now -r/-h, but whenever I try to hotplug the sdcard, the system does lock up within a minute after trying to send via ssh. Also, I netboot from a tftp / nfs server. So that may have something to do with it as well.