Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-20-2004, 06:27 PM
|
#1
|
LQ Newbie
Registered: Dec 2004
Posts: 7
Rep:
|
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
bash-2.05b-29
But bash-2.05b-29.rpm in my CD2.when i mounted giving the message:
Segmentation fault
help me!!thanks everybody!
|
|
|
12-22-2004, 03:06 PM
|
#2
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
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?
|
|
|
12-22-2004, 09:21 PM
|
#3
|
LQ Newbie
Registered: Dec 2004
Posts: 7
Original Poster
Rep:
|
Red Hat Enterprise Linux AS release 3 (Taroon)
Kernel 2.4.21-4.EL on an i686
|
|
|
12-23-2004, 10:07 AM
|
#4
|
Member
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379
Rep:
|
Hmm it is bit tricky i guess. try to pass (at grub)
init=/bin/csh
This may help
|
|
|
12-23-2004, 02:06 PM
|
#5
|
Member
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 299
Rep:
|
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.
|
|
|
12-24-2004, 12:05 AM
|
#6
|
LQ Newbie
Registered: Dec 2004
Posts: 7
Original Poster
Rep:
|
thanks every body
my teacher told me,entering rescue mode,then
Code:
#cp /bin/bash /mnt/sysimage/bin/
|
|
|
All times are GMT -5. The time now is 04:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|