BUY THIS BOOK
Add to Cart

Print Book $34.99


Add to Cart

PDF $27.99

Safari Books Online

What is this?

Add to UK Cart

Print Book £21.99

What is this?

Looking to Reprint or License this content?


Knoppix Hacks
Knoppix Hacks, Second Edition Tips and Tools for Hacking, Repairing, and Enjoying Your PC

By Kyle Rankin
Book Price: $34.99 USD
£21.99 GBP
PDF Price: $27.99

Cover | Table of Contents | Colophon


Table of Contents

Chapter 1: Boot Knoppix
Throughout this book, Knoppix is described as the Swiss Army knife for system troubleshooting and repair. Like a Swiss Army knife, Knoppix has many handy tools, both general-purpose (like a knife or a screwdriver) and special-purpose (like a corkscrew). Some of these tools are used for specific repairs, while others are used for routine maintenance.
You should not use a Swiss Army knife for the first time when you are locked in a room with a bomb that is just seconds away from exploding—we can't all be MacGyver. Likewise, you should familiarize yourself with Knoppix before you use it to attempt to rescue your sick notebook that you never backed up or the company's failed accounting server. This chapter starts you on the path to Knoppix mastery by beginning at the beginning: booting Knoppix. By using the cheat codes and boot time options covered in this chapter, you should be able to get Knoppix to boot on almost any x86 computer.
The first hacks in this chapter highlight the basics for obtaining the latest version of Knoppix and getting to the boot: prompt. All new computers support booting from an optical (CD or DVD) drive, and many computers attempt to boot directly from a CD rather than from the hard drives on the system. In case your computer doesn't support booting directly from a CD, I have included instructions for booting Knoppix from a floppy disk and from the network.
The second part of this chapter covers cheat codes—options you pass at the boot: prompt in Knoppix to change its behavior. When talking about cheat codes, I'm really talking about ways in which Knoppix's hardware detection and support might fail and how to work around such failures. By the end of this chapter, you should be comfortable with booting Knoppix on a variety of computers and be ready to use the desktop environment.
I remember introducing a friend of mine to Knoppix on a laptop. We were at the university library, and he couldn't get his wireless card to connect to the library's wireless network with his current Linux distribution. We decided to give Knoppix a chance. Without using any cheat codes, we found that Knoppix booted with full video and sound support, and his wireless card was not only detected, but Knoppix automatically connected it to the wireless network!
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Hacks 1–11
Throughout this book, Knoppix is described as the Swiss Army knife for system troubleshooting and repair. Like a Swiss Army knife, Knoppix has many handy tools, both general-purpose (like a knife or a screwdriver) and special-purpose (like a corkscrew). Some of these tools are used for specific repairs, while others are used for routine maintenance.
You should not use a Swiss Army knife for the first time when you are locked in a room with a bomb that is just seconds away from exploding—we can't all be MacGyver. Likewise, you should familiarize yourself with Knoppix before you use it to attempt to rescue your sick notebook that you never backed up or the company's failed accounting server. This chapter starts you on the path to Knoppix mastery by beginning at the beginning: booting Knoppix. By using the cheat codes and boot time options covered in this chapter, you should be able to get Knoppix to boot on almost any x86 computer.
The first hacks in this chapter highlight the basics for obtaining the latest version of Knoppix and getting to the boot: prompt. All new computers support booting from an optical (CD or DVD) drive, and many computers attempt to boot directly from a CD rather than from the hard drives on the system. In case your computer doesn't support booting directly from a CD, I have included instructions for booting Knoppix from a floppy disk and from the network.
The second part of this chapter covers cheat codes—options you pass at the boot: prompt in Knoppix to change its behavior. When talking about cheat codes, I'm really talking about ways in which Knoppix's hardware detection and support might fail and how to work around such failures. By the end of this chapter, you should be comfortable with booting Knoppix on a variety of computers and be ready to use the desktop environment.
I remember introducing a friend of mine to Knoppix on a laptop. We were at the university library, and he couldn't get his wireless card to connect to the library's wireless network with his current Linux distribution. We decided to give Knoppix a chance. Without using any cheat codes, we found that Knoppix booted with full video and sound support, and his wireless card was not only detected, but Knoppix automatically connected it to the wireless network!
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Boot Knoppix on a Desktop
The common PC desktop is a great place to begin experimenting with Knoppix.
For a long time, Knoppix was released only on CD-ROM. Over time, however, the space restrictions on a CD-ROM made it more difficult for new releases to come out since Klaus Knopper had to figure out which software to keep and what to take out. Starting with Knoppix 4.0, Klaus split up Knoppix into a CD and a DVD release. The CD still had the same software that it always had for the most part, but the DVD included all sorts of new software such as the complete Gnome desktop environment, which had to be removed from the CD for space reasons.
For some computers, booting Knoppix is as simple as putting the CD in the CD-ROM drive or the DVD in the DVD-ROM drive and restarting the computer. For some computers, however, booting Knoppix might require changing the boot order in the BIOS. The BIOS is the screen that appears when you first boot a machine, and it usually lists the amount of RAM and the hard drives it detects. Older systems that don't support booting from a CD require that you boot from a floppy.
If your computer supports booting from a CD-ROM or DVD-ROM, [] but won't boot Knoppix by default, your problem is probably the system boot order setting in the BIOS. To change the boot order and save it, you must enter the BIOS setup, which you can do at boot time by pressing a special key. Some BIOSes tell you at boot time the key to press to change BIOS settings; the common ones are Esc, F2, and Del.
On many BIOSes, you can skip directly to a boot media selector by pressing the F12 key.
Once in the BIOS, find the section that changes boot device order. On some BIOSes, this setting is changed by selecting a tab along the top labeled Boot, while on others the option may be named "Boot device order" or something similar. Once you have found this setting, move the CD-ROM or DVD-ROM device so that it is listed before any hard drives. If you can't find or change this option, or you need other information specific to you system, refer to the BIOS manual that should have come with your computer or motherboard (you can often find out the BIOS key by searching Google for your computer model and the word "BIOS"). Once you have changed the boot device order, save your settings (doing this should also reboot the computer), and after your system boots and detects the Knoppix disk, you will be placed at the Knoppix boot prompt.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Boot Virtualized Knoppix
Try out the Knoppix DVD in a self-contained virtualized environment on Windows without rebooting your computer.
While it's certainly very easy to boot a Knoppix disk to try it out, you may want to show Knoppix to a friend or try it out without rebooting the computer and closing any windows you currently have open. If you have the Knoppix DVD, there is a solution for you. Added to the regular Knoppix software on the disk is a Qemu virtual machine environment (http://fabrice.bellard.free.fr/qemu/) that is already set up so that you can boot the Knoppix machine completely within Qemu and try it out without rebooting or even closing any other windows on your desktop.
To try this out under Windows, insert your Knoppix DVD. The autorun is configured to open the Knoppix page within a web browser, but close that and then open My Computer, find the DVD drive, and right-click on it and select Explore. Open the qemu directory that is the root of the DVD filesystem and then click on the start.bat file you see within. That's it! Qemu will automatically start and you will be greeted with the Knoppix boot screen (). Click within the window if you want to enter any cheat codes, or otherwise just wait and it will boot automatically. Hit Ctrl-Alt at any point if you want your mouse and keyboard focus to leave the Qemu environment and go back to your desktop.
When you are finished using Knoppix, shut down the virtualized Knoppix as you normally would, or just close the window in which it is running.
Figure : Running Knoppix from a virtualized host with Qemu.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Get Knoppix
Knoppix can be downloaded from the Knoppix mirrors or purchased from an online site.
This book includes a copy of Knoppix 5.1.1 DVD from 2007-01-04 (KNOPPIX_V5.1.1DVD-2007-01-04-EN), which was the last release in the 5.1 series. All of the hacks have been tested and written in terms of this release, but most hacks should work fine across newer releases.
Even though new, major versions of Knoppix are released every year or so, new, incremental releases occur very frequently. These incremental versions have the latest updates to all the software on the disk, the latest Linux kernels, and sometimes, new features. New software updates offer bug fixes and new-and-improved features. New kernel updates often mean better hardware support; if an older version of Knoppix doesn't boot on your computer, the latest release of Knoppix might give you better results. Sometimes new features are added in incremental releases in the form of improved hardware detection, extra Knoppix configuration tools, or new cheat codes []. In general, if you need to address a problem with your Knoppix disk, the latest release might fix it.
To obtain the latest version of Knoppix, download the CD or DVD image from one of Knoppix's mirrors or send away for a copy. If you have an unmetered broadband Internet connection and a CD-R/RW or DVD-R/RW drive, simply download the CD or DVD image; it's the best way to get Knoppix. A collection of mirrors listed at http://www.knopper.net/knoppixmirrors/index-en.html provides images in ISO format over http, ftp, or rsync. (I've found the kernel.org mirror to be consistently fast.) If you use Bittorrent (a peer-to-peer file sharing application designed for sharing large files), you can use the Knoppix torrent link on this page. When you click on a mirror, you are taken to a licensing agreement page. Have your lawyer read through the software license (your lawyer reviews all of your software licenses before you accept, right?), click Accept to proceed, and then choose a file from the list that is presented. In addition to the latest version of Knoppix, most mirrors host a few past images with their MD5sum, which you can use to verify that the file downloaded correctly.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Use Knoppix Cheat Codes
Cheat codes are extra instructions you type at boot time that change many of Knoppix's settings. On some hardware, these codes may be necessary to get the most out of Knoppix.
Knoppix is good at automating many of the tasks that Linux users often conduct manually, such as hardware configuration, setting up the network, and logging into a desktop. If you want to customize options or change what Knoppix automatically runs, you can enter special commands at the boot prompt, which Knoppix refers to as cheat codes. Cheat codes are a reference to the secret passwords or key sequences entered in video games to get unlimited lives or other special items. Fortunately, cheat codes in Knoppix are simple words you type at the boot prompt, and not complicated joystick sequences like up, down, up, down, left, right, left, right, B, A. The cheat codes aren't secret either. Open the Knoppix disk under your current OS and browse to the KNOPPIX directory. The cheat codes file is called knoppix-cheatcodex.txt. You can also reference a list of the most frequently used cheat codes by pressing F2 at the boot prompt.
To use cheat codes at the boot prompt, type knoppix to select the default kernel, followed by the cheat codes you wish to use. For example, if your Knoppix disk doesn't work the way you expect, you can test it for any physical errors on the disk; at the boot: prompt, type the following command:
	knoppix testcd
