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

Joseph Mack NA3T jmack at wm7d.net
Tue Sep 18 17:27:41 EDT 2012


On Tue, 18 Sep 2012, Kevin Hunter wrote:

> but could this have something to do with attaching or not 
> attaching a tty

Hi Kevin, Alan, Igor,

I swapped env's and shells without effect.

I assumed it was the embedded setup, which has limited 
functionality for many of the executables, to make them 
smaller. I moved to the laptop to get the same problem (to 
my surprise). At least the laptop was easier to work with 
than the wap. Trying a smaller thumbdrive didn't fix it 
either.

I had originally wondered about the terminal, then thought 
"nah, why would fsck need a term?" I grew up in the days 
when a computer ran without a terminal. Certainly fsck 
doesn't need one, it's just fixing the disk and will exit 
with error codes if there are problems it can't handle. The 
operator checks the log files (in my case the script was 
writing to /var/log/messages with logger). It's only in 
windows that otherwise self contained programs need a user 
to answer "are you sure?".

Then I got Igor's e-mail. It turns out that fsck has been 
deliberately crippled; it now requires a tty (or something) 
so that it can show the spinning bars to the user. If it 
doesn't find a term, instead of just getting on with 
fsck'ing as it was told, it exits instantly with the 
ininformative error message "operational error", rather than 
"can't find tty".

Now I see why all the people, who were getting error code 8 
with fsck, were getting them inside cron or on bootup with 
no terminal.

I gave fsck the -p option (go about your business without me 
holding your hand) and now it works.

Thanks. I would never have figured this out.

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