LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-22-2006, 12:14 PM   #1
Ammad
Member
 
Registered: Apr 2004
Distribution: redhat 9.0, fc4, redhat as 4
Posts: 522

Rep: Reputation: 31
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
 
Old 04-22-2006, 12:16 PM   #2
ataraxia
Member
 
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
Post the errors?
 
Old 04-22-2006, 01:14 PM   #3
Ammad
Member
 
Registered: Apr 2004
Distribution: redhat 9.0, fc4, redhat as 4
Posts: 522

Original Poster
Rep: Reputation: 31
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

?
 
Old 04-22-2006, 05:49 PM   #4
ataraxia
Member
 
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
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.
 
Old 04-22-2006, 06:21 PM   #5
AxeZ
Member
 
Registered: Sep 2002
Location: Novi Sad, Vojvodina
Distribution: Slackware, FreeBSD
Posts: 386

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

Then reinstall bash
 
  


Reply



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
Bash: Print usage statement & exit; otherwise continue using Bash shorthand operators stefanlasiewski Programming 9 02-07-2006 05:20 PM
$LINENO can't be modified in bash 3.0, while it can be in bash 2.05b Darwish Linux - Software 1 11-07-2005 02:57 PM
Kmail crashes when deleted mail is deleted dufferin Slackware 0 03-21-2005 03:23 PM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 04:53 PM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 06:42 PM

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

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

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