ALT Linux Bugzilla – #1324
telinit 1 boots into the default normal runlevel
Last modified: 2008-06-13 13:00:40
You need to
before you can comment on or make changes to this bug.
When I call \'telinit 1\' (as root), all the services are brought down as
exepcted. Then there is a pause, and after it some messages appear, among them
\'Telling INIT to go to single user mode\'. And after a short while a login
prompt appears: the system has been booted into runlevel 3 (the default). The
OK messages for the started services doesn\'t show up, but the service are
started (syslog logged this).
The same situation when I append \'1\' to the kernel command for GRUB: it boots
into runlevel 3 finally.
When \'single\' is appended, it is booted into the sungle user mode as
\'init S\' called from a root shell also asks for the root\'s password and
starts a root shell (I expect this to be the final step of \'telinit 1\').
$ rpm -q SysVinit initscripts
Surprisingly, removing \'exec \' in /etc/init.d/single made it work correctly.
(The patch is attached.)
Applied patch in 5.49-ipl45mdk
Can this be an error in /sbin/init? And the patch only implemets a
Unable to reproduce all these strange things.
I\'m going to revert this patch and add \"exec\" back to /etc/init.d/single.
Please check this \"exec\" thing again with SysVinit-2.84-alt5.
I\'m able to duplicate it with SysVinit-2.84-alt5, initscripts-5.49-ipl48mdk.
It happens always.
This time the behaviour is the same, no matter whether \'exec \' is present in
/etc/init.d/single: I\'m not able to boot into runlevel 1 (either with telinit
1 or appending 1 in GRUB).
Please provide as much information as possible, including your /etc/inittab
Tested with SysVinit-2.82-alt2.
With \'exec telinit -t1 S\' in /etc/init.d/single:
after telinit 1, it stops all services, writes \'telling INIT to go into single user mode\' and hangs, does nothing. SysRQ + T shows there 2 init processes and some k*.
After appending 1 in GRUB, it writes after the minimal start-up about going into single user mode, no more start up messages appear, and finally, the system has been booted into runlevel 3 (all the services started).
Without \'exec \': telinit 1 boots into runlevel 3 (as described: without messages). The same when appending 1 in GRUB.
Tested with SysVinit-2.84-alt4 again. The bahaviour is the same, no matter
whether \'exec \' is there. It writes \'Telling INIT to go to single user mode\' and after a while runlevel 3 is there (the login prompt), no start-up messages appeared before the login screen appeared.
1. Does -alt4 and -alt5 behaviour differ? -alt5 is preferred for testing.
2. Please restore CTRL-ALT-DEL default action for a while.
1. It seems, no.
2. will do it
Now I\'m using the /etc/inittab from initscripts-5.49-ipl48mdk and
SysVinit-2.84-alt5. Nothing changed: after \'Telling INIT to go to single user
mode\' no messages appear, but runlevel 3 is booted.
/etc/rc.d/init.d/single: remove exec (if any) and add smth like
right after telinit command. What\'s the rc?
But the result became less stable: in 1 of 5 tests, it went into single user mode! A kind of race?
So I appended these lines: $ tail -5 /etc/init.d/single
# Now go to the single user level.
echo \"Telling INIT to go to single user mode.\"
telinit -t1 S
sleep 5 && echo slept
and now the behaviour is stable and correct. telinit 1 brings the services down, prints \"Telling INIT to go to single user mode.\", \"rc=0\", then prints smth like \"Going SINGLE\" and asks for the password. After a while, \"slept\" is printed.
After I give \"exit\" command in the single user mode shell, the system goes into runlevel 3, with all the messages this time.
Appending 1 in GRUB also works fine.
Looks like a race.
Could you provide some info from your /proc/cpuinfo?
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 5
model name : Pentium II (Deschutes)
stepping : 2
cpu MHz : 400.917
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr
bogomips : 799.53
Never saw that...
*** This bug has been confirmed by popular vote. ***