Bug 1168664 - rc.sysinit needs to be more verbose
Summary: rc.sysinit needs to be more verbose
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: Jan Ščotka
Depends On:
TreeView+ depends on / blocked
Reported: 2014-11-27 14:32 UTC by Harald Hoyer
Modified: 2016-11-25 12:56 UTC (History)
3 users (show)

Fixed In Version: initscripts-9.03.47-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Initscripts are not particularly chatty. Consequence: When there was a hang during boot, administrator were not able to figure out what is going on from the last message. Fix: We have added couple more messages to rc.sysinit, but more importantly we have added new option for kernel cmdline "rc.debug" Result: When this option is used on kernel cmdline, ALL initscripts are started with "set -x" and its output is redirected to kmsg. So administrator can see which particular command hanged or took unusual amount of time. Footnote: This is really cool feature which makes rhel6 debugging much more easier.
Clone Of:
Last Closed: 2015-07-22 07:18:47 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1380 normal SHIPPED_LIVE initscripts bug fix update 2015-07-20 17:58:24 UTC

Description Harald Hoyer 2014-11-27 14:32:13 UTC
Hi Lukáš,

can you add more output to rc.sysinit. Especially after start_udev there are:

- dmsetup
- dmraid
- mdadm

calls, which do not have any "Starting" - "[OK]" messages. This often confuses admins, and udev gets the bug report, especially if the kernel clutters the console with output from all the devices.


Comment 1 Harald Hoyer 2014-11-27 14:38:13 UTC
You even might consider adding a kernel command line switch to activate "set -x" in rc.sysinit. That would help with debugging booting issues.

Comment 3 Lukáš Nykrýn 2014-12-01 09:35:22 UTC
(In reply to Harald Hoyer from comment #1)
> You even might consider adding a kernel command line switch to activate "set
> -x" in rc.sysinit. That would help with debugging booting issues.

Hmmm maybe we could use kernel "debug" option and log the output of all initscripts to kmsg :)

Ok, now seriously. Yes this is a good point and both of these things are easy to implement, so devel_ack+ fo 6.7.

Comment 4 Adam Thompson 2015-02-11 18:25:12 UTC
My $0.02... FWIW, I really wish there was a convenient way to log *all* the output of *all* initscripts.  Especially on remote systems where I don't have convenient access to the console, and doubly so when modesetting clears the scrollback buffer on the system so I can't see the last bits of output that typically didn't get logged anywhere.
So far, the only reliable solution I have is to use a serial console, and that's very difficult in many places.

Comment 5 Lukáš Nykrýn 2015-02-27 13:49:25 UTC
So I will go with this patch:

You can now turn the debug output for everything that sources /etc/init.d/functions and the log output will go to kmsg.

I have chosen kmsg, because in early boot we can't write to any file (well maybe we could create a log file in /dev/shm), I don't like logging to stdout and with kmsg we will get a timestamp for free.

Comment 9 errata-xmlrpc 2015-07-22 07:18:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.