[TriLUG] e2fsck under cron gets retcode=8 operational error

Joseph Mack NA3T jmack at wm7d.net
Thu Sep 20 23:34:46 EDT 2012


On Tue, 18 Sep 2012, Igor Partola wrote:

> Not familiar with fsck or cron enough to say for sure, but could this have
> something to do with attaching or not attaching a tty? Login vs
> non-interactive shell? Are you getting the stderr and stdout from the
> failed process emailed to you by cron?

have been using

e2fsck -p

which is the option you're supposed to use when booting

instead of

e2fsck -f (or -yf)

which was exiting immediatly with error code 8, apparently 
because there was no tty.

-p fixes problems that can be fixed without human 
intervention (eg journal)

However with the thumbdrive being mounted and umounted every 
5 mins, the mount count goes up and eventually the thumb 
drive won't mount at all. -p doesn't reset the mount count, 
but -f would if it didn't exit with an error code.

There isn't a package for tune2fs, which would reset the 
mount count. I would have to cross-compile it up, which I'll 
do if I have to. I would rather that e2fsck handled it. Here 
are the options available to e2fsck in OpenWrt

  -p                   Automatic repair (no questions)
  -n                   Make no changes to the filesystem
  -y                   Assume "yes" to all questions
  -c                   Check for bad blocks and add them to the badblock list
  -f                   Force checking even if filesystem is marked clean
  -v                   Be verbose

Any ideas on running e2fsck -f, without a tty, on a clean 
disk, to reset the mount count?

Thanks Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the TriLUG mailing list