Review your favorite Linux distribution.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 12-20-2004, 06:27 PM   #1
LQ Newbie
Registered: Dec 2004
Posts: 7

Rep: Reputation: 0
Angry bash is missing

I did an experiment yesterday,during the reboot, the system hangs.

the boot process happens without error until the init command executes.

entering rescue mode,chroot into the disk:

chroot /mnt/sysimage

This fails, giving the error message:

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

Do a long listing of this file:

ls -l /mnt/sysimage/bin/sh

I found that it is a symbolic link to the bash command in the same directory

/mnt/sysimage/bin/sh ->bash

Then, I discovered bash file is missing!

/rpm -qf /bin/bash --root /mnt/sysimage


But bash-2.05b-29.rpm in my CD2.when i mounted giving the message:

Segmentation fault

help me!!thanks everybody!
Old 12-22-2004, 03:06 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Which distribution and version? It's important because you probably need to get the binary (bash executable).

I wonder what the experiment was... May it be related to the problems?
Old 12-22-2004, 09:21 PM   #3
LQ Newbie
Registered: Dec 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Red Hat Enterprise Linux AS release 3 (Taroon)
Kernel 2.4.21-4.EL on an i686
Old 12-23-2004, 10:07 AM   #4
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Hmm it is bit tricky i guess. try to pass (at grub)

This may help
Old 12-23-2004, 02:06 PM   #5
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
Do you have access to the rpms via NFS?
In the rscue enviroment chroot /mnt/sysimage , then rpm -V bash , if bash has been altered rpm should report that it has. Then exit the chrooted enviroment with exit.
At the prompt issue rpm -ivh --force --root /mnt/sysimage /mnt/(source of bash rpm) and this will 're-install' bash. Exit and reboot. Hopefully all will be back to normal.
Old 12-24-2004, 12:05 AM   #6
LQ Newbie
Registered: Dec 2004
Posts: 7

Original Poster
Rep: Reputation: 0
thanks every body

my teacher told me,entering rescue mode,then

#cp /bin/bash /mnt/sysimage/bin/


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
error: -bash: [: missing `]' eduac Linux - Software 7 05-20-2023 09:15 AM
Bash: make command missing Guiderone Linspire/Freespire 3 04-21-2004 12:04 PM
Missing commands in Bash/Terminal cferris Red Hat 3 10-12-2003 11:13 PM
missing bash files KptnKrill Linux - Newbie 2 08-06-2003 02:45 PM
Missing Bash Files krymsunmortis Slackware 3 01-12-2003 07:44 PM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 09:17 PM.

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