LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Tags used in this thread
Popular LQ Tags , , , , ,

Reply
 
Thread Tools
Old 09-24-2009, 06:40 PM   #1
miteshpant
LQ Newbie
 
Registered: May 2009
Posts: 19
Thanked: 0
Smile my bash file is deleted , trying to restore from kernel arguments


[Log in to get rid of this advertisement]
hi,
i have deleted my bash file
and thus the system is not letting me to bash shell
now i have a kernel panic situation
i want to log in using ksh shell passing arguments from kernel
lets begin..
windows_xp_2003 miteshpant is offline  
Tag This Post , , , , ,
Reply With Quote
Old 09-24-2009, 06:43 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,429
Thanked: 325
Please tell us which distro & version you have, and give more details.
Which 'bash' file?

1. /bin/bash - the actual shell itself
2. .bashrc
3. .bash_profile
4. other
windows_xp_2003 chrism01 is offline     Reply With Quote
Thanked by:
Old 09-24-2009, 06:52 PM   #3
miteshpant
LQ Newbie
 
Registered: May 2009
Posts: 19
Thanked: 0

Original Poster
yeah you got it right
its the /bin/bash file
i am using RHEL5
windows_xp_2003 miteshpant is offline     Reply With Quote
Old 09-24-2009, 06:55 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,429
Thanked: 325
I'd use the installation DVD in rescue mode ie at the first text prompt type

linux rescue


then it will run from the DVD & mount your HDD as another disk. You can fix your login to use /bin/ksh or whatever so you can at least get in.
You should then be able to use yum to re-install bash.
windows_xp_2003 chrism01 is offline     Reply With Quote
Old 09-24-2009, 07:02 PM   #5
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora 11, CentOS 5.3, Linux Mint 5, Solaris 10
Posts: 1,260
Thanked: 35
Quote:
Originally Posted by miteshpant View Post
yeah you got it right
its the /bin/bash file
i am using RHEL5
boot into "linux rescue" mode from the installation disc

Then you can do 1 of 2 things...

Reinstall bash

Copy bash from the rescue mode

-C
macos custangro is offline     Reply With Quote
Old 09-25-2009, 04:44 AM   #6
miteshpant
LQ Newbie
 
Registered: May 2009
Posts: 19
Thanked: 0

Original Poster
the point is i don't want to use the dvd , or linux rescue mode... i want to fx it by passing arguments from the kernel to get into the computer using ksh shell
windows_xp_2003 miteshpant is offline     Reply With Quote
Old 09-25-2009, 04:52 AM   #7
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835
Thanked: 136
Quote:
Originally Posted by miteshpant View Post
the point is i don't want to use the dvd , or linux rescue mode... i want to fx it by passing arguments from the kernel to get into the computer using ksh shell
So this is homework. If I were in your shoes I would use the simplest, most reliable way to recover from such a disaster (e.g. copy bash from a rescue disk to the affected installation). But you don't want to do that. Ergo, homework.

Be truthful.
linuxfedora lutusp is offline     Reply With Quote
Old 09-25-2009, 11:47 AM   #8
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora 11, CentOS 5.3, Linux Mint 5, Solaris 10
Posts: 1,260
Thanked: 35
Quote:
Originally Posted by miteshpant View Post
the point is i don't want to use the dvd , or linux rescue mode... i want to fx it by passing arguments from the kernel to get into the computer using ksh shell
Do you mean passing options to the kernel using grub?

-C
macos custangro is offline     Reply With Quote
Old 09-25-2009, 12:28 PM   #9
miteshpant
LQ Newbie
 
Registered: May 2009
Posts: 19
Thanked: 0

Original Poster
correct
i think something like
init=/bin/ksh should work
windows_xp_2003 miteshpant is offline     Reply With Quote
Old 09-25-2009, 01:19 PM   #10
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora 11, CentOS 5.3, Linux Mint 5, Solaris 10
Posts: 1,260
Thanked: 35
Quote:
Originally Posted by miteshpant View Post
correct
i think something like
init=/bin/ksh should work
It might...try it out and let us know if it worked.

-C
macos custangro is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Accidentally deleted config file....how to restore it? gauravholey Linux - Kernel 4 06-22-2009 08:53 AM
restore deleted rc.conf file fraggelfraggel *BSD 7 10-23-2005 12:53 AM
reinstalling windows deleted my grub master boot file; how do I restore it? sohmc Linux - General 3 01-12-2005 02:27 PM
How to restore a deleted file satimis Linux - Newbie 1 09-12-2003 05:18 AM
restore back deleted file edreddy Linux - General 4 07-19-2002 07:43 AM


All times are GMT -5. The time now is 04:43 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration