Problem
My machine panics during startup with the error message:
PANIC: exit cannot exec /etc/init (PID 1) status 9 Trying to dump pages
or gives:WARNING: /etc/init (PID 1) died status 0x0000008bafter the hardware listing and memory sizing has been displayed.
Cause
The kernel has unsuccessfully attempted to exec the /etc/init
process. One of the most predominant reasons for this is the
inability to execute the ELF loader required by init to load
and link the shared objects (DLLs) which it needs during
execution. The name of the ELF loader is embedded within
/etc/init and is /usr/lib/libc.so.1. This file is hard-linked
to /usr/lib/ld.so.1. This link also needs to exist for the
exec to complete.The panic actually occurs because of a requirement in the kernel's
exit() code which stipulates that if the init process is forced
to exit before it is marked by exec() as a "successful exec",
the response is to panic the system. The displayed error
message also reveals the signal number sent to the init process
which caused the exit. In this case, SIGKILL is sent to the
process; a particularly likely set of reasons for issuing SIGKILL
in this situation is related to either the non-existence,
corruption, or lack of suitable execute permission of the
ELF loader /usr/lib/libc.so.1.The panic can also occur if /etc/init itself is missing or corrupted.
Consider, for instance, the case where /usr/lib/libc.so.l does
not exist on the system. When exec() of /etc/init begins, the
kernel sets the process flag SNEXEC in the process table entry
for the new init process. The value SNEXEC indicates that the
exec() has not yet completed successfully; normally, the flag
is cleared when exec() completes. However, one of the requirements
for completing the exec(), namely the existence of the ELF loader,
cannot be met. Therefore, the kernel posts SIGKILL to init.When the signal is dispatched and handled by the kernel, the exit() function explicitly checks for the setting of the SNEXEC flag and the identity of the affected process. If this process happens to be init, the kernel causes the system to halt with a panic, displaying the essential circumstances, for instance, that PID 1 (init) had been killed with signal 9.
NOTES: The following solution is specific to OpenServer 5.0.5, but can
be applied to OpenServer 5.0.4, 5.0.2, or 5.0.0 with the following
change; depending on the release you are running, you should
make the following substitution to the Unix component version
number appearing in pathnames beginning with /opt/K/SCO/Unix:OpenServer Unix Pathname example
version component
version
---------- --------- ----------------
5.0.4 5.0.4Eb /opt/K/SCO/Unix/5.0.4Eb/usr/lib/libc.so.1
5.0.2 5.0.2Dp /opt/K/SCO/Unix/5.0.2Dp/usr/lib/libc.so.1
5.0.0 5.0.0Cl /opt/K/SCO/Unix/5.0.0Cl/usr/lib/libc.so.1Failure to exec /etc/init can also be the result of other types
of corruption not covered here. Therefore, if the following
diagnosis and corrective steps do not resolve the problem,
running the fsck(ADM) utility might be a reasonable action to
take, as noted below. Solution
Boot the machine from a set of boot/root floppies. Bring the
system into System Maintenance mode. Once at a shell prompt,
mount the hard disk root filesystem:/etc/mount /dev/hd0root /mntWARNING: When copying these files it is highly recommended to make a copy of the original file to init.orig or libc.so.1.orig before overwriting it from the /mnt/opt/K/SCO/Unix/5.0.5Eb/... directories so you can always go back to the original file and not the linked file.
Examine the following items:1. Check that the following files exist; if one or both do not, proceed to step 2.
/mnt/usr/lib/libc.so.1
/mnt/etc/init2. Check that both of the following files exist:
/mnt/opt/K/SCO/Unix/5.0.5Eb/usr/lib/libc.so.1
/mnt/opt/K/SCO/Unix/5.0.5Eb/etc/initIf so, create the following symbolic links:
ln -s /opt/K/SCO/Unix/5.0.5Eb/usr/lib/libc.so.1
/mnt/usr/lib/libc.so.1
ln -s /opt/K/SCO/Unix/5.0.5Eb/etc/init /mnt/etc/init3. If one or both of the files listed in 2. above do not exist, copy the file(s) from the root diskette and create the symbolic link(s) as above;
cd /mnt/opt/K/SCO/Unix/5.0.5Eb/usr/lib
cp /usr/lib/libc.so.1 .
ln -s /opt/K/SCO/Unix/5.0.5Eb/usr/lib/libc.so.1
/mnt/usr/lib/libc.so.1cd /mnt/opt/K/SCO/Unix/5.0.5Eb/etc
cp /etc/init .
ln -s /opt/K/SCO/Unix/5.0.5Eb/etc/init /mnt/etc/init4. Check that the hard link of the files /mnt/usr/lib/libc.so.1 and /mnt/usr/lib/ld.so.1 exists; if not, create the link:
cd /mnt/usr/lib
ln libc.so.1 ld.so.15. Check that both /mnt/usr/lib/libc.so.1 and /mnt/etc/init are executable and owned by bin; if not, make the necessary changes:
cd /mnt/usr/lib
chmod 555 libc.so.1
chown 2:2 libc.so.1cd /mnt/etc
chmod 100 init
chown 2:2 init6. Unmount the hard disk and reboot. If this does not resolve
the issue, some other unforeseen corruption might be the cause,
and it is possible that running fsck(ADM) on the root filesystem
will resolve the problem. After rebooting into single user mode,
run the fsck utility as follows:fsck -ofull /dev/rootReboot the system again to find out if the issue is finally resolved.
NOTE: TROUBLESHOOTING
---------------
- If on a reboot you get a "can't find source hdfs" followed by a
blue screen indicates you have copied the /etc/init
and /usr/lib/libc/so.1 from the installation media and, therefore,
you server believes it's an installation floppy/cd.Here, you would need to put back the original init and libc.so.1.
In which case you can use the following TA to produce your own tailored Emergency Floppies.
TA#109501 - "Installing or updating a driver on an installed OpenServer 5.0.x system from a Boot Time Loadable Device diskette.
You need to:a) Ensure the btld is installed on your server you wish to make
the floppies from.b) Take a backup of the kernel with:# btmnt -w
# cp /stand/unix /stand/unix.sco
# btmnt -rc) Using the TA, change your sdevice.d and mscsi files accordingly.It is recommended you take a copy of mscsi first with:
# cp /etc/conf/cf.d/mscsi /etc/conf/cf.d/mscsi.origd) Re-Link the Kernel which will now have the btld of your choice.Using:# /etc/conf/cf.d/link_unix -yYou can check with:# strings /stand/unix | grep <btld driver>BUT DO NOT REBOOT!!e) Now use "mkdev fd" to generate your Emergency Floppy disks.
f) Once completed, put back the mscsi file and change your sdevice.d files back and relink the kernel to it's original correct form with btld drivers you need for this server.
- Errors such as "cannot exec /etc/init pid 1 0x00000200" indicate a motherboard swap out which is too powerful for OpenServer 5.0.5.