Red Hat Bugzilla – Bug 447216
Can't set default init level to 5; booting with init=5 fails
Last modified: 2014-03-16 23:14:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:18.104.22.168) Gecko/20080416 Fedora/22.214.171.124-1.fc8 Firefox/126.96.36.199
Description of problem:
I can't set my default init level to 5. First, some background: I have to boot without rhgb (otherwise X crashes; see bug #446307). Without rhgb, when I boot, it boots to init level 3 and I get to a text console with a login: prompt. I can log in and run "telinit 5" or "startx" and that will successfully start X. However I can't seem to figure out any way to cause the system to boot to init level 5.
I've tried editing my /etc/inittab file to change initdefault to 5 (it was previously 3 in the version of the file that was automatically installed by yum). However that had no effect.
I also tried editing the kernel arguments in grub when I boot, to set "init=5" as a kernel argument. That caused the boot to fail with the following error:
WARNING: Can't access 5
exec of init(5) failed!!!: No such file or directory
booting has failed
/bin/sleep: invalid option -- '1'
try `/bin/sleep --help' for more information.
Kernel panic - not syncing: Attempted to kill init!
In case it is relevant, here are some of the packages that I have installed:
The installation path: I first installed Fedora 9 Beta as a fresh install, then upgraded to Fedora 9 by doing a "yum upgrade". I have run "yum upgrade" and accepted all updates. The system used to work fine in Fedora 9 Beta (rhgb worked fine, it booted into run level and started X fine, etc.) so this appears to be some kind of regression introduced between Fedora 9 Beta and Fedora 9.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Boot without rhgb [optionally: with the kernel argument "init=5"]
2. Has X started?
No, X has not started. [if "init=5": boot fails with the error message given above]
Yes, X should have started. [if "init=5": and, init should not have failed]
By the way, see this thread for more information about my attempts to resolve
and information on the contents of my /etc/inittab file.
init=5 isn't valid - that's saying to use the file named '5' as the init
command. You just want to pass '5'.
fedoraforum appears to be having issues at the moment. Can you paste your
/etc/inittab file here?
(In reply to comment #2)
> fedoraforum appears to be having issues at the moment. Can you paste your
> /etc/inittab file here?
Right now my /etc/inittab has exactly one non-comment line:
This is a result of my editing the file to change 3 to 5; before I edited the
file to try to change the default init level, it contained exactly one
Hm. Can you attach the file?
Does booting with just '5' (as oppposed to 'init=5') work for you?
(In reply to comment #4)
> Hm. Can you attach the file?
> Does booting with just '5' (as oppposed to 'init=5') work for you?
Let me get back to you with the attachment (the machine is currently airgapped,
for security purposes).
Yes, booting with just '5' works for me and solves the problem.
The /etc/event.d/rcS script selects the runlevel from /etc/inittab by doing an awk scan for lines of the type *:*:initdefault
So in particular it doesn't ignore comments, which is a bug.
In this case the user had commented out the line "id:5:initdefault:" and added "id:3:initdefault:" underneath. The awk scan in /etc/event.d/rcS was still picking up the 5 from the commented line, and hence still booting into runlevel 5
Thanks, J Gallagher. I filed a new bug report on this, so that this doesn't get missed. See bug #472717 (https://bugzilla.redhat.com/show_bug.cgi?id=472717).
*** Bug 472717 has been marked as a duplicate of this bug. ***
This is also on the F9 and F10 branches, and will be included in any future updates to those releases.