initdefault has no effect

Jonathan Ryshpan jonrysh at pacbell.net
Sun Apr 12 22:30:18 UTC 2009


On Sun, 2009-04-05 at 22:42 -0700, Jonathan Ryshpan wrote:
> I have /etc/inittab set up as follows, but the system always starts with
> the X Window System running.  What am I missing?
> ...
> # Default runlevel. The runlevels used are:
> #   0 - halt (Do NOT set initdefault to this)
> #   1 - Single user mode
> #   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
> #   3 - Full multiuser mode
> #   4 - unused
> #   5 - X11
> #   6 - reboot (Do NOT set initdefault to this)
> # 
> # id:5:initdefault:
> id:1:initdefault:

Sorry to take so long to reply.  I haven't looked at this thread for a
while.  Comments:

(1) What am I trying to do?
Install the proprietary nvidia drivers for my video card.  Nvidia
advises that the X Window System be stopped during installation.  This
can be done in either runlevel 1 or 3.  Level 3 is better, but since
networking is off, it doesn't matter that security is nonexistent.

(2) What's going on here?
Fedora uses the new upstart initialization system.  It looks like the
only use that upstart makes of /etc/inittab is to awk it for a line
looking like
        id:5:initdefault:
No attention paid to comments or whatever.  See the files
        /etc/event.d/rcS* .

(3) Is this a bug?
I think it is, as long as /etc/inittab contains what look like comments
advising how to edit it, and these comments say nothing about it being
impossible to comment out an "initdefault" line.

(4) What's the best cure?
Get rid of /etc/inittab, except possibly for a comment saying to edit
the appropriate file(s) in /etc/event.d .  I'd put in a special file
containing nothing but the initdefault level, and maybe a comment, since
the level seems to be referred to in more than one place.  Say something
like:
        $ cat /etc/event.d/initdefault
        # Default runlevel. The runlevels used are:
        #   0 - halt (Do NOT set initdefault to this)
        #   1 - Single user mode
        #   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
        #   3 - Full multiuser mode
        #   4 - unused
        #   5 - X11
        #   6 - reboot (Do NOT set initdefault to this)
        # 
        id:5:initdefault:
Also edit the awk scripts accessing this file to pay attention to
comments.  And edit /etc/inittab to read something like:
        This file is obselete and will eventually be removed from the
        Fedora distribution.  See /etc/event.d and other files in the
        upstart rpm for information about system initialization.  In
        particular use /etc/event.d/initdefault to set the initial
        runlevel.






More information about the users mailing list