From owner-freebsd-hackers Wed Nov 27 16:44:12 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA25867 for hackers-outgoing; Wed, 27 Nov 1996 16:44:12 -0800 (PST) Received: from mail.vlsi.fi (vlsi24.hermia.sci.fi [195.74.10.147]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id QAA25861 for ; Wed, 27 Nov 1996 16:44:07 -0800 (PST) Received: (from smap@localhost) by mail.vlsi.fi (8.7.6/8.7.3) id CAA24090; Thu, 28 Nov 1996 02:43:48 +0200 (EET) Received: from vlsi1.vlsi.fi(193.64.2.2) by mail.vlsi.fi via smap (V1.3) id sma024088; Thu Nov 28 02:43:22 1996 Received: from layout.vlsi.fi by vlsi1.vlsi.fi with ESMTP (1.37.109.16/16.2) id AA147221735; Thu, 28 Nov 1996 02:42:16 +0200 Received: by layout.vlsi.fi (1.37.109.15/16.2) id AA220241735; Thu, 28 Nov 1996 02:42:15 +0200 Date: Thu, 28 Nov 1996 02:42:15 +0200 Message-Id: <199611280042.AA220241735@layout.vlsi.fi> From: Ville Eerola To: Joe Greco Cc: hackers@freebsd.org Subject: Re: Strange behaviour of a box. In-Reply-To: <199611271540.JAA19169@brasil.moneng.mei.com> References: <199611271540.JAA19169@brasil.moneng.mei.com> X-Mailer: VM Version 5.93 (beta) under GNU Emacs 19.29.6 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Joe Greco writes: > I have a box that is doing something quite strange. [...] > [...] > Changing root device to sd0a > WARNING: / was not properly dismounted. > > Automatic reboot in progress... > /dev/rsd0a: CLEAN FLAG NOT SET IN SUPERBLOCK (FIXED) > /dev/rsd0a: 1612 files, 8481 used, 6622 free (26 frags, 1649 blocks, 0.2% fragmentation) > > syncing disks... done > Rebooting... Hmmm... If I remember correctly, it has been usual that an Unix box will reboot immediately after fsck:ing the root partition (/dev/rsd0a) if it was modified by the fsck. Looking through /etc/rc one finds: = [...] = if [ $1x = autobootx ] = then = echo Automatic reboot in progress... = fsck -p = case $? in = 0) = ;; = 2) = exit 1 = ;; = 4) = reboot ^^^^^^ = echo "reboot failed... help!" = exit 1 = ;; = [...] And in /usr/src/sbin/fsck/main.c: /* * We modified the root. Do a mount update on * it, unless it is read-write, so we can continue. */ if (statfs("/", &stfs_buf) == 0) { [...] } if (!preen) printf("\n***** REBOOT NOW *****\n"); sync(); return (4); So I think that this explains your extra reboots... On the other hand I haven't noticed this behaviour very often when my box was rebooted spontaneously. Not that it is a common occurance :-) Regards, Ville -- Ville.Eerola@vlsi.fi VLSI Solution Oy Tel:+358 3 3165579 Hermiankatu 6-8 C Fax:+358 3 3165220 FIN-33720 Tampere, Finland