Jump to content

Lost KDE access - stuck in bash [solved]


Guest KGB
 Share

Recommended Posts

I'm running Mandrake 10.1 and KDE, and as a recent Win98 refugee, I'm not yet command line literate in Linux. Problem is this:

I had a working 10.1 system, set up to boot to KDE and automatically logon a user (myself). Everything was working fine, until I went into the Mandrake control center to try to get PPPoe working for DSL, with my new Speedstream 5100 DSL modem. It appears that some setting I made in the Mandrake control panel (networking?) has caused the problem, whereby on boot, all goes fine, and the KDE desktop begins to appear.... when suddenly I get thrown into a BASH screen with the following prompt:

[aa@http://192 aa]$

Not being command line literate yet, I can't figure out how to get out of this, and back to the normal KDE desktop. I think the problem is related to a network config that I was attempting, while trying to get the PC to talk to my DSL modem for the initial DSL setup. I remember putting “192.xxx” into some (??) network setting during that time, and that's about the time the whole problem began – on the next boot. My newbie guess is that instead of the normal desktop at boot, it's trying to connect to a non-existant network address (??).

I tried a 10.1 reinstall using the update (?) option, but it didn't change things. I can't do a format, since I need to rescue important folders first.

I'm hoping that there will be some simple way to get out of what appears to be some false networking mode/setting that I inadvertently got into, and back to the normal KDE desktop.

As it is, I can't get out of BASH.

BTW, I installed 10.1 on a spare HD after this happened, and managed to get DSL working with no problems. The first time, I was waiting for DSL activation, and that's what got me off into problem areas. For the record, I setup SBC/Yahoo DSL using the “NO CD” method, and it worked fine, after a bit of head-scratching.

re: http://www.obviously.com/tech_tips/Yahoo_D...etup_no_CD.html

Any help with the bash problem would be appreciated.

Link to comment
Share on other sites

It seems the hostname got changed or something. Try editing the /etc/hosts file and put in it the name of your pc.

 

Command line explanation:

Log in as root and type: vi /etc/hosts

Hit 'i' without the '' for insert and change the name

Hit 'esc' to exit insert mode

Type ':x' {without the '' but with the : :))

Log out as root and type: startx

 

Good luck.

Link to comment
Share on other sites

Many thanks for the assistance devries!

Please excuse my command line ignorance - I am a refugee from a decade or more of Win$$$, who also has some old DOS experience, but this is my first time with Linux command line. I will eventually study it, but have not had time yet. :drum: ;O)

Using your instructions, I did manage to sign in as SU or root in BASH. Then, went into VI using your instructions. Next, I went into insert mode as you instructed. There, I found only one line of text in the hosts file, and it was something like this:

127.0.0.1 -many spaces then - 192.xxx.xxx.xxx

First I tried removing the "192.xxx.xxx" , but that did not change things.

Next, I also removed the address 127.0.0.1 - no change

Now the complete file (named hosts) is blank, but I still can not get into KDE.

Should the folder "hosts" contain something in this case, or be blank?

Sorry for the newbie ignorance. I'm sure this is obvious to non-newbies.

By the way, when I try to use 'startx' from bash, I get an error:

"fatal server error The server is already active for display 0 ...."

In fact, I can see the empty desktop behind the bash screen.

I think I may be close with a bit more help. Once I get back to KDE I can manage OK from there.

(famous last words ;O)

Many thanks,

KGB

:help:

Link to comment
Share on other sites

It is not clear to me what your problem is but, if you want hunches, I think I would have at least the one line in your /etc/hosts:

$ cat /etc/hosts
127.0.0.1               localhost

 

You could add that with vi. There are ways of copying and moving files, folders, on the command line, if it comes down to that. One more hunch, if you know the proper settings for your network, now, would be to try runnning the network wizard by logging in as root and doing drakconnect

Link to comment
Share on other sites

If your computer isn't part of a network changes are good that it's name is localhost. So just put in: 127.0.0.1 localhost

 

Some more explanations:

 

/etc/hosts is a text file (not a folder. There are no extensions in Linux)). Vi is a text editor

If X and KDE have started you can reboot X (the GUI environment) with ctrl-alt-backspace or by logging in as root and typing: init 3 or if that doesn't work by typing: killall X. To start again type: startx

Link to comment
Share on other sites

Thanks for the help rolf. Between your help, and that of devries, I am slowly getting closer I feel.

Using what devries taught me, and the information from you, I used vi to edit the etc/hosts file, and it is now set to:

127.0.0.1 localhost

Now it is set correctly, but I am still stuck in bash after boot. I went into root and opened drakconnect as you suggested. It opened and ran fine. Since I am only concerned with getting back to a normal desktop (at this time), I set networking for a simple modem. Unfortunately, I am still stuck in bash at boot. I tried to find another drak wizard from bash, but I did not have any luck. While in bash I used the screen command and got this:

