Question:
How to repair a configuration file in Ubuntu Linux?
?
2012-08-01 14:47:44 UTC
I recently tried to log into my Ubuntu computer using the XMBC environment instead of the GNOME environment. When I logged in my computer froze and didn't respond to anything that I did. I held down the power button on my computer until it shut off. I counted to 10 (to clear the RAM) and pressed the power button again. When Ubuntu started up, it logged me in automatically (because I set it in to log me in automatically in the settings) but instead of the GNOME desktop environment, my computer went to XMBC environment and froze immediately. I was using Ubuntu 11.04. I am writing this from the same computer using an Ubuntu 10.04 rescue disk in live desktop mode. Can someone please point me to a configuration file or a fix to this. I am unable to move my home folder to my backup flash drive because of file system errors. I do not want to have to reinstall Linux again because I have files in my home folder that I would like to save because they were too recent for my most recent backup. Any help would be very appreciated. Thank you!
Four answers:
Richard
2012-08-01 16:10:09 UTC
Using your 10.04 CD in live desktop, find your hard disk. It will probably be /dev/sda.



Open a command line terminal (it should be in the Accessories group in the Applications section from the menu bar at the top left of the screen).



GIn the command line window, go into superuser (sudo su), and type the command:



fdisk /dev/sda (and hit return)



If that doesn't work, try /dev/sdb or /dev/sdc.



Once fdisk is running, type:



p (and hit return)



this will show you the partitions on the disk. There should be at least one partition type 83 (Linux), but there may be several - it depends on whether you set up separate partitions for /home or other directories. There is also probably going to be one partition type 82 (swap). Hopefully you will recognize your hard disk from the size and the partitions it has on it.



Type:



q (followed by return)



to exit from fdisk. Note down the names of the Linux partitions such as /dev/sda1.



Next try mounting all the file systems. Click on Places at the top of the screen and select each file system in turn to mount them. If one fails to mount, go back to the command line window and try repairing it:



fsck /dev/sda? (where the ? represents the partition number you recorded earlier).



When all the partitions are mounted, from the command line window, go to the /media folder



cd /media



and list its contents



ls -l



This should show you the mount points of each of the files systems. Go into each one in turn until you find the one with your home directory in it.



Go to your home directory and type the command



ls -lrta



This will list all the files and folders with the newest at the bottom. Look for any recent ones, with date stamps about the time your problem appeared, or that refer to XMBC. Try renaming them to something different - perhaps add -saved to the end of the name.



Hopefully, after you have done this, you will be able to boot up normally. You can then look through the files you have renamed to find which one has caused the problem. If the problem is in a directory, you might have to repeat the process on files in that directory. You can rename a few files at a time back to their original names until you find the problem.



Good luck.
xjonquilx
2012-08-01 16:23:00 UTC
From the Ubuntu boot screen choose the recovery mode. Log in to your account, and then type in "gnome-session" without the parenthesis and press enter to get the GUI up. Then open up a terminal or the run prompt and type in "gdmsetup" (again, no parenthesis) and press enter. This will bring up the GUI controls for GDM. I *think* you can change which desktop environment to log in to from here, but if you can't just disable automatic login and reboot so you can change the session type before you log in. Also, it is generally a bad idea to keep your /home folder on the same partition as your / (root) folder. If you separate them you can reinstall the OS without losing any of your configuration or personal files. Additionally auto login is generally a bad idea from a security standpoint. Do you REALLY want absolutely anyone to be able to log in to your personal computer and view your files?
?
2012-08-01 16:32:05 UTC
I use Debian rather than Ubuntu, so not 100% certain this will work but worth a try.



Normally, which desktop environment a user boots into by default is determined by a hidden file in the home directory called .xinitrc



If desktop crashes you may still be able to access a terminal by using key combination Crtl-Alt-F3.



So to boot into Gnome rather than xbmc edit file with text editor of your choice (eg. emacs).

Make sure all lines are commented out (ie. have # in front of them) apart from one line which reads 'exec gnome-session' (without quotation marks).



Save and reboot.
2016-10-04 02:51:10 UTC
Linux might be a well choice however for my part I might handiest bear in mind that as an alternative if I used to be without doubt certain there used to be no method of gettng home windows again rather than deciding to buy it,feels like you haven't any recuperation discs,theres choices you'll be able to check out earlier than you are making that determination simply examine the movies on youtube you can be ready to save lots of your home windows os however as I have stated linux is a well choice plus its unfastened


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...