All the Graphics
Knoppix: Linux Run from a CD|
By Thiravudh Khoman
During the past week, I've been playing with a Linux distribution called Knoppix (v3.1, 20-Jan-2003 build) (https://www.knopper.net/knoppix/index-en.html). Created by Klaus Knopper of Germany, Knoppix was designed to run from a CD and as opposed to a hard disk.
Then and Now
It's been several years since I last tried one of these "boot and run" Linux CD's, and frankly at the time, I didn't have too high an opinion of them. I always considered them to be scaled down versions of Linux for people who were too intimidated to install the real thing on their hard drives.
Maybe that's what they were THEN, but Knoppix is far more than that now. Although still tagged as a "demo" Linux, it has other interesting and valid uses. First, it can be used in a classroom environment as a low-maintenance (and of course, low cost) operating/application system. Second, you can carry it around to insure yourself a familiar Linux platform to work on wherever you are. Just stick it into any available PC and there's an excellent chance that it will run properly, without disturbing any underlying installation. Third, it can be used as a poor man's terminal server, whereby thin clients can network boot into an already running Knoppix box. Fourth, Knoppix makes a great rescue CD given its ability to "see" existing Linux partitions. Just boot it then go repair what needs to be repaired in the other Linux partitions.
Looking closer under the hood, there's much to like about Knoppix. It's based on Debian, considered to be one of the most stable Linux's around. It's also surprisingly intelligent in determining what hardware it's running under. The author estimates that with a little bit of boot time help, it could be made to run on up to 95% of all desktop PC's and 75% of all notebook PC's. Lastly, Knoppix is NOT a truncated version of Linux, even though it is bound by a ramdisk on which it runs and a 700 MB CD that it uses as storage. In actual fact, the CD holds nearly 2 GB of programs in a compressed format. Whenever a program is called for that does not already exist in RAM or on the ramdisk, it is decompressed and loaded from the CD in real-time. Granted, given this extra step and the inherent slowness of CD drives, it will be slower than traditional hard disk installed Linux'es, but then it IS a trade-off in using a CD-based Linux.
I obtained my copy of Knoppix by downloading a 700+ MB ISO file from an Internet site and then burning it to a CD. If this isn't an option for you, you could always purchase a copy from numerous vendors of Linux CD's for a few US$. Or ask a friend to burn a copy for you (after all, this is free software).
If your PC hardware is up to snuff, running Knoppix merely requires that you insert the Knoppix CD and then boot from the CD drive. If your PC is not set to boot from a CD then some adjustments to the PC's CMOS settings will be needed to give the CD drive first boot priority (most modern PC's should already be set that way though). If all goes well, you should be automatically logged into KDE (actually, the Konqueror file manager/web browser) as a user named "knoppix" in 3+ minutes (figure 1).
I actually tested Knoppix on three computers. The first one was equipped with an Asus CUV4X-ME motherboard, a Pentium III 750 CPU, a Viewsonic VE500 LCD monitor, an SMC 1211/TX network card, and no hard drives. After a short delay in which Knoppix searched in vain for a hard drive, it booted into KDE without any intervention on my part.
The second computer I tried was equipped with an Intel 810AL motherboard, a Celeron 466 CPU, an NEC CS500 CRT monitor, an Intel EtherExpress network card, and a hard drive already containing a Red Hat 8 Linux installation. As it was loading, Knoppix found the existing Linux partitions and made them available in read-only mode.
The third computer I tried was equipped with a similar Intel 810A motherboard, a Celeron 950 CPU, a NetGear FA311 network card, a generic 15" CRT monitor, and a hard drive already containing a Windows 2000 installation. As with the second computer, the Windows partitions were found and made available in read-only mode.
You may have noticed that I haven't yet reported about the booting of the second and third computers. As it turned out, if you let Knoppix boot without any intervention on your part, you WOULDN'T have ended up with a working Knoppix. I suspect the problem has to do with the display card of the legacy Intel 810 motherboard that's common to both computers. Knoppix seems to be trying to configure the display card to a resolution and/or color depth that the 810's onboard video controller simply can't handle. On the second computer, an error would pop up while loading KDE saying that a crash had occurred, while on the third computer, my monitor would black out while displaying a floating message hinting that the frequency was outside of its operating range.
There's a fix for this, although it requires some intevention on your part. A few seconds into Knoppix's boot process, you will see a boot: prompt. At this point, I typed: knoppix screen=800x600 wheelmouse. Actually, only the screen= part was needed to solve the display problem, but since I also had a wheel mouse, I decided to tell it to use a wheel mouse driver as well. (For more of these so-called "cheatcodes", press F2 from the boot: prompt.)
Even with these parameters passed, the next screen would complain: You passed an undefined mode number. Press <RETURN> to see video modes available, <SPACE> to continue, or wait 30 seconds. This wasn't really a problem though. You could either press the space bar immediately or let it time out after 30 seconds to proceed. And having proceeded, Knoppix would load properly, as it did with the first computer.
Traditionally, Linux has done a much better job of detecting and dealing with network cards than it does display cards, and this was the case with the three computers tested. Knoppix found and properly configured all three network cards without a problem.
The first computer was located in a campus environment with a DHCP server located on a different subnet, while the second and third computers were on my home network, with a DHCP server on the same subnet. In all three cases, Knoppix was able to find the DHCP server and use the provided information to configure the network settings so that you could access the Internet immediately without any further tweaking.
In the event that you're on a network without DHCP or prefer to give your Knoppix box a static IP, you can also manually enter the network settings by going to Knoppix > Network/Internet > Network Card Configuration and providing the usual suite of information; i.e. host name, host IP address, subnet mask, broadcast IP address, DNS server IP address, and gateway IP address.
I haven't use a modem to connect to the Internet in years now and therefore, I didn't try that. But I have no reason to believe that kppp's dial up settings couldn't be configured just like any other Linux - assuming of course that you're using a Linux compatible modem (i.e. not a Winmodem - although there are even ways around that; see: https://www.linmodems.org).
Saving Files and Settings
Even though Knoppix's modus operandi relies on a ramdisk (which is volatile) and a CD (which is non-writable in this case), there are ways for you to do work and permanently save files under Knoppix.
Probably the simplest thing to do is to save your files onto the ramdisk first (e.g. in the default user's home area) until you feel a need to copy them to more permanent storage. At that point:
Alternatives for real-time file saving onto non-volatile sources include:
A related "saving" issue is how to save your current settings so that you don't have to manually re-establish those settings the next time you boot Knoppix. This can be accomplished by issuing the command: knoppix floppyconfig at the Knoppix boot: prompt, which will then run a shell script called knoppix.sh from your floppy disk. This file can be created by going to: Knoppix > Configure > Save Knoppix Configuration.
One of the recent enhancements to Knoppix is a feature that allows it to operate as a "terminal server". This will allow "thin clients" (such as diskless workstations and/or workstations that can boot from their network card) to boot from the same copy of Knoppix that is already running.
To turn on this feature, go to: Knoppix > Services > Start Knoppix Terminal Server. This will install DHCP, TFTP, and NFS servers for you and configure them according to settings that you will be prompted for. These include network card settings (if it's not already set up), DHCP IP ranges, client side NIC drivers to support, whether to deny remote root access, IP masquerading, DNS caching, proxy servers, and command line options to be sent to the clients when they remote boot Knoppix.
Once the terminal server has been activated, all you need to do is boot from a computer that has Intel's PXE boot feature (make sure PXE is the first boot priority in the CMOS settings) or from an Etherboot type boot floppy. For more information on how to create such floppies, visit Marty Connors' Rom-O-Matic website at https://www.rom-o-matic.net.
Oh, and in case you're wondering, it takes 1:45+ minutes to network boot (as opposed to 3+ minutes for a CD boot). Not bad.
Installing Knoppix Onto a Hard Disk
Actually, with all these luscious features in Knoppix, the question was bound to arise: is it possible to install Knoppix onto a hard disk, rather than running it from a CD? The answer is yes - and no. Yes, there is a script file (knx-hdinstall) that can be run from a root console (Ctrl-Alt-F1) that allows you to copy the files to a hard disk, and subsequently to boot from a hard disk. No, what you end up getting isn't Knoppix any more but rather a stock Debian install.
I tried this, hoping to get a hard disk based Knoppix terminal server. But the terminal server was no longer to be found after I converted it a hard disk install. Maybe I missed something ...
Re-Mastering the Knoppix CD
If you're serious about using Knoppix, it's possible to re-master the Knoppix CD to include your specific customizations. For further details, see: https://www.knoppix.net/docs/index.php/FaqCustomising. While you're there, check out the custom re-masters that others have already created.
To be fair, most of my complaints are due to the nature of the beast - i.e. the fact that Knoppix is CD-based. Thus, it wouldn't be entirely fair of me to compare its performance with a traditional hard disk installed Linux.
Having said that, though, the delays that often accompany the reading of new information from the CD does take a bit of getting used to (not to mention a constant dose of rationalizing). My situation is made worse by the fact that I'm using one of those cheapie 50x CD drives that makes a sound like a jet plane taking off every time it's accessed. Very noisy, and yes, very irritating.
The inability of the hard disk install to retain Knoppix's terminal server was probably my biggest disappointment. Sharing a relatively slow and definitely noisy CD among multiple users almost relegates Knoppix's terminal server to a parlor trick, one that's unusable/impractical in real world situations. I would be more than happy, though, if somebody would prove me wrong on this.