Bug 719398

Summary: No /var/log/dmesg with systemd init
Product: [Fedora] Fedora Reporter: Chris Adams <linux>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: antonio.montagnani, bbaetz, harald, iarlyy, initscripts-maint-list, jonathan, kernel, leigh123linux, lnykryn, notting, plautrba, rvokal, smconvey
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-13 09:59:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Chris Adams 2011-07-06 17:38:03 UTC
When using systemd, the kernel boot messages are not dumped into /var/log/dmesg.  With the old sysv-style init, /etc/rc.d/rc.sysinit included:

# Now that we have all of our basic modules loaded and the kernel going,
# let's dump the syslog ring somewhere so we can find it later
[ -f /var/log/dmesg ] && mv -f /var/log/dmesg /var/log/dmesg.old
dmesg -s 131072 > /var/log/dmesg

This is very useful to have; a single file with the boot messages that is not logrotated away.

Comment 1 leigh scott 2012-02-06 09:02:15 UTC
*** Bug 787575 has been marked as a duplicate of this bug. ***

Comment 2 Fedora End Of Life 2013-01-16 16:07:35 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Chris Adams 2013-01-16 17:06:20 UTC
Still an issue in F18.

Comment 4 Lukáš Nykrýn 2013-03-13 09:59:29 UTC
These logs can be found in journal, in F19 it should be set as persistent, so closing this as solved in RAWHIDE.

Comment 5 Lukáš Nykrýn 2013-03-13 10:04:43 UTC
But if you want it there you can create something like:
::::::::::::::
/etc/systemd/systemd-dmesg
::::::::::::::
#!/bin/bash
[ -f /var/log/dmesg ] && mv -f /var/log/dmesg /var/log/dmesg.old
dmesg -s 131072 > /var/log/dmesg

::::::::::::::
/etc/systemd/system/dmesg.service
::::::::::::::
[Unit]
Description=Dump dmesg to /var/log/dmesg

[Service]
Type=oneshot
ExecStart=/etc/systemd/systemd-dmesg
RemainAfterExit=yes

[Install]
WantedBy=basic.target

Comment 6 Harald Hoyer 2013-03-18 11:46:27 UTC
$ journalctl -ab