Quantcast

Don't have an account? Register Now! Forgot password?

Maximum IT
Features

Linux Troubleshooting Guide: Fix the Most Common Problems

comment Commentsprint Printemail EmailDeliciousDiggStumbleUponRedditFacebookSlashdot

Troubleshooting has always been one of the most frustrating aspects of computer ownership. Due to the practically infinite number of potential problems, it would be utterly impossible to write a how-to guide to fix all of them, but in this article we are going to address some of the most common problems and then present more generalized guidelines that will help you troubleshoot your own problems in an emergency.

Repair the GUI System

One of the most common problems in Linux is a broken GUI configuration. The X Windowing System (Xorg) is the most common GUI system in use on Linux systems today. Unlike the Windows GUI, (which is practically inextricable from the rest of the operating system) Xorg is simply a program that runs on top of the base Linux system. Because of this, it can be easily repaired.

The X Windowing System uses a file called xorg.conf to maintain the GUI configuration. It contains information about your graphics hardware, the driver it uses, (in the case of NVIDIA or ATI devices) your available screen resolutions, and even settings for your input devices. The best way to avoid any problem is prevention, so you should always have at least one backup copy of important files like xorg.conf and be sure to save a copy of the current working version each you make any modifications to it.

Don't panic if the worst happens and you find yourself without a working xorg.conf. The base system is probably still operational and it is possible to carry on without the GUI, although some distros might complain a bit if Xorg refuses to start. Many modern distros (like Mandriva, Ubuntu, and others) have a safe mode or recovery mode that provides a root-level command prompt. From there, you have access to the bash-friendly utilities and tools that are essential to fix your system. Even better than that, your distro probably has a special tool which can repair or completely regenerate xorg.conf.

During our test where we deliberately deleted xorg.conf, Ubuntu 9.04's GUI continued to work, much to our amazement. (we rebooted several times to make sure it was not a glitch) If that is not the case for you, Ubuntu's Recovery Mode has an automated tool called xfix that will try to rebuild xorg.conf without any additional interaction. Once xfix has worked, you will have the option of resuming normal boot. This tool worked perfectly for us on the first try by replacing the xorg.conf file that we erased from our test machine.

For Mandriva, boot into “Safe mode” and run “Xfdrake”.This tool will walk you through the process of rebuilding xorg.conf in a step-by-step interface where you are able to select configuration options from a list. With some knowledge of your hardware and a little luck, this should get you running again.

 

Reinstall GRUB

Many Linux users have dual-boot systems, and this works very well for the most part. Since the Windows bootloader is not very friendly to non-Microsoft operating systems, most distros use a different bootloader called GRUB (Grand Unified Bootloader) that is capable of working with multiple operating systems, including Windows.

Since Windows installations tend to degrade over time, (a phenomenon known as “Windows Rot”) it is inevitable that you must reinstall Windows at some point. If you are using GRUB or a different bootloader, your other operating systems will be inaccessible (but still intact) after a Windows reinstall since the Windows setup process will replace the bootloader without asking you. Although it is possible to reinstall GRUB manually (often through a Live CD distro) there is a tool called Super GRUB that can make the process much easier.

 

Super GRUB is an extension of the regular GRUB bootloader. It comes as an ISO image which may be burned to a CD or placed on a USB stick. (an ideal use for any old low-capacity USB flash drives you may still have) Although it is absolutely tiny by today's standards (weighing in at a little over 4 MB) Super GRUB works like a miniature operating system with several pre-defined tools that can handle many boot-related processes. Super GRUB can automatically find your operating system partitions and use this data to reinstall and configure conventional GRUB. Super GRUB can even even do the exact opposite: remove conventional GRUB and restore the normal Windows bootloader.

 

To use Super GRUB, download and prepare the ISO image for the media format you want to use. Once you have done that, reboot the computer with the Super GRUB disc or USB stick. You will be greeted with a conventional GRUB boot menu with the Super GRUB option on it. You will soon see the Super GRUB main menu. To attempt automated repair, run the “GRUB => MBR & !Linux! (1) Auto ;-) “ option. If that fails, you have the option of repairing GRUB manually. Our only criticism of Super GRUB is that its menus can be rather hard to understand, but it works very well in spite of that.

COMMENTS
avatarLinux article sighting

MaximumPC:  thanks for the Linux exposure guys, keep it up.

th3madscientist:  the nice people at MaximumPC have to find ways to continually deliver computer related content, this article is one of them; unless they are holding out on us, I have yet to read a letter to them from a reader stating their articles broke their PC.  Worry about your own rig and let Linux users play with their system as they choose.

maxFan:  good job, you suceeded in coming across as a punk; if you really care to correct someone learn some diplomacy.

whiplash55:  that's like saying "best fix for dealing with people like whiplash55, get rid of them."  why would you think anyone reading this article would care that you don't understand Linux.

Login or register to post comments
avatarLinux articles

Thanks for the continuing Linux articles and never mind the naysayers. I'm just a hack, but I enjoy experimenting and dual booting my Vista (soon-to-be W7)/Ubuntu Dell laptop, and my aging desktop's XP has been replaced by Fedora. Almost everything on my PC's is open source and/or freeware, in large part due to MPC.

Keep up the good work!

Login or register to post comments
avatarlast step

Best fix for Linux

Install Windows 7 enjoy and decent OS with real games and apps.

Login or register to post comments
avatarPointless

