Jump to content

Exec of init failed! Kernel panic


Guest vlador
 Share

Recommended Posts

Guest vlador

Hello all,

 

For the start, I want to tell that I am by no means experienced with Linux administration, so please don't judge my ignorance. :)

 

Suddenly, my Mandriva 2007 started misbehaving. First it reported that two partitions (ext3) are corrupted (superblock error) and that I should run fsck. After hours and hours of net search, i finally succeeded to repair them and they seem healthy and happy now.

 

However, there are still problems and so far I couldn't find a solution. Symptoms:

 

1. When booting, it reports "Exec of init failed!!!: 20" following with "Kernel panic...".

 

Rescue CD:

 

2. Attempt to mount all partitions reports that there is no root partition.

 

3. Manual mount looks like it works.

 

4. Manual "chroot /dev/hda1" does not work as it reports that bash does not exists.

 

5. I tried to find /etc/fstab on mounted partition and see what's there, but it reports that etc is not directory(?) - "ls -l" shows that it's a link ("etc -> ld-2.4.so"), and same applies to bin. In addition, lib is not a directory either but an executable. This doesn't look normal to me, but I'm still hoping that something can be done.

 

My partitions are:

- hda1 (I *think* this should be root partition, as it contains boot, root, var, etc directories)

- hda5 (swap)

- hda6 (home)

 

I'm not sure if hda2-hda4 ever existed, but with fdisk I don't see that anything is missing from the partition table.

 

I ran full disk and memory check (with WD diagnostic tool and memtest86) and they reported no errors.

 

I was hoping that there is other solution apart from full reinstallation, as being unexperienced user, setting it up properly again is not a simple task for me.

 

Can anyone help?

 

 

[moved from Software by spinynorman - welcome aboard :)]

Link to comment
Share on other sites

1. When booting, it reports "Exec of init failed!!!: 20" following with "Kernel panic..."

That generally means that the bootloader can't find or mount the root filesystem.

 

2. Attempt to mount all partitions reports that there is no root partition.

This would be consistent with the above problem.

 

I tried to find /etc/fstab on mounted partition and see what's there, but it reports that etc is not directory(?) - "ls -l" shows that it's a link ("etc -> ld-2.4.so"), and same applies to bin. In addition, lib is not a directory either but an executable. This doesn't look normal to me, but I'm still hoping that something can be done.

That sounds really bad. I suspect that the root filesystem is trashed. Do you know what caused the original problem, eg hard shutdowns?

 

'm not sure if hda2-hda4 ever existed, but with fdisk I don't see that anything is missing from the partition table.

This is normal. the first extended/logical drive is hda5; hda1-4 are reserved for primary partitions. Even if you don't have a second or third primary partition, the first logical partition is hda5.

 

My partitions are:

- hda1 (I *think* this should be root partition, as it contains boot, root, var, etc directories)

- hda5 (swap)

- hda6 (home)

Is your home partition on hda6 OK, i,e, can you mount it and read the files normally? If so the easiest solution at this point may be to reinstall. If you do that, designate hda6 as your home partition and direct the install program to not format your home partition on hda6. That way all your personal data and settings on your home partition will be saved. Just to be sure, you may want to back up hda6 to some external media before you reinstall.

Edited by pmpatrick
Link to comment
Share on other sites

Guest vlador

pmpatrick,

 

Thank you for your explanation.

 

That sounds really bad. I suspect that the root filesystem is trashed. Do you know what caused the original problem, eg hard shutdowns?

Actually, there were few power shortages in last few weeks. Last one could be the fatal. I'm not sure as this computer is some kind of internal samba/web/subversion server and I didn't noticed problem right away (I don't use it every day). I thought that UPS wouldn't be needed in such relatively non-critical case. Is such kind of problem usual for ext3 partitions or I'm just being "lucky"? :)

 

If you do that, designate hda6 as your home partition and direct the install program to not format your home partition on hda6. That way all your personal data and settings on your home partition will be saved.

This is good to know. Thank you very much!

Link to comment
Share on other sites

Is such kind of problem usual for ext3 partitions or I'm just being "lucky"? :)
Such kind of problem can happen on any filesystem - NTFS, HFS+, EXT3, ReiserFS - anytime a system shuts down improperly ("hard") you run the risk of some process being in the middle of doing something and, when halted suddenly, breaking things. Journalized filesystems (ext3 is journalized) are made to improve the ability to recover from it, but they still aren't perfect.

 

Personally, I would find out what kind of hard drive you have, go to the manufacturers website and download their tool for testing the hard drive. It's possible you're seeing the early signs of a failing hard drive, or maybe just a few bad sectors are the culprit. Running the appropriate tool for testing your hard drive will help rule out that possibility.

Link to comment
Share on other sites

In my experience, it happens more on ext2 or ext3 than on reiserfs. ext* does not like hard shutdowns but you usually can recover because there are really good repair utilities for ext*. I suspect you either didn't use the fsck utilities properly or you're just unlucky. Reiserfs is more resilient to hard shutdowns than ext* but if reiserfs gets corrupted, you can forget about getting your data back as the filesystem repair utilities aren't nearly as good as ext*. The worst of the lot for hard shutdowns is xfs. If there is any disk I/O to an xfs partition when the power goes off, the filesystem is generally, irreparably damaged.

I've never had a reiserfs go bad after a hard shutdown. I've had several ext3 partitions go bad after a hard shutdown but they were able to be repaired in every case but one. I only use xfs for backup partitions because this filesystem is very good at handling large files like archive or disk image files. I never leave an xfs mounted when not backing up so I have no personal experience on how xfs handles hard shutdowns but xfs's problems with hard shutdowns are well known and widely reported.

If you don't want to get a UPS and your area is prone to power outages, I would recommend making your / paritition reiserfs. I also second tyme's suggestion about checking your hard drive out with the manufacturer's test utilities.

Edited by pmpatrick
Link to comment
Share on other sites

Guest vlador

Thank you both for detailed answers.

 

Personally, I would find out what kind of hard drive you have, go to the manufacturers website and download their tool for testing the hard drive.

I used Ultimate Boot CD and ran one of Western Digital diagnostic tools (it's a WD disk). I may try with other available WD tools just to be sure.

 

If you don't want to get a UPS and your area is prone to power outages, I would recommend making your / paritition reiserfs.

Is it possible to convert partition to reiserfs without formatting?

Link to comment
Share on other sites

Is it possible to convert partition to reiserfs without formatting?

No, not in the context of that question. You could however, delete that partition, create a new reiserfs partition in the unused disk space. Then reformat it as reiserfs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...