LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-27-2010, 11:18 PM   #1
send2rawat
LQ Newbie
 
Registered: Jan 2007
Posts: 16

Rep: Reputation: 0
Unhappy kernel panic bin/sh no such file or dir


while booting my linux system I'm Getting ..

exec of init (/sbin/init) failed!!!: 2
umount /inited/dev failed: 2
kernel panic - not syncing: Attemped to kill init!

and in rescue mode
I checked all things seems to be ok ... fstab, grub.conf, initrd file.
but when i do chroot /mnt/sysimage it gives

chroot: cannot execute /bin/sh: No such file or directory

I've also checked with reinstalling grub and making ld.so.cache again but doesn't work.
pls suggest what are the possible solutions.
 
Old 06-28-2010, 03:36 AM   #2
halvy
Member
 
Registered: Aug 2005
Location: Anchorage, Alaska (soon EU, hopefully)
Distribution: Anything NOT SystemD (ie. M$) related.
Posts: 918

Rep: Reputation: 42
Have you changed any kernel or initrds lately.. although not being able to chroot should partly cast aside this assumption.

This sounds like a fs error possibly.. how about that.. what fs is it.. ext3/4?


Have you fsck -VC it?

Was it working before.. because it sounds like something got trashed (or deleted).. but since you can't even chroot.. I suspect a fs error.. but I could be wrong.
 
Old 06-28-2010, 04:02 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
/mnt/sysimage is mainly used for installs, unless you have set it up that way.

/ is not where you think it is. So your line
kernel somekernel root=somedrive is wrong,

When the kernel is loaded, the system mounts / and then runs /sbin/init. Now it is finding what you call / but it is not /, because /sbin/init or /bin/sh cannot be found. Post your grub.conf and we can get you out of this.
 
Old 06-29-2010, 01:22 AM   #4
send2rawat
LQ Newbie
 
Registered: Jan 2007
Posts: 16

Original Poster
Rep: Reputation: 0
here is grub.conf

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-42.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-42.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.6.9-42.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.EL ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-42.EL.img


I dont think there is something wrong in grub.conf because I've already matched with other servers.
 
Old 06-29-2010, 04:24 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Quote:
kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/1 rhgb quiet
I've had trouble with those label things before. Do you know what partition / is on? Edit that line; when grub comes up hit e twice, and you should get an editor of sorts. change that to root=/dev/sdax where x is the number of your / partition. Return to finish, and b to boot it.
 
Old 06-29-2010, 10:42 PM   #6
send2rawat
LQ Newbie
 
Registered: Jan 2007
Posts: 16

Original Poster
Rep: Reputation: 0
But I m not able to understand why it is giving
chroot: cannot execute /bin/sh: No such file or directory

is there any prob in bin/sh ??
 
Old 06-30-2010, 01:48 AM   #7
send2rawat
LQ Newbie
 
Registered: Jan 2007
Posts: 16

Original Poster
Rep: Reputation: 0
checked with root=/dev/sda3 (my / drive) in grub.conf .. but still giving same error ..
I tried with making new initrd file but it says /lib/module .. no such file or dir.
I tried copying bash also (may be the bash giving the error ) ..
cp /usr/bin/bash /mnt/sysimage/bin/bash .. but was not useful.
 
Old 06-30-2010, 03:19 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Is it looking for /bin/bash in the initrd? or when exactly does it ask for /bin/bash?
 
Old 06-30-2010, 03:39 AM   #9
send2rawat
LQ Newbie
 
Registered: Jan 2007
Posts: 16

Original Poster
Rep: Reputation: 0
No I just googled it .. copying
It is just saying
chroot cannot execute /bin/sh: No such file or directory

while booting it gives
exec of init (/sbin/init) failed!!!: 2
umount /inited/dev failed: 2
kernel panic - not syncing: Attemped to kill init!
 
Old 07-01-2010, 08:49 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Quote:
while booting it gives
exec of init (/sbin/init) failed!!!: 2
umount /inited/dev failed: 2
kernel panic - not syncing: Attemped to kill init!
That's your latest post. "umount /inited/dev failed" looks like a typo has got in - inited??

In post #3, I pointed out
Quote:
/ is not where you think it is. So your line
kernel somekernel root=somedrive is wrong,
Because of this, it can't find /bin/sh or /sbin/init. get rid of that label= thing in grub.conf, because you can have 2 partitions called label=/1 and then the fun really starts. Believe me, I've had it!
 
  


Reply

Tags
binsh, dir, file, kernel, panic


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgraded Kernel, Kernel Panic, Can't read root file system. Romanus81 Slackware 25 05-04-2008 10:45 PM
Retrieving semi-formatted data: Kernel Panic (cannot find file or dir /dev/root) majorGrey Linux - General 2 09-05-2007 04:02 AM
Q. moving /bin dir files to /dev dir?? Texas_student Linux - Software 2 03-26-2006 11:42 PM
/bin/sh: ro: No such file or directory Kernel Panic rchrismon Linux - General 2 10-29-2005 09:30 PM
kernel panic, everything in bin and sbin have astericks on them JunLitsu Linux - Software 3 11-01-2003 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration