Bug 24592

Summary: dmesg.boot Gets Overwritten without Reboot
Product: Base System Reporter: Crist J. Clark <cjc>
Component: binAssignee: Mark Linimon <linimon>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   

Description Crist J. Clark 2001-01-24 07:30:00 UTC
	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.

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.
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
Comment 1 Crist J. Clark freebsd_committer freebsd_triage 2001-07-21 21:57:34 UTC
Responsible Changed
From-To: freebsd-bugs->cjc

Taking over my own old PRs. (And actually doing it the right way this time.)
Comment 2 Alan Eldridge 2001-12-07 07:53:18 UTC
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
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2006-04-03 02:31:33 UTC
State Changed
From-To: open->feedback

Is this still a problem with recent versions of FreeBSD? 


Comment 4 Mark Linimon freebsd_committer freebsd_triage 2006-04-03 02:31:33 UTC
Responsible Changed
From-To: cjc->linimon

Reset PR assigned to inactive committer who has not responded to email.
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2006-06-18 22:17:19 UTC
State Changed
From-To: feedback->closed

Feedback timeout (> 2 months).