Recently I have run into a problem.
I made a change that has crippled my system and do not know how to reverse the effect.
I made a copy of a file bash.bashrc and named it bash.bashrc.local
when I restarted my konsole all I got was a blank line.
my prompt did not show user@desktop $ anymore and any thing that I type goes through without any reaction from the command line.
typing ls results in cursor moving to next line and nothing happens.
After I rebooted the machine and tried to log in the screen goes black and I see a cursor.
I’ve tried GNOME, KDE3, KDE4, IceWM, and all failesafe modes with the same results. Loggin into the command line will allow me to log in and then I get no command prompt and no response from the pc.
I know it’s working becuase my virtual windows machine on it is running and I can remote into it.
Anybody have any how I can get back in and delete the bash.bashrc.local file when nothing seems to be working?
If it is related to deleting a file, then you can use console with out any graphical mode.
Do you know the location of the file. cd to that folder and delete it.
Just an example:
rm /home/test/bash.bashrc.local
Note: backup, backup and backup before deleting or doing any thing.
I tried getting to console mode from the login screen.
It asked for my user name and then the password and logged me in. However, I did not get a command prompt. Whatever I type has no effect.
-boot
-at first screen select Fail Safe, press enter
-when the command line comes
–type root hit enter
–type [root’s password] hit enter
-type cd /etc hit enter
-type mv bash.bashrc.local bashrc.bashrc local.bad-idea hit enter
-type exit hit enter
-type startx hit enter
-log in as yourself
-start over this time by creating an EMPTY file named
bash.bashrc.local and then fill it with whatever the directions you
are following says to…
mine begins like this:
/etc/bash.bashrc.local for openSUSE Linux
PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances
that your changes will be lost during system upgrades.
Instead use /etc/bash.bashrc.local for your local settings,
favorite global aliases, VISUAL and EDITOR variables, etc …
below alias list developed over time
alias lsd=‘ls -hal | less’
alias x=‘exit’
alias m=‘mc’
alias s=‘su -’
alias a=‘atop’
alias t=‘top’
alias mv=‘mv -i’
alias cp=‘cp -i’
alias rm=‘rm -i’
alias rmdir=‘rmdir -i’
On Wed, 23 Sep 2009 18:46:01 +0000, rashid1985 wrote:
> Recently I have run into a problem.
> I made a change that has crippled my system and do not know how to
> reverse the effect.
>
> I made a copy of a file bash.bashrc and named it bash.bashrc.local
>
> when I restarted my konsole all I got was a blank line. my prompt did
> not show user@desktop $ anymore and any thing that I type goes through
> without any reaction from the command line.
>
> typing ls results in cursor moving to next line and nothing happens.
>
> After I rebooted the machine and tried to log in the screen goes black
> and I see a cursor.
>
> I’ve tried GNOME, KDE3, KDE4, IceWM, and all failesafe modes with the
> same results. Loggin into the command line will allow me to log in and
> then I get no command prompt and no response from the pc.
>
> I know it’s working becuase my virtual windows machine on it is running
> and I can remote into it.
>
> Anybody have any how I can get back in and delete the bash.bashrc.local
> file when nothing seems to be working?
In addition to the other suggestions, I might even boot into single user
mode since the bash.bashrc script is probably run by the root user login
as well. IIRC, single user mode will bypass that.
-boot | ok
-at first screen select failsafe, press enter | ok
–type root hit enter | ok
–type [root’s password] hit enter | ok
System Message:
You have new mail
Have a lot of fun!
From here on is what happens
cd /etc #no response returns to the beginning of the line
mv bash.bashrc.local bashrc.bashrc local.bad-idea #no response returns to the beginning of the line
exit #no response returns to the beginning of the line
startx #no response returns to the beginning of the line
BTW I have Xen - OpenSUSE 11
My operating system selection has 4 choices
On Thu, 24 Sep 2009 00:26:01 +0000, rashid1985 wrote:
> where do I select single user mode or type 3
In the grub menu, move the cursor down to the line with the options and
put in “s” or “single” to get to single user mode; put “3” on the line to
go to runlevel 3 (console only).
Single user mode will ask just for the root password; you can’t login as
another user.
> In addition to the other suggestions, I might even boot into single user
> mode since the bash.bashrc script is probably run by the root user login
> as well. IIRC, single user mode will bypass that.
of course…why didn’t i think of that!
the reason my prescription didn’t work is because even root’s
environment is corrupted by the VERY faulty bash.bashrc.local
Rashid, if the above direction to insert s and single user boot
doesn’t work, then try
-boot from a live CD (any live cd)
-mount the partition with /etc
-THEN rename (or simply delete, CAREFULLY) /etc/bash.bashrc.local
-shutdown, and try a normal boot…it should come up fixed and happy…