I'm trying to use Ubuntu 10.04/32 in an embedded environment with no keyboard attached. Power interruption is expected and happening quite often. Right now I get a splashscreen requiring some keyboard input, if some ext3 partition gets corrupted. I need that to be handled automatically, without any user input. What is the best strategy for dealing with this?
-
What error are you getting exactly? Is it an actual file system error, or just the regular checks that occur after a given number of times the file system has been mounted?– James HenstridgeMay 31, 2011 at 13:37
-
It is an actual filesystem error, provoked deliberately by pulling the plug on system shutdown.– zeroc8May 31, 2011 at 14:51
-
Be sound, unmount!– Stefano PalazzoMay 31, 2011 at 15:30
2 Answers
The best strategy is to prevent a disaster;
UPS (uninterruptible power supply) - keeps mission critical systems operational during main power supply outages.
Test bench the solutions before using in a production/critical enviornment
Edit the fstab entries to disable fsck:
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=blah / ext4 defaults 0 0
The important part is 'defaults 0 0' - that will mount it without doing checks and is the same on ext3.
For when you are able to do a managed upgrade (and need to do the diskcheck) simply:
sudo touch /forcefsck
That will force the fsck just the once on the next reboot.
-
I guess I will disable fsck and add a mainenance item in my app to check the filesystem on reboot once in a while.– zeroc8May 31, 2011 at 17:39
-
The other thing is to leave those old kernel entries on the boot because sometimes they can magically rescue a failed, 'disk not recognized, down to Busybox level' boot situations.– MathewMay 31, 2011 at 17:43