Hello All
In one of my server with OEL 5.x(32-bit) I am facing this issue where my OS is not able to boot and consistently throws me this error.
Code:
exec of /sbin/init failed: No such file or directory
kernel panic, Not syncing :Attempting to kill init!
I have checked number of blogs on google in an hope to get answer but unable to resolve this issue.
I booted my OS in rescue mode where it shows the environment variable is set to /mnt/sysimage
Code:
#chroot /mnt/sysimage
cannot execute /bin/sh: no such file or directory
but when I manually checked for these files it seems to be present
Code:
#ls /bin/sh
/bin/sh
#ls /bin/bash
/bin/bash
when I checked the location of init it shows
Code:
#which init
/usr/bin/init
instead of
sbin/init
Can anyone please tell me what am I suppose to do at this stage?
I don't want to re-install this machine
Is it possible to change the path of init from /usr/bin/init to /sbin/init
as this file is also present
Code:
#ls /sbin/init
/sbin/init
I tried to add PATH variable in .bash_profile but still not working
Code:
#vi .bash_profile
export PATH=$PATH:$HOME/sbin/init
I think this is not the correct syntax
How can I change the path location of init from
/usr/bin/init to
/sbin/init?