more robust file system settings ?

I am using Robert Nelson’s Ubuntu system on a Beagle Board C5 in an embedded control application.
I just had one of the units fail to boot correctly, and had to plug the SD card into a desktop and run fsck
on it. I have it set up with ext4. Are there any settings that will make it more robust to unscheduled
power shutoffs? I may be able to get people to use shutdown or halt before powering off, but I
can’t assure they will do that all the time.

Thanks,

Jon

Simple: Backup power supply...

little work: setup root to be ro:
http://wiki.debian.org/ReadonlyRoot

Takes a little work, as you'll have to carve up your existing sd card
into a couple partitions, but once done, it's very solid..

Regards,

Simple: Backup power supply…

Completely impossible, this is an embedded system the size of a paperback book.

A previous system we built for the C3/C4 boards has been stable with uncontrolled shutoffs for
several years. I don’t think we did anything special other than use EXT3.

little work: setup root to be ro:
http://wiki.debian.org/ReadonlyRoot

Takes a little work, as you’ll have to carve up your existing sd card
into a couple partitions, but once done, it’s very solid…

I’ll look into it, thanks!

Jon

>
> Simple: Backup power supply...
>
Completely impossible, this is an embedded system the size of a paperback
book.

Rather not impossible.

Get yourself something like this [1] from Ultralife. At 0.9 Ah, should
provide about 2 hours of idle run time (based on my tests with larger
2.4 Ah Ultralife batteries getting >5 hours run time on a bone A5).

It'll fit between the P8 and P9 headers on the bone. They're under $10
in reasonable quantities. I'm sure you can find a reseller selling them
(or similar) for under $20 in one unit orders.

[1]:
http://ultralifecorporation.com/be-commercial/products/rechargeable/ubp002/

A previous system we built for the C3/C4 boards has been stable with
uncontrolled shutoffs for
several years. I don't think we did anything special other than use EXT3.

It depends on when the power goes away. If you're doing file system
writes, especially on very important files, the journal "should" save
you. Depending on what SD card you use, some may not flush to
permanent flash as quickly as you desire, meaning that the OS may think
things have been written properly to disk but in reality they haven't
because the SD card is abstracting away some things that actually do
matter.

If you need your SD card to act like a hard disk, research that and buy
one that does. Or use raw NAND flash.

If you want cheap mass market SD cards, either battery back your bone,
or deal with possible file system corruption when power goes away
unexpectedly.

> little work: setup root to be ro:
> http://wiki.debian.org/ReadonlyRoot
>
> Takes a little work, as you'll have to carve up your existing sd card
> into a couple partitions, but once done, it's very solid..

Only issue I see there is software updates (apt and friends) may need
those partitions to be rw in order to operate usefully. But if you're
willing to deal with that (remounting rw before running apt, then
remounting ro again after), read only root could be useful.

-Andrew