Archive for February, 2008

If you re using a (Web hosting asp) keyboard without a number

Friday, February 22nd, 2008

If you re using a keyboard without a number pad as you will be if you reusing a laptop or your machine isn t set up to be able to change on the fly, you need to change your resolution through your display configuration pro- gram. You can find this option at: Fedora:Choose Applications.System Settings.Display. Knoppix:From the main menu, choose Settings.Control Center. Peripherals.Display. Linspire:From the main menu, choose Settings.Control Panel. Look & Feel.Display. Mandrake:From the main menu, choose System.Configuration. Configure Your Desktop.Peripherals.Display. SuSE:From the main menu, choose Control Center.Peripherals.Display. Xandros:Choose Launch.Control Center.Display.Settings. My GUI Is Hung, and I m Stuck! One quick solution to this problem is the key combination Ctrl+Alt+Backspace. If this doesn t do the trick, your system is in really bad shape! Try to switchto a virtual terminal by using Ctrl+Alt+F5. If this key combination also doesnothing, you need to reboot the machine. Help, My Machine Hangs During Boot! When configuring a Linux machine, you may encounter problems with the/etc/grub.conffile. This file indicates the operating system or systems towhich your system can boot, and the file also contains Linux startup settings. Linux can boot from any of your hard drives not just the master IDE driveon the primary IDE channel. Consider this list of potential solutions if the/etc/grub.conffile makes trouble: If you have altered or added hard drives, you may need to change thebootline in the /etc/grub.conffile. If you haven t made hardware changes, check to make sure that your/etc/grub.conffile is referring to the correct location of the Linuximage. (The program code that loads and executes at runtime and islocated in the /bootdirectory.) If the location under the /bootdirectory or the device for the root entryis incorrect, your system can t boot to Linux. In this situation, a rescueor emergency disk is helpful. Refer to Chapter 5 for instructions on usinga rescue disk. 377Chapter 20: Ten Troubleshooting Tips28_

This line appears near the top (Web server extensions) of the

Thursday, February 21st, 2008

This line appears near the top of the file. What you re interested in hereis the number. In most mainstream Linux distributions, the number 5tells Linux to boot into the GUI, and the number 3tells Linux to bootinto the command line. In the preceding example, therefore, I boot intothe GUI. 5.Change the number in this line. If it s a 5, change it to 3, and vice versa. Make sure that all colons andother items are left properly in place, or else your machine will haveproblems booting later. 6.Save and exit the file. The changes go into effect the next time you reboot the system. If you do end up having problems booting the system, in many current Linuxdistributions (including the one that comes with this book) your installationdisk can be used as an emergency boot disk. Check your documentation forinformation about the distribution you re using if it s not Red Hat 10. Changing your boot environment just for nowAt any time, you can have your Linux box switch between full command-linemode and full GUI mode. The instructions I give here assume that you re usingFedora, Mandrake, or SuSE. (Knoppix, Linspire, and Xandros don t give youthis option.) To switch between modes, do the following: To change from the GUI login to the command-line login, open a terminalwindow and type (as root) init 3. To change from the command line login to the GUI login, type (as root) init 5. I Want to Change Screen Resolutions Do you want or need to swap between resolutions in the GUI on the fly? Sup- pose that you want to use 1,024 x 768, but you work on Web pages and want tobe able to see how they look in a browser at 800 x 600 or even 640 x 480. Yourmachine is very likely already set up to do this, but you just need to know how! If your machine is set up for it, you can change resolutions by pressing thekey combination Ctrl+Alt+Plus, where Plus is the big plus (+) sign on yournumber pad you can t use the plus sign on the main keyboard for this one. 376Part V:The Part of Tens

I Don t Want (Web site developers) to Boot into This! Are

Wednesday, February 20th, 2008

I Don t Want to Boot into This! Are you booting into the command-line environment when you want to useonly the GUI? Or are you finding that you re already booting into the GUI andyou would rather boot to that nice, clean, black-and-white command-linescreen? You re not stuck with either of these options. You can change them at any time. You can press Ctrl-Alt-F# to change out of the GUI to a command line terminalat any time and then Alt-F7 or Alt-F8 to switch back. Changing your boot environment permanently The word permanentlyis in quotes in the heading because you can, of course, go back and change this setting later, if you want. Permanentlyjust refers tothe fact that after you have made this change, every time you boot the system, it automatically goes into the preferred environment until you change it. You can t make this change in Linspire or Xandros unless you want to bootinto single-user mode, which is basically safe mode and not much use. Well, okay, you can, but you would need a techie friend to set up a bunch of stufffor you. Linspire and Xandros assume that you don t want to do this. You can tdo this in Knoppix either, but then it s a Live CD so you won t be doing any- thing permanent to it. To make this change in Fedora, Mandrake, or SuSE, you need to edit what scalled a runlevel. Fortunately, all three of these distributions use the samerunlevel settings, so the instructions are the same for all of them: 1.In the GUI, open a command line terminal. If you re not sure how to do so, see Chapter 14. If you re not in the GUIand you re already logged in, type su -to become the root user. 2.Type cp /etc/inittab /etc/inittab.old to make a backup. Now, if something happens while you re editing the inittabfile, youcan always restart fresh with the old version. 3.Open the inittab file in your preferred text editor. Some Linux text editors are covered in Chapter 16.4.Scroll down until you find a line similar to the following: id:5:initdefault: 375Chapter 20: Ten Troubleshooting Tips28_

If you created only the root account, you (Cedant web hosting)

Wednesday, February 20th, 2008

If you created only the root account, you can log in there as root. After you enter the username and password, you find yourself at the screenshown in Figure 20-2, which just happens to be the second spot where peopleget worried. If you see this screen, you have not only booted properly intoLinux, but you re also logged in and using the machine! Give yourself a goodpat on the back. What do you do from here? Anything you want. Surf through this book forcommands you want to run. Type startxto start up the GUI. If you didn tinstall any GUI (which means you selected a minimal install option with nographical interface, or you actually unselected graphics), you may want toreinstall, or you ll have to add all the tools by hand (which is not a quick job!) Figure 20-2: Logged in at the Linux com- mand line. Figure 20-1: A Linuxcommand- line loginprompt. 374Part V:The Part of Tens

Web hosts - and test again. You can then try setting

Tuesday, February 19th, 2008

and test again. You can then try setting things back the way you want themafter the machine is fully installed and updated, when it hopefully will have afix for whatever the problem might be. The Installer Tested My Graphics Fine, but My GUI Won t Start If your Linux installation program showed you a GUI test screen saying thatyou were ready to proceed with the rest of the installation, you probablyexpected that the GUI would start with no problem. Unfortunately, that doesn t always happen. Each distribution has its own set of graphics configuration tools. If you bootyour machine for the first time and see error messages when you re trying toenter the GUI automatically or when you type startxto start the GUI manu- ally, use the following tools to fix the problem: In Fedora Core, use system-config-display. In Knoppix, you don t install. Use the options available when you boot itin order to tell it specifics about your display. In Linspire, use xf86config. In Mandrake, use drakconfand select the Display option. In SuSE, use sax2. In Xandros, use xf86config. Your last resort is xf86config. This fully text-based tool shouldbe available with most distributions. It may be called xf86config4. I Think I m in Linux, but I Don t Know What to Do! Two different screens tend to cause panic to folks new to Linux. The first ofthese screens, shown in Figure 20-1, is in fact a sign that you installed thesoftware and booted the machine successfully. Jump for joy! It s just thatyou re booting into the command-line environment rather than the GUI envi- ronment. If you reach a screen similar to the one shown in Figure 20-1, thecomputer is asking you to log in with the username for an account and a pass- word that you created during the installation process. 373Chapter 20: Ten Troubleshooting Tips28_

5.Tab to the OK button and press Enter (Email web hosting)

Monday, February 18th, 2008

5.Tab to the OK button and press Enter to proceed to the media examination. This step opens the Media Check dialog box. If you ve changed yourmind and just want to start the installation, use the Tab or arrow keys toselect Skip and then press Enter. 6.If you want to test the first CD-ROM or the DVD-ROM, tab to the Testbutton and press Enter. If you want to test another installation CD-ROM, tab to the Eject CD button and press Enter. If you chose the second option, remove the first CD-ROM from theCD-ROM drive and replace it with the CD-ROM you want to test. Closethe CD-ROM drive and make sure that Test is selected. 7.Press Enter to begin the media check. The Media Check status box opens and shows you the name assigned tothe DVD-ROM or CD-ROM and how much progress has been made. At theend of the inspection, the Media Check Result dialog box opens. 8.Look at the text after and the result is. If the result is PASS, nothing is wrong with the DVD-ROM or CD-ROM itself. Your installation woes are caused by something else. Return to the sec- tion The Linux Installer Froze, earlier in this chapter. If the result is FAIL, the DVD-ROM or CD-ROM you just tested is flawed. If you purchased this CD-ROM or DVD-ROM, you need to talk to the com- pany you purchased it from to see whether you can get a replacement. On the other hand, if you burned your own DVD-ROM or CD-ROM, I rec- ommend doing one of the following: Burn the DVD-ROM or CD-ROM again, at a speed of 4x or lower. Burn the DVD-ROM or CD-ROM again on a newer drive withBurnProof technology (www.burn-proof.com) or something similar. If the DVD-ROM that came with this book is defective, contact the technicalsupport address listed in this book, not Red Hat. However, remember that themedia checking routine does not give you a reliable PASS or FAIL for this par- ticular DVD-ROM. I Told the Installer to Test My Graphics, and They Failed The installer may have misguessed what hardware you have. Double-checkthe settings as best you can. If they look right, try choosing a lower resolu- tion for now and testing again, and if that fails try a lower number of colors372Part V:The Part of Tens

fails in (Web hosting companies) the same place there. If you

Monday, February 18th, 2008

fails in the same place there. If you purchased this disk with a Linux dis- tribution, contact the distribution s technical support team. If you gotthe disk with a book, contact the publisher s technical support team. Ifyou burned the disk yourself, try burning a new copy at a slower speed. If this problem happens repeatedly at exactly the same spot and youdon t have a bad installation disk, the trouble may be with one ofyour machine s hardware components.If you can, try trading hardwarebetween machines. If not, you may need to choose a different machineon which to install Linux or try another distribution. If the problem seems to happen randomly, your particular Linux dis- tribution may not be compatible with that particular machine.Again, you can try trading some hardware around, installing Linux on anothermachine, or using another distribution. If you re not sure whether your installer has frozen, try pressing various combinations of Alt+F#, where # corresponds to one of the function keys. Depending on the distribution, the installer has not completely frozen if you can see different screens when you try this technique. For Fedora Core Users with CD-ROMsWhen installing Red Hat Linux 7.3 or later (Fedora Core 3 is considered later ), a special solution is available to people who run into problems that seem tohave absolutely no explanation, such as the installer freezing. This solution doesn t work with the DVD provided with this book, because itcontains more than just the Fedora software, so continue with this sectiononly if you downloaded your own DVD or purchased it from a third party, or ifyou downloaded or otherwise acquired the Fedora CDs. If your installation keeps dying while Anaconda (the Red Hat installer program) is placing packages on your hard drive, follow these steps to try to fix it: 1.Place the DVD-ROM or the first Fedora Core CD-ROM into your drive. 2.Reboot the machine. 3.Wait until you reach the boot screen where you usually press Enter tostart the installation. If you reach a graphical installation screen, you missed the screen you relooking for. You need to reboot, repeat this step, and then proceed. 4.At the prompt, type linux mediacheckand then press Enter. Text scrolls by, and then you see a screen with a bright blue background. Then the CD Found dialog box appears. 371Chapter 20: Ten Troubleshooting Tips28_

Reduce the number of active programs.Stop running unnecessary (Web proxy server)

Sunday, February 17th, 2008

