Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 2001 23:24:55 -0800 (PST)
From:      "Crist J. Clark" <cjc@rfx-216-196-73-168.users.reflexcom.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/24592: dmesg.boot Gets Overwritten without Reboot
Message-ID:  <200101240724.f0O7Otw46375@rfx-216-196-73-168.users.reflexcom.com>

next in thread | raw e-mail | index | archive | help

>Number:         24592
>Category:       bin
>Synopsis:       dmesg.boot Gets Overwritten without Reboot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 23 23:30:00 PST 2001
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


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




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