From cjc@rfx-216-196-73-168.users.reflexcom.com  Tue Jan 23 23:24:49 2001
Return-Path: <cjc@rfx-216-196-73-168.users.reflexcom.com>
Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82])
	by hub.freebsd.org (Postfix) with ESMTP id 7CFBC37B69F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 23 Jan 2001 23:24:49 -0800 (PST)
Received: from rfx-216-196-73-168.users.reflexcom.com ([216.196.73.168]) by mailhost01.reflexnet.net  with Microsoft SMTPSVC(5.5.1877.197.19);
	 Tue, 23 Jan 2001 23:23:01 -0800
Received: (from cjc@localhost)
	by rfx-216-196-73-168.users.reflexcom.com (8.11.1/8.11.1) id f0O7Otw46375;
	Tue, 23 Jan 2001 23:24:55 -0800 (PST)
	(envelope-from cjc)
Message-Id: <200101240724.f0O7Otw46375@rfx-216-196-73-168.users.reflexcom.com>
Date: Tue, 23 Jan 2001 23:24:55 -0800 (PST)
From: "Crist J. Clark" <cjc@rfx-216-196-73-168.users.reflexcom.com>
Reply-To: cjc@rfx-216-196-73-168.users.reflexcom.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: dmesg.boot Gets Overwritten without Reboot
X-Send-Pr-Version: 3.2

>Number:         24592
>Category:       bin
>Synopsis:       dmesg.boot Gets Overwritten without Reboot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 23 23:30:00 PST 2001
>Closed-Date:    Sun Jun 18 21:17:35 GMT 2006
>Last-Modified:  Sun Jun 18 21:17:35 GMT 2006
>Originator:     Crist J. Clark
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
>Environment:

	Observed on FreeBSD 4.2-STABLE, but older versions and
5.0-CURRENT are also affected.

>Description:

	The file containing the kernel boot messages,
/var/run/dmesg.boot, will be overwritten when a user drops into
single-user mode and comes back up into multi-user without a reboot.

>How-To-Repeat:

	Drop into single-user mode and then go right back to
multi-user. Do not reboot.

  # ls -l /var/run/dmesg.boot
  -rw-r--r--  1 root  wheel  3623 Jan 17 19:35 /var/run/dmesg.boot
  # shutdown now
  <shutdown messages>

  Enter full pathname of shell or RETURN for /bin/sh: 
  # exit
  <startup, NOT boot, output>

  # ls -l /var/run/dmesg.boot
  -rw-r--r--  1 root  wheel  11188 Jan 23 22:05 /var/run/dmesg.boot

>Fix:

	Writing dmesg.boot is in the clean_var funnction of /etc/rc. I
am not familiar enough with init(8) and rc(8) to figure out how to let
/etc/rc know if we are going into multi-user after a fresh reboot or
from single-user without a recent reboot. I see a problem in telling
the difference between,

    reboot   -> single-user -> multi-user

Versus,

  multi-user -> single-user -> multi-user

That is, what state information can survive the single-user stage.


>Release-Note:
>Audit-Trail:

Taking over my own old PRs.

Responsible-Changed-From-To: freebsd-bugs->cjc 
Responsible-Changed-By: cjc 
Responsible-Changed-When: Sat Jul 21 13:57:34 PDT 2001 
Responsible-Changed-Why:  
Taking over my own old PRs. (And actually doing it the right way this time.) 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=24592 

From: Alan E <alane@geeksrus.net>
To: freebsd-gnats-submit@FreeBSD.org,
	cjc@rfx-216-196-73-168.users.reflexcom.com
Cc:  
Subject: Re: bin/24592: dmesg.boot Gets Overwritten without Reboot
Date: Fri, 7 Dec 2001 02:53:18 -0500

 Would there be a problem with simply backing it up before smashing it? Then 
 the sysadmin, who knows that single-user trashes his boot info, can restore 
 it manually if we go back to multi-user rather than down.
 -- 
 Alan Eldridge
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Mon Apr 3 01:31:33 UTC 2006 
State-Changed-Why:  
Is this still a problem with recent versions of FreeBSD? 


Responsible-Changed-From-To: cjc->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Apr 3 01:31:33 UTC 2006 
Responsible-Changed-Why:  
Reset PR assigned to inactive committer who has not responded to email. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24592 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Jun 18 21:17:19 UTC 2006 
State-Changed-Why:  
Feedback timeout (> 2 months). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24592 
>Unformatted:
