Biz & IT —

Fun with Knoppix

Linux.Ars returns with the lowdown on Knoppix Hacks, a book devoted to getting …

Introduction

In this issue of Linux.Ars we're featuring a review of Knoppix Hacks, written by our very own Linux.Ars contributor Kyle Rankin. We'll also delve into the commercialization of open source projects, managing network interface naming with ifrename, and organizing your library with Alexandria.

Knoppix Hacks

Knoppix Hacks, written by our very own Linux.Ars contributor Kyle "greenfly" Rankin, delves deep into the heart of Knoppix and shows how to use this "veritable Swiss Army knife in CD form" with a deadly and cunning accuracy.

What the heck is Knoppix anyway?

Even if you've never heard of Knoppix, you probably recogonize the "ix" suffix in the name as iconic of Unix. Linus begat Linux and Klaus Knopper begat Knoppix. Knoppix, like Linux, resulted from curiousity and personal need. Since its creation it, has morphed into something much larger than its founding vision, in large part due to Linux and the free software movement. Don't let this relationship deter you from exploring Knoppix. Knoppix may be based on Linux and open source software, but is something anyone can use.

What makes Knoppix different?

KNOPPIX is a bootable CD with a collection of GNU/Linux software, automatic hardware detection, and support for many graphics cards, sound cards, SCSI and USB devices and other peripherals. KNOPPIX can be used as a Linux demo, educational CD, rescue system, or adapted and used as a platform for commercial software product demos. It is not necessary to install anything on a hard disk. Due to on-the-fly decompression, the CD can have up to 2GB of executable software installed on it.

Who is Knoppix Hacks for?

Knoppix Hacks is an essential tool for anyone who works — professionally or not — with computers. Knoppix Hacks, just like Knoppix, is targetted at a wide audience ranging from System Administrators to the family "computer guy" called on to fix his cousin's PC.

There is a common misconception among people who have heard of Knoppix that it is only for Linux users. This perception couldn't be further from the truth. Knoppix, as demonstrated by the author, is an extremely useful tool regardless of your preferred operating system. This book is for anyone who has had to fix the computer of friends or family; the system administrator who has ever had to resuscitate a lifeless machine; even the average home user who's curious to try something new without replacing what they already have.

Grouped by subject, the book is more of a cookbook than technical manual. Each hack, or recipe, stands on its own merits.

Knoppix Hacks is easy to read cover to cover, but a major asset is that you don't need to. You can jump straight to the Hack that you need and dig in. There is plenty of cross-referencing to related material throughout the book so you're never left feeling that you don't have all the facts.

The story

My wife and I were visiting her family a few weeks ago. One of their computers had become almost unusably slow and they asked me to take a look at it. My suspicions were confirmed as soon as the monitor warmed up. The system tray was filled with a half-dozen icons that appeared to have been painted by an angry preschooler. The computer was in a sad state of disrepair. At some point in time the anti-virus had stopped auto-updating. Windows Update had never been run. The coup de grace was the dozens of malware apps running on the system, making its performance comparable with that of molasses flowing in wintertime.

Going through the task of killing all unknown processes and downloading AdAware took forever. I could barely get task manager to run, much less do anything. There has got to be a better way, I thought to myself. It turns out, there was but I didn't know it at the time.

I had used the Knoppix before, but not in any serious capacity. I considered it to be a handy little tool for something, but I didn't know for what. Now I'm kicking myself.

Let's pretend that I had a copy of Knoppix and armed with a copy of Knoppix Hacks when dealing with the family computer.

After booting up under Knoppix, I could mount the hard drive as read/write (NTFS writing is supported) and edit the registry and file system to prevent malware from starting at boot. While I'm at it, I also perform a complete virus scan and download AdAware and all of the latest security patches. Unplug the network cable, reboot into Windows, install patches, run AdAware and reboot. The only thing left is to train my mother-in-law to run AdAware on occasion and warn her of the evils of malware.

We've seen that Knoppix can save a system on the brink of a meltdown due to malware. You can also use it in lieu of a Windows Recovery CD to restore system files or to resize a partition. There is an entire chapter dedicated to these kind of hacks.

So, what else can Knoppix do besides earning you brownie points with your mother-in-law?

Under the cover

Knoppix Hacks is broken down into nine chapters that discuss a wide range of topics.

Booting Knoppix and using it as a desktop or turning it into a kiosk will be easy work with the help of the first three chapters of the book. This section covers booting Knoppix and using it as a desktop.

The core four chapters break down how to use Knoppix as a disaster and system recovery tool. This is the crème de la crème of Knoppix Hacks. Here we get into what I think are the most important and useful functions of Knoppix. Sure, there are plenty of uses for it, but the vast number of tools available for recovering a busted system make it a winner. Chapters five through seven offer forty-three different recipes. These include creating emergency servers to temporarily replace an unavailable machine, network auditing, and collecting forensic evidence CSI-style from compromised machines just to begin with.

Neither Linux nor Windows is safe from the power of Knoppix. Need to repair that damaged XFS file system? Knoppix can do that. Need to edit your Windows registry or reset your password? It can do that, too.

The final two chapters look at some of the various customized versions of Knoppix available as well as creating your own blend of Knoppix. There are already some task-specific Knoppix-based LiveCDs out there — KnoppMyth uses MythTV, the open source TiVo replacement, to kickstart your home theater PC or create a cluster to distribute software compiles with clusterknoppix. If you can't find an alternative Knoppix to fit your need, the final chapter will teach you everything you need to know to create your very own customized version.

Returning to my earlier tale of woe, turning to Hack #78 — Scan for Viruses — we start out with a description of the problem, in this case a virus-ridden machine. Next Kyle steps us through a list of advantages that Knoppix has as a virus scanner, such as using read-only media with a completely independent operating system. When you boot Knoppix, Windows is left dormant on the hard drive — as are all viruses and malware infecting it. This makes it easier to eliminate them, since they can't infect the Knoppix OS, CD or hide away in memory. Lastly, he walks you through using the Knoppix Live Installer to install the most current virus scanning tools to the RAM disk and then steps you through the process of scanning, identifying and removing any virus-infected files.

Channel Ars Technica