From owner-freebsd-questions Sat May 2 17:18:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA11972 for freebsd-questions-outgoing; Sat, 2 May 1998 17:18:57 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from freebie.lemis.com (freebie.lemis.com [139.130.136.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA11958 for ; Sat, 2 May 1998 17:18:46 -0700 (PDT) (envelope-from grog@lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id JAA03260; Sun, 3 May 1998 09:48:39 +0930 (CST) (envelope-from grog) Message-ID: <19980503094838.A3202@freebie.lemis.com> Date: Sun, 3 May 1998 09:48:38 +0930 From: Greg Lehey To: Suttipan Limanond Cc: FreeBSD Questions Subject: Re: What cause automatic reboot? References: <3549F70B.184F@enws626.eas.asu.edu> <19980502104811.C318@freebie.lemis.com> <19980502084915.15690@lymatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <19980502084915.15690@lymatech.com>; from Suttipan Limanond on Sat, May 02, 1998 at 08:49:15AM -0500 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 " > > 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