This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 443554 - Add "s" option to boot single user mode from grub command line
Add "s" option to boot single user mode from grub command line
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: event-compat-sysv (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Casey Dahlin
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-22 03:36 EDT by CHIKAMA Masaki
Modified: 2014-06-18 04:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-24 15:47:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description CHIKAMA Masaki 2008-04-22 03:36:58 EDT
Description of problem:
 Historycally we can boot with single user mode from grub command line
adding "s". But after changing to upstart, only "-s", "single" and "S" are
allowed. 

Version-Release number of selected component (if applicable):
 event-compat-sysv-0.3.9-13.fc9.noarch

How reproducible:
 always when type "s"


Steps to Reproduce:
1. enter grub menu
2. append "s" to command line
3.
  
Actual results:
default runlevel (3 or 5)

Expected results:
single user mode (1)

Additional info:
 Here is a proposed patch.
--- /etc/event.d/rcS~   2008-04-05 00:49:20.000000000 +0900
+++ /etc/event.d/rcS    2008-04-22 16:32:45.000000000 +0900
@@ -20,7 +20,7 @@
        [ -z "$runlevel" ] && runlevel="3"
        for t in $(cat /proc/cmdline); do
                case $t in
-                       -s|single|S) runlevel="S" ;;
+                       -s|single|S|s) runlevel="S" ;;
                        [1-9])       runlevel="$t" ;;
                esac
        done
Comment 1 Bill Nottingham 2008-04-22 11:21:25 EDT
I'm not sure why 's' worked before. From the init manpage:

Init accepts the following flags:

       -s, S, single
            Single user mode boot. In this mode /etc/inittab is examined  and  the
            bootup rc scripts are usually run before the single user mode shell is
            started.

From the code:
                if (!strcmp(argv[f], "single") || !strcmp(argv[f], "-s"))
                        dfl_level = 'S';

So, I don't think 's' was ever really supported.
Comment 2 Bill Nottingham 2008-04-22 11:22:43 EDT
Aha, found it:

                if (dfl_level == 's') dfl_level = 'S';

Yay for undocumented features.
Comment 3 CHIKAMA Masaki 2008-04-22 11:34:11 EDT
Which man page you are referring ?

On F8, LANG=C man 8 init said

       Runlevel S or s bring the system to single user mode and do not require
       an /etc/inittab file.  In single user mode, a root shell is  opened  on
       /dev/console.

$ rpm -qf /usr/share/man/man8/init.8.gz
sysvinit-2.86-18
Comment 4 Bill Nottingham 2008-04-24 15:47:25 EDT
Will be in 0.3.9-14.
Comment 5 CHIKAMA Masaki 2008-04-24 23:49:03 EDT
Sorry. Please ignore Comment #3.

And thank you for adding undocumented feature.
I've been using this option for over 10 years.
It's so thanksfull to keep compatibility.

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