How to Install Knoppix on a HDD

Knoppix is a distribution (i.e., version) of Linux that features the ability to run directly from its CDROM or DVD. That is, unlike most distributions of Linux (and most other operating systems), it does not need to be installed on the hard disk drive (HDD).

Knoppix is based on Debian Linux, which is widely regarded as one of the most polished and sophisticated distributions. It is developed and maintained by Klaus Knopper in Germany.

The ability of Knoppix to operate from its CDROM or DVD can be very useful for demonstrating Linux in general, and Debian Linux in particular, without having to go to the trouble of installing it. (Installation also has the disadvantage of posing a risk to any operating system and other data that is already on the HDD, especially when performed by inexperienced people.) When run from its CDROM or DVD, Knoppix can also be very useful for making quick repairs to a Microsoft Windows, Linux or other operating system already resident on a HDD.

Although Knoppix provides a full-featured Linux distribution without having to install it, many users decide to install it anyway. One reason is a desire to make it their main operating system after experiencing its excellent performance, ease of use and attractive appearance. Another is that HDD installation results in even better performance (including greater speed) and frees up the CDROM or DVD drive for other users.

Installation on the HDD is also an easy way to set up a Debian distribution. Although Knoppix is installed, Knoppix is really just a subset (although a full-featured one) of Debian Linux. Debian installations can be somewhat more involved, as this distribution is geared more towards intermediate and advanced users.


Installing Knoppix on a HDD is fairly simple for someone who has a modest amount of experience on Linux or other Unix-like operating systems, including some understanding of partitioning. If the instructions are followed carefully, all should go well.

It is also possible for people with little or no experience on such operating systems to install Knoppix. However, in such case it might be preferable to first obtain some experience installing and using distributions such as Red Hat, SuSE and Ubuntu, because they are easier to both install and use.

The following instructions are for installing Knoppix on a HDD on which it will be the sole operating system (although it is relatively easy for someone with a good understanding of partitioning to modify them for use on a multi-boot system). Please be aware that there will be some differences according to the particular version of Knoppix.

Knoppix can be installed on most personal computers that have (1) a 300MHz or faster Pentium-class CPU (central processing unit), (2) at least 64MB of RAM (random access memory) and (3) an available partition (or unused space) on the HDD of at least 3.5GB. These are just (very approximate) bare minimums, and performance will improve substantially with a faster CPU, more memory and additional HDD space.

There are, however, some computers, usually older ones, on which it can be very difficult to install Knoppix, particularly its newer versions such as 5.01 (which was released in June 2006). The best indicators that problems may occur are if either (a) Knoppix will not run from its CDROM or DVD on the computer or (b) it runs but takes an excessively long time to boot (i.e., start up).

One common problem is that some newer versions of Knoppix are not compatible with certain display monitors, most notably some Hewlett Packard CRT monitors, in which case a message such as  PC Display Setup Not Correct  will appear on the monitor screen in bright red letters. This can usually be remedied by switching to a different monitor.

One solution to the problem of newer versions of Knoppix not being compatible with some computers and monitors is to install an older version. Version 3.3 (released in February 2004) has been found to be particularly useful in such situations, as it works on a greater variety of older hardware and is newer than the still widely used Microsoft Windows 2000 and more technologically advanced and far safer than both Windows 2000 and Windows XP. Also, it can be updated, at least in part, after installation by installing newer versions of application programs.

Starting Installation

The first step in installing Knoppix is to boot the computer from its CDROM or DVD. This is accomplished by inserting the disk into the appropriate drive and starting or restarting the computer. Knoppix will begin to boot automatically, but boot time can be shortened by a few seconds by pressing the ENTER key at the boot prompt (i.e., when the word boot: appears in the lower left-hand corner of the screen).

After Knoppix has finished booting and the KDE desktop has been loaded, simultaneously press the CTRL, ALT and F2 keys (i.e., CTRL + ALT + F2) to switch from the GUI (graphical user interface) to the command line (i.e., text-only) mode and to the root (i.e., administrative) user. Then type  knoppix-installer  if installing version 5.01 or other recent versions and press ENTER. This will cause a script (i.e., a short program) to run that will perform the interactive installation process. If installing version 3.3 or some other older versions,  knx-hdinstall  should be typed instead. In either case, there should be no spaces before or after the hyphen.