[root@://192 xx]#

I wonder if perhaps the X server is pointed to the wrong place, causing this problem? At any rate, I was not able to figure out how to modify the X server, or better yet, how to get a drak wizard running (from bash), in order to do it from a GUI.

I would do a re-install, but I fear that I would lose access to the very important data that was in folders on the desktop. I tried doing the upgrade (terminology??) type of install, but it did not help - still boots into bash. If I could just get back to the normal GUI (KDE) desktop, I think I could easily use drak GUI tools to fix the rest ( as in network setup)....or at least burn the important folders to CD, which is all that matters.

Perhaps you could comment on doing a full install - would that cause me to lose the desktop data files, as I fear? I have done a number of 10.1 installs so far, with no problems. It is only this bash thing that has been a problem, due to some error I made during DSL setup on this HD.

BTW, I did the same DSL (no CD) setup on my current HD with no problems.

Any further suggestions are most welcome, and thanks for the help so far (to both of you) ! :thumbs:

Link to comment
Share on other sites

I don't know if this will help, but in order to get any of the drake wizzards running, you have to be root. So run:

 

$ su

<enter root password>

# mcc

 

That will bring up the ncurses version of mandrake control center which you can navigate with the keyboard to reach and reset the X settings.

 

Also, for this:

 

when I try to use 'startx' from bash, I get an error:

"fatal server error The server is already active for display 0 ....

 

that would indicate that X is continually trying to respawn, unsuccsessfully. One thing you can try is starting a second X session as root by hittting Ctrl-Alt-F1, which will take you to a new command line login screen. Login as root and run:

 

# startx -- :1

 

the "-- :1" tells the system to start a second X session on screen "1" since screen 0 is occupied and apparently hung up. If you can start as root, post back. Note, also, you can go back to your original screen in the above scenario by hitting Alt-F7 and back to your root X session by hitting Alt-F8.

 

Re recovering your desktop files, you can download a bootable linux live cd like knoppix or kanotix which will allow you to access all your files in a kde gui environment. Both have k3b which should allow you to backup to a CD-R. These are great tools to have handy for emergencies like these.

Edited by pmpatrick
Link to comment
Share on other sites

I think pmpatrick has a good point about the capabilities of a knoppix live CD for accessing and burning your files in a gui environment. As for whether a re-install overwrites the files you need, that depends. Usually, these would be personal files, emails, mpegs, documents, etc. which are stored in your /home/<username> directory. If you have created a separate /home partition at install or separate /data, /music, for example, partitions where the important files are located, you can choose not to format these partitions during a reinstall and you will not lose the data on them. If, however, /home is not on a separate partition, it will get formatted when you reinstall as install formats / and, in this case, /home is just a directory (folder) on the / partition and gets erased.

 

Do you have an nvidia card? Not having X configured correctly is a common cause of the gui not displaying. The message you are getting is that X is already started. IOW, you are in runlevel 5, the gui, desktop environment. One thing you can try is to switch to runlevel 3, when logged in as root, by typing init 3 When that is complete, as root, try init 5 or, as either user startx to see what the messages will be.

 

If X is still not working, get to runlevel 3, as root, with the init 3 command and reconfigure your X server, having at hand your monitor and video specs, by typing, as root XFdrake --expert After you have completed that, try init 5 again. In case you have trouble finding the exact video adapter you are using, you might try the generic vesa driver, which runs at reduced video capabilities, like Safe Mode, but gives you a gui to muck around in. That reminds me, the default boot menu will have non-fb and failsafe entries, which you might try.

Link to comment
Share on other sites

:thanks: We have victory! Thanks once again to all, including PMpatrick!

Try getting that kind of super support with Win$$$$ - ha! - with Win$$$ it is more like :cheeky:

So, here is the final update, leading to a successful mission (thanks to all of you).

Everything that was suggested was tried, and worked as it should have - except that I could find nothing that would release me from bash. Since you are all very experienced in Linux, I must conclude that this was an abnormal situation and perhaps the OS was corrupted by something I did.

I used mcc from root, and that was an excellent way to get into the config panel. I reset everything I could find to reset, but when I left mcc, I was still locked in bash.

I did the init 3 and 5 - again it worked just as you said, but did not get me out of bash.

It was the same with startx and everything else. I learned a lot (for a newbie ;O) and it all was useful since it helped me, as they say, "get my feet wet", in command line.

I did already have a PClinux live disk, but never thought of trying it for some reason. Perhaps I used it wrong, but after it booted, I could not find any of the missing images or data using either K3B or Krusader ...?? Maybe it was operator error, as they say. It appeared that all that was visible, was the "RAM disk" type of data, from the boot itself - not the existing HD. Hmmmm....

Re the video card: I run an ATI Radeon 9600xt and so far it has worked flawlessly in Mandrake ....excuse me ...... Mandriva . :D

Somewhere during all this work I began getting another error message, so it was clearly time for drastic action. I took a d-e-e-e-ep breath and did a reinstall, with a format (only) for the partition that (apparently) held the OS. I was not sure, never having tried to save Linux data that way before, but again your good guidance gave me the courage to try it - and it worked just perfect !

I had been tempted to try it earlier (with a partial format), but the importance of the images I had stored forced me to try the repairs first. After the reinstall, including a format of the first (OS) partition, all was fine. My "missing" images and emails popped up as before, and I cannot tell you what a relief that was! I was just about to burn them to CD as this problem occurred, but Murphys Law beat me to it. To replace the photos I would have had to drive almost 3 thousand miles (and the photos and email records are very important).

So, many thanks to everyone for taking pity on this command line newbie. After this, I will begin to learn more about non-GUI Linux. The good news for other newbies to Mandriva is that indeed, it is quite easy to do a re-install of the OS without affecting data/files in the users folder (assuming, as you say, that the original install had the OS and user data separated) .

Cheers to all who helped! :beer:

 

 

:thanks::thanks:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...