Reduce the number of active programs.Stop running unnecessary ser- vices and applications that aren t related to the problem at hand. You maymore easily figure out what s happening if other services and applicationsaren t getting in the way. Check to see whether the problem is reproducible.Does the samesequence of events produce the same problem? Suppose that when you try to print to a color printer, nothing happens. If nothing happensevery time you attempt to print, the problem is reproducible. If, instead, sometimes your information is printed and at other times it isn t, theproblem pattern isn t the same and isn t reproducible or it s causedby something more complicated than just clicking one button. Unfortu- nately, problems that are nonreproducible are more difficult to resolvebecause it seems that no set pattern of events re-creates those problems. After you ve come up with a solution, take a few moments to document thesituation. Note the symptoms of the problem, its cause, and the solution youimplement. The next time you encounter the same problem, you can call onyour notes for a solution rather than reinvent the wheel. If you don t have any problems to troubleshoot (yet), document your envi- ronment beforeyou do. Making a backup of your /etcdirectory and your/bootdirectory is a great place to start. The Linux Installer Froze When you re installing Linux, the installation may just freeze. If it does, wait a bit and make sure that the installation program really froze. (Sometimes, the software just takes a while to process information.) If the software lookslike it has frozen, there s no harm in rebooting your computer and startingover just as you would do with any operating system installation. Some- times, you can reboot and never have that problem again. At other times, theproblem may happen twice in a row and then be fine the third time. Be sureto try several times before giving up. If the installation still freezes in the same spot or close to the same spot, goto the distribution s support pages (see Chapter 2). These pages may talkabout some known problems and solutions that can help you and shouldshow you how to join discussion lists in order to get more assistance. Otherwise, diagnosing the problem can be tricky and may seem more likevoodoo than science. Here are some tips: If this problem happens repeatedly at exactly the same spot, you mayhave a bad installation disk.If you re a Fedora Core or Red Hat Enter- prise Linux user, see the next section, For Fedora Core Users, and thenreturn here if that technique doesn t solve your problem. Otherwise, trythe disk in another machine if possible and see whether the installation370Part V:The Part of Tens

Chapter 20Ten Troubleshooting TipsIn This Chapter Dealing with (Web and email hosting)

Saturday, February 16th, 2008

Chapter 20Ten Troubleshooting TipsIn This Chapter Dealing with frozen installations Changing your boot environment Recovering when you see some black-and-white text screen! Escaping a hung GUI Using multiple resolutionsTroubleshooting is like reading a mystery novel. You have some facts, symptoms, and details, but you don t know whodunit. You have to takewhatever information you have, work with that data, weigh the various possi- bilities, and then narrow them to a single suspect. Finally, you need to testyour theory and prove that your suspect is the guilty party. Troubleshooting problems in Linux (or any operating system) can encompassmany hardware and software issues. Whether the problem is the operatingsystem, the hardware, or a service giving you fits, you can use some basictroubleshooting techniques to start your investigations: Document the problem.Write down any and all symptoms that thesystem is showing, including actions you can and can t do. Jot down any information you see in error messages. Examine the Linux log files. You can find most of these in the /var/logdirectory. Look for the word error. Compare your problem system with a working system running thesame distribution and version. Sometimes, comparing configurationfiles and settings may uncover the problem or narrow the possibilities. Check connections.Check to make sure that all the hardware is con- nected properly and powered on. Verify that all cables and connectionsare attached properly. There s always someone, somewhere, acciden- tally kicking a cable out from a wall connection. Remove new hardware.Remove any hardware that you have changed oradded recently (before the problem started) and see whether the problemdisappears. If so, you can probably conclude that the new or changedhardware (or its driver) is the culprit and start researching solutions.

In this part . . . In this (Web servers)

Friday, February 15th, 2008

In this part . . . In this part of the book, I cover answers to the questionsmost frequently asked about Linux. I explain some keyLinux installation and setup points, as well as share moreroutine troubleshooting tips and tricks. I also talk aboutthe most popular bootable distribution: Knoppix. Ratherthan telling you just how to use Knoppix like any other dis- tribution (I figure you d like to have an installed machineso that you can enjoy it, rather than just using a LiveCD), you discover some cool ways to make use of Knoppix torescue floundering computers, including Windows boxes. I only hope you enjoy reading this part of the book asmuch as I enjoyed writing it!