After the first dialog box appears and you have read it (optional), press ENTER. When the next window appears, press the space bar to mark the hard disk with an X. If the computer has a single hard disk drive, it will be called /dev/hda. If it has two, the second one will be called /dev/hdb, and it may be necessary to first use the arrow keys to select the HDD on which to install Knoppix. Then press ENTER to confirm the choice and press it again to launch cfdisk, the small program that will be used to partition the HDD.


Partitioning is the act of dividing a HDD into logically independent sections. It is clearly the most challenging part of installing Knoppix (and most other operating systems), not only for people who are not familiar with it, but also for many of those who are. However, it is also the most rewarding, as it is a valuable skill for anyone who has more than a superficial interest in computers. Partitioning is important to understand not only for users of Knoppix, but also for administrators and advanced users of any distribution of Linux or virtually every other operating system.

When cfdisk is launched, the upper part of the display screen shows the partition table for the selected HDD. The partition to be modified is selected by using the up and down arrow keys.

Nine options (Bootable, Delete, Help, Maximize, Print, Quit, Type, Units and Write) are shown along the bottom of the screen. These options can be selected by using either the left and right arrow keys or the TAB key. A brief explanation of the selected option appears on a line below the list of options.

Two partitions are required for Knoppix installation: a root partition and a swap partition. The former is the main partition. It is where all of the Knoppix files will be installed and it is also where user-created files will be written.

The purpose of the swap partition is to improve the performance of the main memory (i.e., RAM) by acting as virtual memory. Data is written to this partition when there is not enough main memory to store the data that the system is processing. It is generally recommended that the swap partition be approximately twice as large as the RAM on the computer. Thus, for example, a computer with 256MB of RAM should have a swap partition size of about 500MB.

To create the swap partition, select an existing partition on the partition table of roughly the same size if one is already there, or create a new one from the non-partitioned space which is designated Free Space. If there is no free space shown on the table, it can easily be created by deleting an existing partition.

To delete a partition, first select it by using the up and/or down arrow keys. Then select Delete along the bottom of the screen with the left and/or right arrow keys (or the TAB key) and press ENTER. This removes the partition from the table shown on the screen and adds it to the free space. The partition is not actually deleted from the hard disk until the revised table is written to the HDD.

To create a new partition from part or all of the free space, select the Free Space row and also select the New option that appears at the bottom of the screen. Then press ENTER. The display then shows the default size for the new partition, which is the size of the free space. Replace the shown size by typing in the desired size, for example, 500 for a 500MB swap partition. The default unit is megabytes, so that only the number and not the units (i.e., MB) should be typed in. Then press ENTER to return to the partition table screen.

In response to the statement at the bottom of the screen  Add partition at beginning of free space,  press ENTER, and the new partition then is added to the table. Do not be concerned if the size is slightly different from what was typed in (this is normal).

With the new partition selected, select the Type option at the bottom of the screen and press ENTER. This inserts a long list of filesystem types below the partition table. To create the swap partition, select the default 82 (Linux swap) and press ENTER. This removes the list of filesystem types and changes the entry in the FS Type column to whatever type was selected (Linux swap if the default type was selected).

A similar procedure is used to create the root partition (i.e., the main partition). This partition should be a minimum of about 3GB for installation from a CDROM or a minimal installation from a DVD, but more is better, particularly if installing from a DVD, with its far greater number of application programs. Find an existing partition of the desired size (and which is not needed for anything else) or create one from an existing partition or from the remaining free space. The root partition should be located within the first 8GB on the HDD (at least on versions of Knoppix that use the LILO bootloader).

To create the root partition from the free space, select the Free Space row and then select New from the bottom row and press ENTER. Next, type in the desired size in megabytes for the partition (at least 3000) and press the ENTER key. Then press ENTER again to add the partition to the beginning of the free space, and press it once more to toggle the bootable flag (i.e., so that it says Boot in the Flags column).

