Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/bin/bash removed!!

Status
Not open for further replies.

hisham

IS-IT--Management
Nov 6, 2000
194
I removed the /bin/bash from fedora box, then i used the rescue mode to reinstall the rpm bash using nfs:
rpm -ivh bash..etc... --root=/mnt/sysimage
i get many errors
Anybody can help me how to reinstall this rpm in rescue mode?
Thanks in advanced.
 
did you remove the file /bin/bash or did you uninstall the rpm? if just the file you could simply replace the binary and not worry about installing the package again. also, what errors did you get?

Click below for S8700 Media Server information
 

You could just replace the binary whether you removed the RPM or not.
 
Hi hisham,

I do not understand why it is necessary to use the RH CD "linux rescue" to reinstall your bash shell. However, part of your current problem may be the way use tried to reinstall the bash shell. To reinstall the bash shell from the RH rescue cd:

Boot the CD

When prompted enter "linux rescue"

Answer any dialog question until the rescue kernel off the CD present you with a command prompt. Your regular linux partition will exit as a disk image mounted off the CD kernel with a path something like /mnt/sysimage. Then you can make sysimage the new root directory with the following command:

chroot /mnt/sys_image

Then do a "dir" command and you will see your regular linux file system.

Then you could restore the bash shell from rpm as normal like:

rpm -Uvh bash*.rpm

I noticed you used the following command which does not look right. This may be why your are getting errors.

rpm -ivh bash..etc... --root=/mnt/sysimage

Regards,

LelandJ

Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Hi Leland
I tried it as: rpm -ivh ...--root /mnt/sysimage --force
because when i use the rescue cd i couldn't use chroot /mnt/sysimage because there is no bash in the system, and now it is OK.
Thank you all for your answers
 
Hi hisham,

Ok, I'm glad you found a solution. I wasn't aware I could do the command you used, so I learned something new.

Regards,

LelandJ

Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top