Bug 681357 - kernel parameter "emergency" ignored
Summary: kernel parameter "emergency" ignored
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 743047
TreeView+ depends on / blocked
 
Reported: 2011-03-01 22:18 UTC by Dax Kelson
Modified: 2018-11-14 09:44 UTC (History)
6 users (show)

Fixed In Version: initscripts-9.03.26-1.el6
Doc Type: Bug Fix
Doc Text:
Consequence System doesn't run into 'sulogin' if parameter 'emergency' is appended to kernel command line. Fix rcS was changed to handle 'emergency' argument and rcS-emergency job was added Result init will immediately run a 'sulogin' before rc.sysinit if 'emergency' is added to kernel command line
Clone Of:
Environment:
Last Closed: 2011-12-06 18:09:14 UTC
Target Upstream Version:


Attachments (Terms of Use)
screenshot of emergency in action on RHEL5 (12.29 KB, image/png)
2011-03-01 22:48 UTC, Dax Kelson
no flags Details
add rcS-emergency.conf (1.38 KB, patch)
2011-03-08 09:06 UTC, Petr Lautrbach 👨
no flags Details | Diff
add 'emergency' target (1.27 KB, patch)
2011-09-15 16:18 UTC, Petr Lautrbach 👨
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1528 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2011-12-06 01:02:05 UTC

Description Dax Kelson 2011-03-01 22:18:16 UTC
Description of problem:
In RHEL5 and below you can append "emergency" to the kernel command line and init will immediately run a "sulogin" even before it runs rc.sysinit.

This no longer works with RHEL6. Please fix.

Comment 2 Dax Kelson 2011-03-01 22:48:33 UTC
Created attachment 481732 [details]
screenshot of emergency in action on RHEL5

Comment 3 Petr Lautrbach 👨 2011-03-08 08:59:16 UTC
I could imagine patching upstart to run /sbin/sulogin same as sysvinit but
according to https://bugzilla.redhat.com/show_bug.cgi?id=455763#c3 this would be rather covered by initscripts setup.

Comment 4 Petr Lautrbach 👨 2011-03-08 09:06:27 UTC
Created attachment 482855 [details]
add rcS-emergency.conf

This patch adds task rcS-emergency which is run before rc.sysinit if emergency is passed to kernel

It has one big issue - if user change runlevel, run reboot or shutdown in this emergency mode it tends to unpredictable results because rc.sysinit is not run. 

User need to exit shell and continue in boot, or run 'reboot -f' to correctly exit emergency.

Comment 5 Bill Nottingham 2011-03-08 16:24:16 UTC
This is already relying on a working shell setup to parse the command line, etc., so it might be simpler to just do it in rcS itself, rather than dealing with another job.

Comment 6 Petr Lautrbach 👨 2011-03-09 13:06:51 UTC
rcS has 'console output' while sulogin needs 'console owner' 

change to 'console owner' in rcS breaks init 1 on (virtual) serial console:
+ exec /sbin/sulogin
uart_close: bad serial port count; tty->count is 1, port->count is 0
.. and boot continues

Comment 7 Bill Nottingham 2011-03-09 15:59:44 UTC
... that sounds like an error somewhere else (That's a kernel message.)

Comment 8 RHEL Product and Program Management 2011-04-04 02:11:22 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 12 Petr Lautrbach 👨 2011-07-12 12:59:22 UTC
(In reply to comment #6)
> rcS has 'console output' while sulogin needs 'console owner' 
> 
> change to 'console owner' in rcS breaks init 1 on (virtual) serial console:
> + exec /sbin/sulogin
> uart_close: bad serial port count; tty->count is 1, port->count is 0
> .. and boot continues

This is somehow related to plymouth. init 1 works well with rd_NO_PLYMOUTH in kernel command line. 

With "start on runlevel RUNLEVEL=[S1] ..." in quit-plymouth.conf bad serial port message still appears but shell in runlevel 1 is run as expected.

Comment 13 Petr Lautrbach 👨 2011-09-15 16:18:35 UTC
Created attachment 523401 [details]
add 'emergency' target

This patch handles 'emergency' target without straight in rcS job.

Since rcS became console owner, there has to be hide of plymouth splash for runlevels 1 and S to avoid race with plymouth

Comment 19 Petr Lautrbach 👨 2011-10-14 13:41:48 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Consequence
    System doesn't run into 'sulogin' if parameter 'emergency' is appended
to kernel command line.

Fix
    rcS was changed to handle 'emergency' argument and rcS-emergency job 
was added 

Result
    init will immediately run a 'sulogin' before rc.sysinit if 
'emergency' is added to kernel command line

Comment 20 errata-xmlrpc 2011-12-06 18:09:14 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.

http://rhn.redhat.com/errata/RHBA-2011-1528.html


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