You are now (finally!) finished with the partitioning. Select Write from the bottom row and press ENTER. Then type yes and press ENTER to save all changes to the HDD. Finally, select Quit and press ENTER.

Initializing Partitions and Copying Files

Now that partitioning has been completed, it is time to initialize the two partitions and copy the files from the CDROM or DVD to the root partition. As soon as cfdisk is quit, a dialog box will appear asking if it is desired to use a swap partition, to which the correct answer is Yes. This is followed by a dialog box that requests selection of a partition to use as the swap partition. Press the space bar to mark the swap partition that was created using cfdisk and then press ENTER. The next dialog box asks whether it is really desired to use that partition as the swap partition and warns that all data on it will be erased. The correct answer is again Yes.

The computer then spends a few seconds initializing the swap partition and next presents a new dialog box that requests selection of the root partition (i.e., the partition on which to install Knoppix). The appropriate partition is the one that was selected or created using cfdisk; it can be selected with the up or down arrow keys and then marked with the space bar.

This is followed by a dialog box asking the desired filesystem type. The commonly used ext2 or ext3 is fine for beginning or intermediate users. After confirmation is made with the next dialog box, the filesystem is written to the HDD.

A new dialog box then appears announcing that Knoppix is ready to copy all of the files to the HDD and that this will take 10 to 40 minutes (in the case of copying from a CDROM), depending on the speed of the computer. Pressing ENTER begins the copying. This is a good time to take a break.

After the files have been copied, a dialog box appears to announce the fact. Press ENTER to close this dialog box and move to the next one. The next dialog box asks if it is desired to start the e-mail server automatically when the computer starts. Most beginning users will not need this server, but either answer is fine. The same applies to the next three messages about the secure shell server, samba server and printing server. However, the answer to the dialog box about the kdm (KDE desktop manager, a GUI login screen) should be Yes, because this automatically starts the GUI after the computer has booted up.

A request is then made to enter a root password. Type in the password, press ENTER, retype it and press ENTER again. Be sure to write this down on paper and place it in an easy-to-remember location. Then type in a password for the ordinary user, press ENTER, retype it and press ENTER again. It is also a good idea to write this password on paper.

You will then be asked if you want to install the GRUB or LILO boot loader in the master boot record (MBR). Unless creating a dual boot system, choose Yes and press ENTER. If it is desired to create a boot floppy disk choose Yes, otherwise choose No and press ENTER. The installation is now complete. Press ENTER and then ALT + F5 to go back to the Knoppix desktop and then log out. Then restart the computer without the Knoppix disk in the CDROM or DVD drive.

It doesn't work!

If all went well, you will be greeted with a very attractive login screen, followed by an equally attractive desktop screen. If you are familiar with another distribution such as Red Hat, SuSE or Mandrake, you will will notice some major differences. As is usually the case with Unix-like operating systems, it is best to generally log in as an ordinary user rather than as root for security and safety reasons. The default user name for the non-root user is knoppix, although it is easy (but beyond the scope of this tutorial) for the root user to change the user name or add more users. The default user name for the root user is root.

What if your new Linux installation does not boot? It can happen, and it has happened even to people who are experienced with installing Knoppix and other Linux distributions. In fact, it happened to the author of this tutorial with Knoppix 3.3, despite the fact that he had successfully installed Knoppix some months earlier multiple times on several other computers.

Repeated attempts to boot were met with a message about kernel panic. This means that the Linux kernel (i.e., the core of the operating system) could not be found. The reason was finally discovered. It was that during partitioning, the root partition was set up beyond the 8GB limit of LILO boot managers. Installation was repeated, using a partition within the 8GB limit, and the problem was solved. (The newer GRUB boot manager does not suffer from this limitation and also has other advantages.)

If you do experience problems, keep trying with fresh installs while carefully rereading the above instructions. It will usually work (again, if Knoppix was able to boot from the CDROM or DVD without problems), and you will be delighted with the results.

Created March 28, 2004. Updated October 30, 2006.
Copyright © 2004 - 2006 The Linux Information Project. All Rights Reserved.