LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   bash deleted (https://www.linuxquestions.org/questions/linux-general-1/bash-deleted-437759/)

Ammad 04-22-2006 12:14 PM

bash deleted
 
i accedently deleted bash shell, now i am unable to login, i used rescue mode to start system, but unable to mount cdrom.
2. last time i copyied disk 1 to /root/cd1
so this resovled my issue to access bash rpm

but as i run

rpm -Uvh /mnt/sysimage/root/bash-3.xxx.rpm

getting errors

any body know how to get it from

ataraxia 04-22-2006 12:16 PM

Post the errors?

Ammad 04-22-2006 01:14 PM

when i in rescue mode

#chroot /mnt/sysimage

This fails, giving the error message:

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

#mkdir fedora4
#mount /dev/hdc fedora4

mount: Mounting /dev/hdc on fedora4 failed: No such file or directory

#cat /mnt/sysimage/etc/fstab

/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0

#ls -l /dev


no /dev/hdc found

#ls -l /mnt/sysimage/dev/

no hdc file

?

ataraxia 04-22-2006 05:49 PM

Unfortunately for you, /bin/sh is actually a link to bash, so it's gone too. Probably your best bet would be to get a copy of just the bash binary from somewhere and copy it in, then use that to do the recovery that you intended to do in the first place.

AxeZ 04-22-2006 06:21 PM

Or boot from live CD, change /etc/passwd to use another shell and symlink it to /bin/sh

Then reinstall bash


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