lists many of the settings and options you can change from the boot: prompt using cheat codes.
Table : Some of the Knoppix cheat codes
Cheat Code
Purpose
knoppix testcd
Check CD/DVD data integrity and MD5sums
knoppix desktop=beryl|fluxbox|gnome|icewm|kde|lg3d|larswm|twm|openbox|wmaker|xfce|xfce4
Use specified window manager
knoppix 2
Runlevel 2, Textmode only
knoppix noeject
Do NOT eject CD after halt
knoppix noprompt
Do NOT prompt to remove the CD
knoppix splash
Boot with fancy background splashscreen
For example, if you want to use the fluxbox window manager instead of the default KDE desktop, type the following at the boot: prompt:
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Speak Different Languages
One of the advantages of Linux is its native language support. Knoppix is provided in English and German versions, but other languages are supported.
Knoppix's popularity has spanned the globe, and as a result, it comes bundled with support for many different languages. Although versions exist that default to German or English, Knoppix can easily boot into many different languages through the use of cheat codes. This hack covers the language cheat codes shown in .
Table : Language cheat codes
Cheat Code
Purpose
knoppix lang=cn|de|da|es|fr|it|nl|pl|ru|sk|tr|tw|us
Specify language/keyboard
knoppix keyboard=us
Use a different console keyboard
knoppix xkeyboard=us
Use a different X keyboard
knoppix tz=America/Los_Angeles
Use a particular time zone
When changing language options, the lang cheat code is the main cheat code to use. To change the default language to Spanish, for instance, simply pass the cheat code at the boot: prompt:
	lang=es
