Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 May 1998 09:48:38 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Suttipan Limanond <limanond@enws626.eas.asu.edu>
Cc:        FreeBSD Questions <questions@FreeBSD.ORG>
Subject:   Re: What cause automatic reboot?
Message-ID:  <19980503094838.A3202@freebie.lemis.com>
In-Reply-To: <19980502084915.15690@lymatech.com>; from Suttipan Limanond on Sat, May 02, 1998 at 08:49:15AM -0500
References:  <3549F70B.184F@enws626.eas.asu.edu> <19980502104811.C318@freebie.lemis.com> <19980502084915.15690@lymatech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat,  2 May 1998 at  8:49:15 -0500, Suttipan Limanond wrote:
> On Sat, May 02, 1998 at 10:48:11AM +0930, Greg Lehey wrote:
>> On Fri,  1 May 1998 at  9:23:39 -0700, Suttipan Limanond wrote:
>>> Hi:
>>>
>>> Is there a way to check what is the cause of automatic rebooting?
>>> This morning when I came to work on the computer, the screen was frozen
>>> with reboot message. Part of the message said that / is not properly
>>> dismounted. My guess is that somethings bad must have happened last
>>> night. I just do not know what it is. The same thing happened the night
>>> before (but the symptom was different: the blank screensaver was frozen
>>> after leaving the PC on overnight).
>>> I used to be able to leave the PC on without any problem at all.
>>
>> It could be a hardware problem, or it could be something started by
>> cron.  The first thing would be to look at /var/log/messages and see
>> when the last message was written.  If it's consistent, you could look
>> for a cron job started some time after that.  If you don't have many
>> console messages, you could try the -m option to syslogd, which will
>> issue "mark messages" at regular intervals.
>>
>> Apart from that, it's a difficult problem.  It's a "can't happen"
>> situation which we can't adequately analyse.

Suttipan, please remember to copy the -questions list on your replies.
Other people may want to know too, and it's not guaranteed that I'll
be available to answer the message if you send it only to me.

> Thanks for the tip. It turned out that the system crontab cause the problem.
> The culprit is the command "/etc/daily 2>&1 | sendmail root" run at
> 2 AM in the morning.
>
> When I typed this command in, the error message is
>
> "/usr: bad dir, ino 70579 at offset 0; mangled entry .....
> resync <snip>"
>
> Then, automatic rebooting. However, "daily" contains a bunch of
> commands and I have no idea how to pinpoint the problem any further.
>
> If you have any suggestion, please kindly let me know.

Well, /etc/daily isn't the "culprit", it just finds the problem.  The
real problem is that you have corruption in your /usr file system.
You need to at least seriously fsck your /usr file system, but it
looks as if that won't do it, since it happens on a reboot.  The other
possibility is to find the directory and try to remove it.  Try this,
preferably in single-user mode:

 # mount /usr
 # find /usr -type d | xargs ls -ldi | grep ^70579

This will find all directories on /usr, list them with the inode
number at the beginning of the line, and extract lines with the text
70579 at the beginning.  Let us know what comes out.

While you're waiting, you can of course disable /etc/daily in your
/etc/crontab.  Find the following line and add the # at the beginning
of the line:

# 0       2       *       *       *       root    /etc/daily 2>&1 | sendmail root

Greg
--
See complete headers for address and phone numbers
finger grog@lemis.com for PGP public key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980503094838.A3202>