From: Olaf Titz (s_titz@ira.uka.de)
Date: 04/19/93


From: s_titz@ira.uka.de (Olaf Titz)
Subject: Re: **URGENT HELP Wanted 'init: exec failed' **
Date: 19 Apr 1993 11:00:15 GMT

In article <115875@bu.edu> ggeorge@bu.edu (Gerry George) writes:
> I was trying to "fix" the permissions on my system (SLS 0.99pl6). I
> changed 'login' and a couple more programs to non-suid.

Which is wrong, as you have apparently noticed already. But make sure
that no execute permissions (x bits) got lost in the process. (Shell
scripts need r bits for execution, too.)

> I rebooted my system and it came up as normal - almost.
> rc ran, called rc.local, which in turn called rc.net. All of the drives
> are mounted, swap partition is initialized, and the date prompt is
> echoed on screen. However, just
> before giving the login prompt, I get the error messages
> 'init: exec failed'
> 9 times, then the system reboots.

The thing to look for is getty - see inittab about exactly which getty
you use, and make sure this getty exists and is executable (which
includes the path to it being executable by root; you always run into
strange situations with directories with no x bits at all...)

> Apparently, it is something at the very end of the boot/initialize
> process which dies. I can't figure out what it is.

Yes, it is *after* the boot process, most probably. The boot process
looks like following:

- the kernel executes init
- init executes /etc/rc and waits for it to terminate
- init reads inittab (Sys V init)
- init spawns getty processes

> My rc file (only relevant lines shown):
>
> #!/bin/sh
> PATH=/bin:/usr/bin:/etc
>
> /etc/update &
> /bin/ctrlaltdel soft
>
> /bin/rm -f /etc/mtab* /etc/nologin /etc/utmp
> >/etc/utmp:/bin/chmod 444 /etc/utmp
> touch /etc/utmp

You can leave out the touch - its work is already done by the line
above. (Btw, isn't it to be mode 644, or 640? I should check that
again...)

> /bin/mount -av
>
> /bin/mount /dev/hda3 /usr
> /bin/mount /dev/hda4 /home
> /bin/mount /dev/hdb1 /user
> /bin/mount /dev/hdb2 /pub

If you mention the things to mount in /etc/fstab, then you don't need
the explicit mounts, just mount -av will suffice. This is what mount
-av is for. (This is surely not your fatal error, but just a
consideration.)

>
> /bin/swapon /dev/swap

If you get the message from this, you are sure that /etc/rc is
executed properly - so init and rc do work. Look at what comes after
that, i.e. the reading of inittab (is it readable? Shouldn't matter as
init is root but for certainty...) and execution of whatever is in
there as getty. (I assume you're running Sys V init, but other inits
are similar. The programs that are executed from init should always
match the pattern /bin/*getty* or /etc/*getty*, however.)

Hope this helps.

Olaf

-- 
        olaf titz     o       olaf@bigred.ka.sub.org      voice@49-721-60439
  comp.sc.student    _>\ _         s_titz@ira.uka.de          praetorius@irc
karlsruhe germany   (_)<(_)      uknf@dkauni2.bitnet        happy linux user
what good is a photograph of you? everytime i look at it it makes me feel blue