Your going to shoot yourself in the foot following this advice. Your basically saying a non-savy computer user can follow your advice and fix his own computer by using your troubleshooting methods. Wrong, to troubleshoot effectively there is one thing needed and that is experience. With experience all this comes as second nature. You can document all you want, but as soon as someone who doesnt know what they are doing makes a mistake editting the registry and now cannot get into their OS, he has just made the problem worse. Although i do agree with experimentation but you need more knowledge then just hardware, you need to know the ramifications of your actions to experiment effectively not just "oh this did not work, but what do I do now since I can't get back into my OS."

This is like saying oh you can fix your own car if you follow these steps but how to take apart your car and put it back together is none of my concern and if something happens that is out of the ordinary then nothing will help you but someone who is experienced....i want my 2 minutes back.

Login or register to post comments
avatarI just reinstall.... (yes i know, its the geek squad way :)

I know it seems horible but it just makes it easier, and since I dont have a dedicated linux rig I dont want to risk screwing up anything else :( 

Login or register to post comments
avatarGeek Squad

Its linux, they just say your computer isn't working and be nice enough to help you get a new one.

Login or register to post comments
avatarWrong type of reasoning

Sir Arthur Conan Doyle's Sherlock Holmes really confused readers, but crime solving and the scientific method use inductive reasoning, not deductive reasoning.

Login or register to post comments
avatarYour premise is in error. Sorry!

Sigh.  Ok One more time for those of you who STILL dont get it.  The Scientific Method is neither straight Deductive reasoning Nor is it Inductive reasoning.  It is a synergy of both and has elements that are unique to it and belong to no other social endeavour.  

From Wikipedia:

Deductive reasoning, sometimes called deductive logic, is reasoning which constructs or evaluates deductive arguments. In logic, an argument is said to be deductive when the truth of the conclusion is purported to follow necessarily or be a logical consequence of the premises and (consequently) its corresponding conditional is a necessary truth. Deductive arguments are said to be valid or invalid, never true or false. A deductive argument is valid if and only if the truth of the conclusion actually does follow necessarily (or is indeed a logical consequence of) the premises and (consequently) its corresponding conditional is a necessary truth. If a deductive argument is not valid then it is invalid. A valid deductive argument with true premises is said to be sound; a deductive argument which is invalid or has one or more false premises or both is said to be not sound (unsound).

An example of a deductive argument and hence of deductive reasoning:

All men are mortal
Socrates is a man
(Therefore,) Socrates is mortal

And again from Wikipedia:

Induction or inductive reasoning, sometimes called inductive logic, is reasoning which takes us "beyond the confines of our current evidence or knowledge to conclusions about the unknown."[1] The premises of an inductive argument indicate some degree of support (inductive probability) for the conclusion but do not entail it; i.e. they do not ensure its truth. Induction is used to ascribe properties or relations to types based on an observation instance (i.e., on a number of observations or experiences); or to formulate laws based on limited observations of recurring phenomenal patterns. Induction is employed, for example, in using specific propositions such as:

This ice is cold. (or: All ice I have ever touched was cold.)
This billiard ball moves when struck with a cue. (or: Of one hundred billiard balls struck with a cue, all of them moved.)

...to infer general propositions such as:

All ice is cold.
All billiard balls move when struck with a cue.

Another example would be:

3+5=8 and eight is an even number. Therefore, an odd number added to another odd number will result in an even number.

The Scientific Method uses elements of both and is a synergy between the two rather than just one or the other.

Again from Wikipedia:

 

Four essential elements[17][18][19] of a scientific method[20] are iterations,[21][22] recursions,[23] interleavings, and orderings of the following:

Sir Aurthur Conan Doyle's Great Detective used Deductive Logic in nearly (I say nearly although I rather suspect that it was indeed all; however, it has been quite some time since I have read all of his stories so for the nonce I shall equivocate) ALL of his stories.  If you understood Doyle's Science background and his upbringing especially in reference to a aprticular Don of Chemistry he had during his formal education one Professor Bell, who became a template of the Great Detective, you would realize that Holmes used almost pure deduction which as we have seen from wiki starts with a premise that is supposed to be true and then falsifies each argument in turn until there are no more arguments left save one.  That one argument of course when left and assuming that the premise itself is true must also be true by the Identity principle: A union B must be equal to  B union A.  All things equal to each other must be equal to themselves.

Holmes actually makes reference to this in the story The Blanched Soldier:  "When you have eliminated all which is possible, then whatever remains, however improbable, must be the truth."  This is the essence of deductive reaasoning or logic.  Assuming that the premise is true this particular method works 100% of the time provided that A the premise one starts with IS indeed true and B that you have investigated and eliminated ALL that is impossible for a given premise to be true and C that you have been honest with your self about both the premise and your observations. Indeed Holmes propounded on the latter quite vehemently in several stories where he is involved.  Case in point "A Scandal In Bohemia":  It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.

Before you equate one argument to another or decide that one methodology must use a particular type of logic or reasoning.  Please make sure you understand the actual definition of both the Methodology AND the logic or reasoning.

 

 

 

Login or register to post comments
avatarA spell checked version of

A spell checked version of your nifty user name would of been nice.

Otherwise, great name.  

Ah, lol, I kid.  I actually agree, a nice 1680x1050 res img would be cool for a wallpaper on my desktop!

Login or register to post comments
avatarA higher res picture of that

A higher res picture of that nifty flowchart would be nice.

 Otherwise, great article. Will probably be very useful to me in the near future.

Login or register to post comments
This Month's Issue
FEATURE Windows XP/Vista/7 Tips!FEATURE Monitor Roundup: 7 LCDs ReviewedHOW TOMaster PhotoshopFEATUREAMD's Awesome New GPUWHITE PAPEROrganic LEDs