This cheat code takes care of all of the locale options, so that all menus, prompts, the desktop environment, and the keyboard are set to the specified language.
Many beta Knoppix CDs come only in German versions. The differences in the German and English keyboard layouts make themselves apparent when you try to enter the lang=us cheat code. The = key on the German keyboard can be entered with Shift-0, the / key is located at Shift-7, and the _ key can be typed with Shift-/. If you want to enter the keyboard or xkeyboard cheat code, keep in mind that the Z and Y keys on the German keyboard are swapped compared to their English counterparts.
To change the keyboard mapping separately from the default locale, use the keyboard and xkeyboard cheat codes. These options change the keyboard language used on the console and graphical desktop respectively.
If Knoppix doesn't choose your correct time zone, you can either wait for the desktop to boot and right-click on the clock in the bottom right-hand corner to change it, or you can use the tz cheat code to specify a particular time zone to use. You can get the proper name for a particular time zone within Knoppix—just open a terminal and run the
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Free Your CD to Make Knoppix Run Faster
Make Knoppix run faster by loading the Knoppix image to RAM or saving it to the hard drive. This also frees your CD-ROM drive for other uses.
Compared to other live-CD distributions, Knoppix runs surprisingly quickly, considering that it downloads data from a compressed image on the disk. If you want to speed things up, but aren't ready to install Knoppix on your hard drive just yet, there are cheat codes that allow you to copy the complete Knoppix disk image to either RAM or a partition on your hard drive, and run it from there. (If you are ready to install it on your hard drive, see .) These cheat codes give you the added benefit of freeing up the disk drive for other uses—particularly handy if you have only a single disk drive in a system; you can play music or burn CDs/DVDs while using Knoppix.
The toram cheat code instructs Knoppix, before it does anything else, to create a large ramdisk and copy the complete CD there. A ramdisk is a virtual hard disk that your operating system creates by setting aside a certain amount of your RAM. When you boot with this cheat code, Knoppix warns you that it might take some time to copy the full image and provides a progress bar while the image is copying. The Knoppix CD image is approximately 700 MB by itself, so this option is only for those of you with 1 GB or more RAM in your system: even after copying the CD to RAM, Knoppix still needs a good portion of the RAM for loading applications and writing temporary files. To load the entire DVD to RAM, you will need at least 4.4 GB available. Knoppix will detect whether you have enough RAM for this cheat code as it boots, and if you don't have enough, it alerts you that it ran out of space and cannot complete the copy and drops back to loading directly from the CD-ROM.
If you don't happen to have large amounts of RAM in your system, you can still free up your CD-ROM drive by using the tohd cheat code. Similar to the toram cheat code, this cheat code copies the complete CD image to a partition on your hard drive. This partition can be almost any filesystem that the Knoppix supports, including Windows filesystems such as FAT, FAT32, and NTFS. Keep in mind that FAT filesystems don't support DVD-sized files, so if you use the DVD you can only use the
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Straighten Out Your X Settings
Finely tune X Windows to get the most out of your video hardware, and work around hardware detection mistakes.
Knoppix detects video card and monitor settings pretty well. If it can't detect any better settings, it tries to at least set up a generic environment for X. Even with its excellent hardware detection, sometimes Knoppix is unable to detect everything it needs to set up X the way you would like. If X won't start up correctly or at all, you might be able to get things working with the variety of cheat codes Knoppix provides for X, as shown in .
Table : Cheat codes for X settings
Cheat Code
Purpose
knoppix screen=1280x1024
Use specified screen resolution for X
knoppix depth=16
Use specified color depth for X
knoppix xvrefresh=60 (or vsync=60)
Use 60 Hz vertical refresh rate for X
knoppix xhrefresh=80 (or hsync=80)
Use 80 kHz horizontal refresh rate for X
knoppix xmodule=ati|fbdev|mga|nv|radeon|savage|s3|svga|i810
Use specified Xorg module
knoppix wheelmouse
Enable IMPS/2 protocol for wheel mice
knoppix nowheelmouse
Force plain PS/2 protocol for PS/2 mouse
knoppix vga=normal
No-frame-buffer mode, but X
fb1280x1024
Use fixed frame-buffer graphics (1)
fb1024x768
Use fixed frame-buffer graphics (2)
fb800x600
Use fixed frame-buffer graphics (3)
Knoppix attempts to automatically detect the highest resolution at the highest color depth your computer supports, and starts X at that resolution and depth. For some computers, these maximum settings might be hard on the eyes: Screen flicker may occur when refresh rates are too low, or tiny icons may occur when a resolution is too high. In these circumstances, you can usually fix the problem by using a few cheat codes to change your X server settings.
The screen cheat code lets you specify exactly at which resolution to run X. For instance, if your 15-inch monitor can support 1024 by 768, but 800 by 600 is more comfortable on your eyes, type the following at the boot: prompt:
	screen= 800x600
