Bug 447216 - Can't set default init level to 5; booting with init=5 fails
Summary: Can't set default init level to 5; booting with init=5 fails
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 9
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 472717 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-18 21:10 UTC by D. Wagner
Modified: 2014-03-17 03:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-24 20:12:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description D. Wagner 2008-05-18 21:10:45 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.14) Gecko/20080416 Fedora/2.0.0.14-1.fc8 Firefox/2.0.0.14

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:

initscripts-8.76.1-1.x86_64
upstart-0.3.9-19.fc9.x86_64
rhgb-9.0.0-6.fc9.x86_64
gdm-2.22.0-1.fc9.x86_64
kernel-2.6.25.3-18.fc9.x86_64

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):
initscripts-8.76.1-1.x86_64

How reproducible:
Always


Steps to Reproduce:
1. Boot without rhgb [optionally: with the kernel argument "init=5"]
2. Has X started?


Actual Results:
No, X has not started.  [if "init=5": boot fails with the error message given above]

Expected Results:
Yes, X should have started.  [if "init=5": and, init should not have failed]

Additional info:

Comment 1 D. Wagner 2008-05-18 21:15:45 UTC
By the way, see this thread for more information about my attempts to resolve
the problem:

http://forums.fedoraforum.org/showthread.php?p=1013575#post1013575

and information on the contents of my /etc/inittab file.

Comment 2 Bill Nottingham 2008-05-19 20:31:10 UTC
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?

Comment 3 D. Wagner 2008-05-20 16:17:58 UTC
(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:

id:5:initdefault:

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
non-comment line:

id:3:initdefault:

Comment 4 Bill Nottingham 2008-05-20 16:23:25 UTC
Hm. Can you attach the file?

Does booting with just '5' (as oppposed to 'init=5') work for you?

Comment 5 D. Wagner 2008-05-31 02:02:51 UTC
(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.

Comment 6 J Gallagher 2008-08-08 14:56:50 UTC
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

Comment 7 D. Wagner 2008-11-24 01:55:49 UTC
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).

Comment 8 Bill Nottingham 2008-11-24 19:15:49 UTC
*** Bug 472717 has been marked as a duplicate of this bug. ***

Comment 9 Bill Nottingham 2008-11-24 20:12:21 UTC
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=fe48747faa0fe0f473f24d26e9a1059ef96cdb80

This is also on the F9 and F10 branches, and will be included in any future updates to those releases.


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