This discussion is archived
1 2 Previous Next 17 Replies Latest reply: Mar 22, 2012 12:57 PM by Dude! RSS

Kernel Panic

EBSDBA Expert
Currently Being Moderated
Hi All,

My production server would'nt start. It is throwing the error

exec of /sbin/init failed: No such file or directory
kernel panic, Not syncing :Attempting to kill init!

Os is OEL 5.4 32 bit

Thanks
  • 1. Re: Kernel Panic
    Dude! Guru
    Currently Being Moderated
    You may have lost or deleted your /sbin directory. I suggest to start the system from CD/DVD, then use "fsck" to check your root file system, then mount your root partition and check it. If /sbin and other important directories are missing, you should restore from backup.
  • 2. Re: Kernel Panic
    EBSDBA Expert
    Currently Being Moderated
    Hi Dude,

    Thank you.

    I booted the OS from Linux installation DVD ans started in resuce mode.

    Now when i run fsck, it says /etc/fstab is not found
    no such file or directory.

    But

    i have /sbin/init file, /etc/passwd

    Please suggest

    The worst thing is we do not have back up for this OS.

    Thanks

    Edited by: EBSDBA on Mar 21, 2012 3:36 PM
  • 3. Re: Kernel Panic
    EBSDBA Expert
    Currently Being Moderated
    Hi Dude,

    Any help is appreciated.

    I know i should have backup. It is stupidity that they do not keep backups and call consultants to solve these issues.

    I already started installing OEL 5.4 on the other server to restore the database. But still wanted to fix the issue.

    Thanks
  • 4. Re: Kernel Panic
    Dude! Guru
    Currently Being Moderated
    try the following:

    Boot the system from DVD. At the boot prompt type "linux rescue"

    It will prompt for language, keyboard, network.

    When it prompts you to find your Linux installation, select "skip".

    At shell prompt type:

    <pre>fdisk -l</pre>

    Find the boot and root partition of your system.

    <pre>fsck -fy /dev/sda1</pre>

    If you installed your system with LVM you need to load it first and locate your volume:

    <pre>lvm pvscan</pre>
    <pre>lvm vgscan</pre>

    Notice the output of volume groups found

    <pre>lvm lvchange -ay VolGroup00</pre>
    <pre>lvm lvscan</pre>

    <pre>fsck -fy /dev/VolGroup00/LogVol00</pre>

    Don't wory about /etc/fstab. The fsck command will check the filesystem inodes, etc.

    Then reboot again into rescue mode, this time let it find your Linux installation and select "continue"

    If you cd to /mnt/sysimage you should see the content of your root volume. Check it and see what's missing and report back.
  • 5. Re: Kernel Panic
    EBSDBA Expert
    Currently Being Moderated
    Hi Dude,
    Thanks for the reply and sorry for late reply as i was preparing the other server.

    I had real bad experience with fsck in the past.

    Kindly please let me know if this fsck with -fy going to corrupt in extreme cases.

    We do not have VLM.

    So i have to execute

    #fsck -fy /dev/sda1

    Kindly suggest.

    Thanks
  • 6. Re: Kernel Panic
    EBSDBA Expert
    Currently Being Moderated
    Hi Dude,
    More over i have
    #fdisk -l

    Device Boot

    /dev/cciss/c0d0p1 *
    /dev/cciss/c0d0p2
    /dev/cciss/c0d0p3
    /dev/cciss/c0d0p4
    /dev/cciss/c0d0p5



    So should i execute

    #fsck -fy /dev/cciss/c0d0p1
  • 7. Re: Kernel Panic
    Dude! Guru
    Currently Being Moderated
    The device name will tell you nothing about the partition.

    The one with the asterix (*) is probably your boot partition, then the root volume could be the next one.

    However, "fdisk -l" should show you more details, like size, partition type, etc. Where is the rest of the info?
  • 8. Re: Kernel Panic
    EBSDBA Expert
    Currently Being Moderated
    Hi Dude,

    I just typed the Device and Boot (the one with *). I could type the rest info.
    Device                    Boot         start   end          blocks              id    system
    
    /dev/cciss/c0d0p1    *              1        2611       20972826         83    linux
    /dev/cciss/c0d0p2               2612       6788         xxxxx              82    linux swap/solaris
    /dev/cciss/c0d0p3               6788       8746         xxxxx              83   linux
    /dev/cciss/c0d0p4               xxxxx       xxxxx        xxxxx                5     Extended
    /dev/cciss/c0d0p5 
    And so on.

    Thanks

    Edited by: EBSDBA on Mar 21, 2012 7:42 PM
  • 9. Re: Kernel Panic
    Dude! Guru
    Currently Being Moderated
    That doesn't look like a standard installation. It seems you do not have a separate boot partition. So /dev/cciss/c0d0p1 could be your root volume. You should fsck it, then mount it and see what's wrong.
  • 10. Re: Kernel Panic
    EBSDBA Expert
    Currently Being Moderated
    Hi Dude,

    Thank you. Yeah i think the boot is present in /.

    Thanks
  • 11. Re: Kernel Panic
    EBSDBA Expert
    Currently Being Moderated
    Hi Dude,

    The fsck went fine the / partition.

    Now what is next please?

    Thanks
  • 12. Re: Kernel Panic
    TommyReynolds Expert
    Currently Being Moderated
    exec of /sbin/init failed: No such file or directory
    kernel panic, Not syncing :Attempting to kill init!
    This usually means the kernel cannot find its root file system (/). Probably the initial ramdisk (initrd) does not have the device drivers for your root file system.

    Where do you keep your (/)? A local disk? Multipathed SAN?

    I suspect your multipath setup is not right, so the stuff in the initrd does not recognize your multipaths, so it doesn't see your root file system.

    Boot into rescue mode, and notice how it locates your root partition. Then you'll likely need to edit "/etc/multipath.conf" or "/etc/lvm/lvm.conf", then rebuild the initrd file.
  • 13. Re: Kernel Panic
    Dude! Guru
    Currently Being Moderated
    Since your boot and root volume are supposedly on the same disk I would not suspect a driver problem with your initrd image, unless I guess your underlying file system configuration was changed. I suggest to mount the file system and check the /sbin /bin, etc. directories and verify they contain the necessary files. Also check file and directory permissions. If any files are missing you can copy them from the rescue DVD.
  • 14. Re: Kernel Panic
    EBSDBA Expert
    Currently Being Moderated
    Hi dude,
    I suggest to mount the file system and check the /sbin /bin, etc. directories and verify they contain the necessary files. Also check file and directory permissions. 
    I did mount the file system and i can access everything in all the mountpoints, like
    $cd /mnt/sysimage
    $ls
    $cd /mnt/sysimage/u01

    etc..
    verify they contain the necessary files.
    How do i verify it contains all necessary files

    The system was working fine. All of a sudden it got crashed.

    When i run
    $chroot /mnt/sysimage
    It thows /bin/sh no such file or directory.

    Also i cannot find boot folder in /

    Thanks
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points