Similarly, the depth cheat code lets you configure how many bits per pixel for X to use to display color (for instance, the cheat code
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Use Advanced Knoppix Cheat Codes
Choose advanced options for system tweaking and booting on exotic systems.
Knoppix's cheat codes let you change many of its default behaviors. These range from which desktop environment to use to whether or not to eject the CD at shutdown. While many of the cheat codes are merely enhancements to the defaults, there is also a full set of advanced options. Many of these advanced cheat codes can help you work around bugs in your hardware or in Linux's support of your hardware, or disable default options that could prevent Knoppix from booting. Some of the more advanced cheat codes for Knoppix are listed in .
Table : Advanced cheat codes
Cheat Code
Purpose
knoppix no{acpi,apic,agp,apm,audio,detectionddc,firewire,isapnpbios,pcmcia,scsi,swap,usb}
Skip parts of hardware
Failsafe
Boot with (almost) no hardware detection
knoppix pci=bios
Workaround for bad PCI controllers
knoppix mem=128M
Specify memory size in megabytes
knoppix dma
Enable DMA for all IDE drives
knoppix noideraid
Disable IDE RAID detection
Sometimes you might need to skip parts or full sections of Knoppix's hardware detection so that it will boot on a particular system. On some hardware, certain parts of Knoppix's hardware detection are known to freeze a system. On other systems, you might want to disable certain pieces of hardware you know are unstable. Knoppix allows you to use all of the standard Linux kernel parameters to disable as much of the hardware as you want. To disable a particular part of the hardware, just type no followed by the type of hardware to disable, such as noaudio to disable sound card detection. If you aren't sure which phase of hardware detection is failing, the expert mode [] walks you through each phase step by step so you can see how far along Knoppix gets before running into trouble.
The complete list of kernel parameters is listed along with every kernel's documentation in the Documentation/kernel-parameters.txt file, which can be found at /usr/src/linux/Documentation/kernel-parameters.txt on the Knoppix CD.
There are many different kernel parameters you can use to disable hardware, but a few of these are well-known for booting Linux on problematic machines. A commonly suggested fix for many Linux boot problems is to disable APIC support (used for interrupt control in some multi-processor systems), which can be done with the
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Run Knoppix on a Laptop
With laptop sales on the rise, it is increasingly common that your desktop machine is actually a laptop. Knoppix provides cheat codes and other options so it can boot on laptop hardware.
If any type of hardware will make you resort to cheat codes and kernel-parameter voodoo to boot Knoppix, laptops will. Laptop manufacturers often resort to using special proprietary hardware that often has little to no support in the Linux kernel. Some laptops don't even include an internal IDE CD-ROM drive, and instead have an external PCMCIA, USB, or IEEE1394 CD-ROM. On Knoppix, support for the CD-ROM after the BIOS boots is pretty important! Laptops also rely on power management features that can be iffy at times. None of these issues should scare you away from trying Knoppix on a laptop. Many of these problems can be solved or at least worked around using cheat codes.
Knoppix is one of the best distributions when it comes to getting laptops working out of the box. I recommend taking a Knoppix disk with you when shopping for laptops; it is one of the best ways to see how well Linux will run on that machine. Convincing the clerk at Best Buy to let you boot with Knoppix will be your real challenge.
The specifics of tweaking display settings have been covered already in []. Some of those cheat codes are particularly useful when setting up a laptop or desktop LCD display. Laptops use LCDs that have an ideal resolution even if they can display other resolutions. The fb cheat code is useful in these cases, because on some displays, running the console below the maximum resolution results in the desktop still being displayed with black bands around it (if not, text and images may appear jagged because your LCD panel scales up from the lower resolution to its maximum). To display a framebuffer console on a laptop that has an ideal resolution of 1024 x 768, boot Knoppix with:
	fb1024x768
In some cases, Knoppix may not detect the laptop's video card or may detect it incorrectly. If forcing Knoppix to use a particular module with the xmodule cheat code doesn't work, but the console displays fine, boot with
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Explore Expert Mode
Do-it-yourself types may not like all of the automatic configuration and hardware detection that Knoppix does. For people trying to troubleshoot and for the just plain curious, Knoppix provides an expert mode.
The goal of the Knoppix expert mode is to provide the user with complete control over the different steps that Knoppix performs when booting a system. Each step that Knoppix normally performs automatically behind the scenes is presented to the user with a prompt allowing you to configure exactly what Knoppix will do or won't do. This can be particularly useful if you have a system that gets halfway through the boot process, and then mysteriously restarts. With the expert mode, you can see exactly which step in the Knoppix boot process has caused the boot to fail so you can bypass that step next time.
To start into the Knoppix expert mode, simply type this cheat code at the boot: prompt, followed by any other cheat codes you might want to use:
	expert
Knoppix starts by listing all of the SCSI modules available on the system followed by the question: "Load SCSI Modules?" At the prompt, you have the option of typing in the names of any SCSI modules you wish to load, or n for none. If you just hit Enter, Knoppix probes for which SCSI modules to load just like it does by default. After making your choice, you should notice that, in expert mode, Knoppix gives much more output, telling you which particular devices it is probing for and if the modules load successfully or not.
Next, Knoppix asks, "Do you want to load additional modules from floppy disk? [Y/N]." This option gives added flexibility to Knoppix in the case that the default Knoppix kernel doesn't have a third-party module that you need for your hardware. After you answer this question, Knoppix enables DMA acceleration for IDE devices, creates the ramdisk, and starts the init process. Knoppix then notifies you that you have entered the interactive configuration's second stage.
The interactive second stage gives you the opportunity to reconfigure many of your hardware settings through a series of questions. The first question is: "Do you want to (re) configure your console keyboard? [Y/N]." If you forgot to set the console keyboard to match your locale, you can now configure it. Following that is an option to configure your sound card. Select "yes" to launch the
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Check RAM for Errors with Memtest86+
Memtest86+ is a stand alone, BIOS-based memory test designed for x86 computers. It's an updated version of the original Memtest86 software that adds more updated hardware compatibility. The official project page is at http://www.memtest.org and lists detailed information about the program.
This software is included with Knoppix and can be launched with the memtest kernel mode option. Instead of booting into Knoppix, you boot directly into the Memtest86+ software and start the scan. Memtest86+ runs a number of different types of memory tests in an indefinite loop, but a single pass should be sufficient to determine whether a system has bad memory and should be replaced. RAM errors can lead to frustrating system instability and random lockups. Memtest86+ runs several relatively quick tests that include writing different patterns of data to RAM and checking that the patterns were written correctly, and checking that neighboring blocks of RAM weren't influenced by what was written. Even if you have bad RAM, you might pass many—if not most—of the tests Memtest86+ performs, so by default Knoppix will have Memtest86+ perform all of its tests, each designed to highlight different potential RAM problems.
As Memtest86+ runs, it reports errors it finds at each phase of the test directly on the screen along with a running tally. You also have the option of outputting a BadRAM pattern instead. BadRAM is a Linux kernel patch created by Rick van Rein and hosted at http://rick.vanrein.org. This patch allows you to tell the Linux kernel to ignore bad sections of memory so it can continue with what is left. By doing this, you don't necessarily have to throw away RAM that has errors. To tell Memtest86+ to output BadRAM patterns, type c to pause the test and enter the configuration menu, 6 to enter the "Error Report Mode," and 2 to select BadRAM patterns, then hit 8 to restart the test.
By default, Memtest86+ will launch directly into the test, but if you are an advanced user, you can press c to enter the configuration menu and change test settings.
If you are interested in what Memtest86+ is doing (on a basic level), here are the different test descriptions from the Memtest86+ documentation:
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 2: Use Your Knoppix Desktop
Every Swiss Army knife comes with a diagram that lists the different tools of the knife and explains their function. At first, everything may seem clear, and you may believe you understand everything necessary about your new knife. But, as you use it, you realize that you don't really know why it has three different-sized knife blades or what the different saws should be used for, and you find yourself wishing you had paid more attention to that diagram.
This chapter is that diagram for your Knoppix CD. The start of this chapter is particularly geared toward people who are new to the Linux desktop. This chapter explains some basics, such as what a KDE panel is and how to find applications to run. If you are already experienced with using a Linux desktop and programs, such as OpenOffice.org and Firefox, you might want to skip ahead to the end of the chapter where I talk about connecting to the Internet in [] and [].
The first few hacks introduce you to the default Knoppix desktop environment and get you comfortable with the purpose of the different desktop items and the location of available programs.
Later in the chapter, hacks are devoted to different application categories—from office programs to Internet programs to games. These hacks cover the desktop tools Knoppix includes for these different categories and get you started using them.
Once you finish this chapter, you should be able to comfortably navigate through the Knoppix desktop, use all of the desktop applications Knoppix has, and connect to the Internet. At that point, you will be ready for the next few chapters, which cover specialized tools included with Knoppix and their more advanced uses. But for now, on to the desktop!
After you have booted Knoppix, figure out what these windows, icons, and strange panels are for.
If you have successfully booted Knoppix, as mentioned in , you should now be looking at the default Knoppix desktop, as shown in .
Figure : The default Knoppix desktop
Probably the first element that grabs your attention is the Konquer or web browser window that opens when K Desktop Environment (KDE) is started. KDE is one of the two most popular desktop environments for Linux (Gnome being the other). KDE's job is to manage your complete desktop environment. It draws your wallpaper, provides you with access to your pro-grams through the menus and icons on the desktop, and manages the windows that appear once you launch an application. Once KDE starts, the first thing you see is the Knoppix help page. This web page contains information and help for Knoppix in many different languages, and includes links to sites to purchase Knoppix CD or DVDs, as well as get additional information.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Hacks 12–24
Every Swiss Army knife comes with a diagram that lists the different tools of the knife and explains their function. At first, everything may seem clear, and you may believe you understand everything necessary about your new knife. But, as you use it, you realize that you don't really know why it has three different-sized knife blades or what the different saws should be used for, and you find yourself wishing you had paid more attention to that diagram.
This chapter is that diagram for your Knoppix CD. The start of this chapter is particularly geared toward people who are new to the Linux desktop. This chapter explains some basics, such as what a KDE panel is and how to find applications to run. If you are already experienced with using a Linux desktop and programs, such as OpenOffice.org and Firefox, you might want to skip ahead to the end of the chapter where I talk about connecting to the Internet in [] and [].
The first few hacks introduce you to the default Knoppix desktop environment and get you comfortable with the purpose of the different desktop items and the location of available programs.
Later in the chapter, hacks are devoted to different application categories—from office programs to Internet programs to games. These hacks cover the desktop tools Knoppix includes for these different categories and get you started using them.
Once you finish this chapter, you should be able to comfortably navigate through the Knoppix desktop, use all of the desktop applications Knoppix has, and connect to the Internet. At that point, you will be ready for the next few chapters, which cover specialized tools included with Knoppix and their more advanced uses. But for now, on to the desktop!
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Explore the Desktop
After you have booted Knoppix, figure out what these windows, icons, and strange panels are for.
If you have successfully booted Knoppix, as mentioned in , you should now be looking at the default Knoppix desktop, as shown in .
Figure : The default Knoppix desktop
Probably the first element that grabs your attention is the Konquer or web browser window that opens when K Desktop Environment (KDE) is started. KDE is one of the two most popular desktop environments for Linux (Gnome being the other). KDE's job is to manage your complete desktop environment. It draws your wallpaper, provides you with access to your pro-grams through the menus and icons on the desktop, and manages the windows that appear once you launch an application. Once KDE starts, the first thing you see is the Knoppix help page. This web page contains information and help for Knoppix in many different languages, and includes links to sites to purchase Knoppix CD or DVDs, as well as get additional information.
The help is available offline, which makes it very useful even when your network connection isn't working.
The desktop itself contains shortcuts to the hard drives, CD/DVD-ROMs, and floppy drives on your system (see ). Click on any of the drive icons to automatically mount the drive as read-only and open up the mounted filesystem in Konqueror. Under KDE, the default is set to open a directory or launch a file with a single click, which might take some adjustment if you are used to double-clicking icons on the desktop. Because Knoppix defaults to mounting these filesystems as read-only, you can view and open the files you see, but you can't edit, delete, or move any of the files on these filesystems. You can, however, copy the files to your desktop and edit them from there. To make these filesystems writable, right-click on the drive icon and select Change read/write mode. The right-click menu also gives you options to unmount and, if the device is a CD-ROM, to eject the media.
Figure : Desktop icons
The KDE panel spans the entire bottom portion of your screen. On the left of the panel is the K Menu, represented by the K Gear icon. Click on this icon to display the K Menu, which contains most of the graphical applications and some of the command-line applications within Knoppix organized into categories such as Editors, Games, Internet, and Settings (see ). If you are new to KDE, Linux, or Knoppix, you will want to explore each of the categories in this menu and get acquainted with how all of the applications on the CD are organized.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Customize the Desktop Look
The look of Knoppix's default desktop doesn't appeal to everyone. KDE has many tools to change the look and feel of the desktop.
Let's face it. People have different tastes. The themes, window borders, fonts, and colors that Klaus Knopper has chosen for himself might not appeal to you. If you don't like how Knoppix looks by default, you'll be pleased to find that Knoppix's flexibility extends to changing how it looks.
Probably all of the changes you want to make in how the desktop looks and feels can be made from within the KDE Control Center. To start this program, click K Menu → Control Center. The KDE Control Center presents a listing of different configuration categories that let you change many different settings on the desktop. For our purposes, let's stick to the first category, "Appearance and Themes." Click on that category to expand the listing and display all of the different choices for changing the appearance. There are a number of different settings you can change:
Background
Change the wallpaper that appears on the desktop. You can choose many different images (look under /usr/share/wallpapers), pick a number of color gradients, or even configure a slide show.
Colors
Customize the color scheme for all of the buttons, menus, and text.
Fonts
Pick your favorite fonts to be used in the toolbar, the desktop, menus, and so on.
Icons
Knoppix includes only a single icon theme, but you can download new icon themes from sites such as http://www.kdelook.org.
Launch Feedback
Control what KDE does when you launch applications. If that bouncy cursor is driving you nuts, disable it here.
Screen Saver
Enable and change the settings for the screen saver. Unfortunately, Knoppix does not include many screensavers by default.
Splash Screen
Choose from a list of graphical splash screens that show you the progress when KDE starts.
Style
Configure widget styles. If you don't like the rounded, three-dimensional buttons that Knoppix defaults to, change them here.
Theme Manager
Pick particular themes packages that have pre-set options for the rest of these settings.
Window Decorations
Configure the look and placement of the title bar and buttons on all of your windows.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Get Office Work Done
You can't get much work done in an office these days without an office suite. Use OpenOffice.org and Kontact to turn any computer into your office workstation.
The inclusion of a complete suite of office tools in Knoppix (including all of OpenOffice.org) means that not only can you try out Linux with a full-featured desktop, but you can also get your work done while you're at it. This hack discusses how to use Knoppix to create and edit documents, spreadsheets, and presentations, as well as manage your contacts and appointments.
Microsoft Office has in many ways defined how people get work done in an office environment. To many people, there is no word processor other than Word, no spreadsheet program other than Excel, and no email client other than Outlook. For any new office suite to get any user interest at all these days, it must tout compatibility with the file formats Microsoft Office uses, and the office suites available under Linux are no exception. Knoppix pro-vides the OpenOffice.org suite, and if you have the DVD, the Kontact personal information manager. While these programs do take some getting used to if you are accustomed to Office, after a bit of adjustment you should find you can easily get your office work done under Knoppix.
When I introduce Linux to a Windows user, one question that often comes up is "Can I open all of my Word documents?" As a system administrator friend of mine (who likely dealt with the famous Word 95 and Word 97 compatibility issues) quipped, "OpenOffice.org's compatibility with Word is at least as good as Word's compatibility with Word."
OpenOffice.org is an open source office productivity suite that touts compatibility with many of the popular office file formats, including Microsoft Word, Excel, and PowerPoint, and runs on a variety of platforms, including Linux, Windows, and Solaris. The OpenOffice.org tools I discuss are the word processor Writer, the spreadsheet Calc, and the presentation software Impress.
Word processor. OpenOffice.org Writer is a full-featured word processor with support for spellchecking, macros, revision tracking, and most of the other features you expect to find in a word processor. It touts compatibility with many different versions of Microsoft Word and can even export a file to PDF. Writer, like all of the programs in the suite, saves files in an open XML-based format that takes up very little space.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Configure Your Printer
Even in an increasingly digital world, sometimes you still need a hardcopy of your files. The KDE printer manager has a lot of options, and this hack guides you through them.
If you have taken advantage of any of the office applications from [], you might find yourself wanting to print out some of the work that you have done. Knoppix's excellent hardware support extends to printers, and Knoppix provides a simple graphical configuration tool for setting up any printers you may need to use.
Click K Menu → KNOPPIX → Configure → Configure printer(s) to launch the KDE printer manager. In this application, you should find that a few special printers for faxing and printing PDFs have already been created for you. These default printers are provided by the Common Unix Printing Sys-tem (CUPS) that is running on the Knoppix CD. CUPS is the standard printing system on most Linux distributions and is even the underlying print technology behind Apple's OS X operating system. To launch the new printer wizard to add a new local printer, click Add → Add Printer/Class…
The printer wizard has support for many types of printer connections, and this hack describes some of the more common ones. After the first few questions, the configuration is the same for both local and network printers; the first question the wizard asks is where the printer is located.
For printers that are physically connected to the computer with a parallel, serial, or USB cable, select Local Printer. You will be presented with a list of local devices your printer is connected to. If you use a parallel port, you most likely need to select Parallel Port #1, and if you use a USB connection, you should probably select USB Printer #1. These selections mean that the printer is connected to your first parallel or USB port.
For printers that are shared on the network with Windows printer sharing, select "SMB shared printer" instead of Local Printer. If this printer requires a special username or password to access it, the next window allows you to set those options. You are then asked to enter the workgroup, server name, and printer name to use (see ). If you aren't sure what the correct printer name is, click Scan and the wizard scans the network for open printer shares.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Use Peripheral Devices
Knoppix includes support for many popular scanners, cameras, PDAs, and other peripherals—often with little to no extra configuration.
There is a common misconception that Linux has poor hardware support, especially when it comes to peripherals. Actually, you might be surprised at just how much hardware Linux supports out of the box without requiring that you download any extra drivers. Knoppix goes a step further and automatically configures a lot of the peripherals you might use—just plug them in.
Knoppix supports many popular scanners with little to no tweaking. I have both SCSI and USB scanners, and Knoppix recognized and configured them with no extra effort on my part. To start using your scanner, click K Menu → Graphics → Kooka to start Kooka, KDE's scanning application.
When Kooka starts, it lists all of the scanners that Knoppix has detected and prompts you to choose one. After you select your scanner, Kooka's main window appears.
Kooka works like most other scanning applications. Click Preview Scan to perform a quick scan, then crop out the section of your scan you wish to use and click Final Scan to scan at full resolution. After completing a scan, Kooka will prompt you for the file format to save the image as.
Kooka can also perform some basic image manipulation, such as image rotation and mirroring, although for more advanced features, you should probably use a complete image-editing program such as the Graphical Image Manipulation Program (GIMP), which is described in this section.
Be aware of the image size when scanning at high resolutions, because the scanned image can easily become larger than your available ramdisk space, leaving you with an incomplete image file and a desktop with no extra free space (which might cause weird behavior or crashes in any applications that must write to the ramdisk afterwards).
Kooka includes Optical Character Recognition (OCR) capabilities as well, so you can convert a scanned document to text. To OCR scan an image, select it from the list of images in the top left of the main window and click Image → OCR Image… The OCR window that pops up lets you configure gray levels, dust size, and spacing of your document. These settings can dramatically affect the results of the OCR scan, so it is worth your time to adjust them if you are getting poor results.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Have Fun and Play Some Games
While you can get a lot of work done with Knoppix, you can also have a lot of fun. Windows gives you Solitaire, Freecell, and Minesweeper. Knoppix gives you a virtual arcade full of games.
Primarily, you should use Knoppix to complete work, but sometimes it's good to have some fun too. Knoppix has something for everyone with its broad selection of games. Here's an overview of the game categories and descriptions of some of the games.
All of the games included in Knoppix are organized in the K Menu under Games. This submenu lists the different game categories, such as adventure, arcade, board games, card games, puzzles, strategy, and a special category for Tetris-like games.
Many of the games in the arcade category revive classic arcade games from the 1980s, and most fall into two categories: games with spaceships and games with bouncing balls. Don't laugh; sometimes the simplest games are the most addictive. Galaga is a Linux remake of the famous arcade game with more power-ups and a faster pace, and Frozen Bubble is an addictive clone of Bust-A-Move, also known as Puzzle Bobble.
Imaze is a multiplayer game that requires both a server and a client. Run the server to determine the size of the maze, and then connect the client to it to run through the maze firing bouncing balls at your opponents.
The board and card game categories provide computerized versions of many classic games: XBoard, KMahjongg, and KReversi are computerized counterparts to Chess, Mahjongg, and Othello. The card game category contains many different card games, including Solitaire and Freecell. Many of these games also support playing against opponents over the Internet, adding a new dimension to old favorites.
For those who find brainteasers fun, the puzzles and strategy categories have plenty of programs to exercise your brain. The puzzle games range from Gtans, which has you rearranging and rotating shapes to match the given pattern, to Minesweeper, a requirement in any complete set of puzzle games.
In the tactics and strategy category, you find logic games such as KAtomic and KSokoban, as well as battle strategy games as simple as KBattleship, a clone of the classic Battleship game. You will also find Xbattle, which lets you and an opponent set up many different battle scenarios with varying terrain, army size, and many other options, and then lets you control troop movements to see which team comes out as the victor.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Rock Out with Knoppix Multimedia
Knoppix comes with a full suite of tools to perform common multimedia tasks, such as listening to CDs or MP3s, editing audio, and burning CDs.
More people seem to be using their computers for multimedia applications, whether for listening to CDs, MP3s, or streaming radio and video. Combine Knoppix's excellent sound card support with its complete set of audio and video applications, and you get a platform for your multimedia needs that you can take anywhere. All of Knoppix's multimedia applications can be found under K Menu → Multimedia. This hack gives an overview of all the different programs you can use for your audio and video needs.
Figure : Frozen-Bubble
Before using any of the multimedia tools, make sure that Knoppix has identified your sound card. The first clue that Knoppix has detected your sound card is the "Initiating startup sequence" sound played by Knoppix as it loads your desktop. Another clue is the presence of a blue speaker icon near the bottom righthand corner of the screen near the clock. This icon belongs to KMixer and lets you adjust the volume just by clicking on the speaker. If the icon has a red slash through it, then Knoppix was not able to detect your sound card.
Use the sndconfig program to configure your sound card. Sndconfig is a fairly straightforward configuration tool that scans your system for any available sound cards and prompts you with any it detects. To load the sndconfig application, click K Menu → KNOPPIX → Configure → Sound card configuration. Other than selecting OK, the only interactive part of this tool is to lis-ten for a sample sound once sndconfig configures your card and to answer "Yes" or "No," depending on whether you hear the sound. If your sound card still isn't working, there is a chance that there is no ALSA sound module for your hardware. Once your sound card is working, you are ready to try the multimedia applications.
If you have gone through all of these steps, your sound card is detected, and it seems like it still doesn't work, click K Menu → System → alsaconf and accept the recommendations it makes for your sound card.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Connect to the Internet
Knoppix comes with many different options to connect it to a network with dial-up, Ethernet, wireless, PPPoE, and other types of connections.
Before you can take advantage of the many Internet applications Knoppix has, you need to actually connect to the Internet. Knoppix comes with support for many different types of Internet and network connections, including dial-up, standard network connections you might find with DSL or cable Internet services, ADSL/PPPOE connections, GPRS cell phone connections, ISDN, and wireless network connections. To configure these connection types, click K Menu → KNOPPIX → Network/Internet.
The most common type of Internet connection for broadband Internet users or computers inside a corporate network is through a standard network card. If this is the type of connection you use, then you will find that when Knoppix boots, it automatically brings up the network and attempts to grab an IP address with DHCP.
If you do not automatically get an IP via DHCP, you must click K Menu → KNOPPIX → Network/Internet → Network card configuration to launch a program that will ask you questions about your network connection. This configuration program will also let you enter a static IP address and other network information if your network does not use DHCP.
If your ISP assigned a username and password to use when you connect to your broadband Internet connection, then you must set up PPPoE before you can connect to the Internet. Click K Menu → KNOPPIX → Network/ Internet → ADSL/PPPOE configuration. This application will attempt to detect PPPoE use on your network, and then enter your username and password to connect to the ISP. Once you finish the configuration application, you will be connected to the Internet.
If you have an 802.11b wireless card connected to your computer, Knoppix will attempt to automatically configure the wireless card and connect to the first wireless access point it sees when you boot. This will not work if you need to enter special settings, such as a WEP key, to connect to your wire-less network. To get around this, click K Menu → KNOPPIX → Network/ Internet → Wavelan configuration to launch a program that lets you enter some information about your wireless network. It is safe to stick to the defaults if you are unsure of what to enter into the fields you see. Knoppix also offers a shortcut here to KDE's wireless lan tool; just click K Menu → KNOPPIX → Network/Internet → Wireless LAN.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Connect to the Internet with GPRS Bluetooth
Attempt to get the impossible to happen: a GPRS data connection over Bluetooth with Knoppix.
Bluetooth is a Personal Area Networking (PAN) protocol with a very limited range (the most powerful consumer devices, Class 1, have a range of 100 meters). Bluetooth allows you to connect devices together into "pairs." GPRS, or General Packet Radio Service, is a packet-switched protocol that's layered on top of the circuit-switched GSM (or IS-136 TDMA) network. This permits the use of a packet-based data service (like TCP/IP). This hack p