1. # important note: this procedure was finetuned for Knoppix 3.4 recently after it was released. As Knoppix is based on debian/testing, which means that it is a non-stable debian environment by definition, it may happen that you encounter package dependencies which are not easily solvable by novice users. I usually take care of these dependency problems whenever I (re-)install one of my machines, but this does not happen every other week as Knoppix is more stable than one might expect ];->
  2. # download the Knoppix 3.4 iso image from http://www.knoppix.net -> get knoppix -> choose a Knoppix mirror (or use the knoppix mirror provided by K.U.Leuven), accept the download agreement, select the most recently issued KNOPPIX*.iso for download, have a cup of tea (or have a nap, depending on your Internet connection's bandwidth), burn the iso image on cd, and boot from it
  3. # enter at the lilo prompt something like the following (refer to http://www.knoppix.nl/3.6/knoppix-cheatcodes.txt for the latest version of the boot options. If your system behaves strangely during the installation procedure, you can try to restart this procedure without specifying `dma'):
    knoppix lang=us dma
    I specify my preferred screen resolution and window manager as follows:
    knoppix lang=us dma desktop=icewm screen=1400x1050
  4. # I paste the following commands in a terminal/shell window to start all necessary installation steps (i.e., all required commands mentioned in steps 3 to 7 of this part of the procedure. Remember to finalize the procedure once the execute.knx2hd.and.all.the.steps.in.this.section script has finished!!):
    sudo su -
    lynx -source --dump http://godot.studentenweb.org/site/myHowTos/applications/configurations/knoppix/knofig > .knofig
    lynx -source --dump http://godot.studentenweb.org/site/myHowTos/applications/configurations/knoppix/execute.knx2hd.and.all.the.steps.in.this.section > execute.knx2hd.and.all.the.steps.in.this.section
    time sudo sh execute.knx2hd.and.all.the.steps.in.this.section
    # if you wish to create a boot floppy (e.g., if your machine refuses to boot the newly installed system), you might consider to restart the installation with these commands:
    sudo su -
    lynx -source --dump http://godot.studentenweb.org/site/myHowTos/applications/configurations/knoppix/knofig.with.bootfloppy > .knofig
    lynx -source --dump http://godot.studentenweb.org/site/myHowTos/applications/configurations/knoppix/execute.knx2hd.and.all.the.steps.in.this.section > execute.knx2hd.and.all.the.steps.in.this.section
    time sudo sh execute.knx2hd.and.all.the.steps.in.this.section
    # if you wish to perform the knoppix installation on small hard disks:
    sudo su -
    lynx -source --dump http://godot.studentenweb.org/site/myHowTos/applications/configurations/knoppix/knofig.without.disk.checking > .knofig
    lynx -source --dump http://godot.studentenweb.org/site/myHowTos/applications/configurations/knoppix/execute.knx2hd.and.all.the.steps.in.this.section > execute.knx2hd.and.all.the.steps.in.this.section
    time sudo sh execute.knx2hd.and.all.the.steps.in.this.section
  5. # it is very likely that knx2hd warns you about ``Error: Check failed for HD_CHOICE () -- The configuration module will now be started.'' If you get this message, you have to choose the partition on which you wish to install linux (if you need to repartition your hard disk first: do not worry, as this question has no impact whatsoever: you can repartition your hard disk in the following step), and the filesystem you will use (e.g., ext3), after which you will see the normal knx2hd's main menu.
  6. # once you see knx2hd's main menu, you should first prepare your partitions (select option ``3. Partition'') and create a new configuration (``1. Configure Installation''), before saving your installation (``5. Save configuration'') and starting the actual installation (``2. Start Installation''):
    1. # Partition: this will start the easy to use repartition program ``qtparted'' which allows you to repartition your hard disk, resize your NTFS partitions, etc.
      # Reasonable partition guidelines:
      1. # use at least 3.5 gigabyte for your main linux partition (filesystem ext3, partition type 0x83, no need to make it bootable). Do not make the main linux partition much smaller than 3 gigabyte if you prefer to end up with a decent installation. Anything much larger than 5 gigabyte is overkill
      2. # create a swap partition (partition type 0x82) of any size between 500 megabyte and two gigabyte, depending on the amount of your system's RAM
      3. # it is wise to have a separate partition for your home directories (filesystem ext3, partition type 0x83, size depends on your habits, I use 10 gigabyte)
      4. # do not forget to save the new partition table before quitting qtparted

    2. # Note that if the knx2hd installation program keeps warning you about (partition size) requirements that should be met, and you do not know how to meet these requirements, you might have to quit the console-based installation program, and give it a try with the X11-based (re-)partitioning program. Open a *new* terminal window, and paste in that new terminal window the following command to restart the X11-based hard disk installation tool:
      time sudo knx2hd
    3. # Configure Installation: accept the default values:
      1. # debian-like system (old installer way)
      2. # specify on which partition you intend to install Knoppix
      3. # select ext3 or reiserfs (I prefer ext3 for all important partitions (/home, /data/, etc). Reiserfs is not to be recommended for partitions holding data you care about, i.e., use it for /, /usr, /var, etc).
        # Reiserfs performs much better (i.e., faster) than ext3, but any type of data recovery attempts after a serious system crash are very likely to fail...
        # Note that all operating system files can easily be reinstalled from scratch: use distinct partitions for your OS and home directories
      4. # do not change the name and user account settings, but type in a password for this user password. A user account will be created later on.
        # I repeat: do not use this account as ``your'' account.
        # Reason: the settings of this account are very weird and do not behave nicely compared to accounts which have been created normally. E.g., there is no sudo timeout for this account, ~/.xsession is not automatically executed at login time, etc.
      5. # specify the root password and hostname of the machine
      6. # specify where you wish to install the boot loader
    4. # Save Configuration:
      1. # save your configuration as ``/root/.knofig''
    5. # Start Installation:
      1. # check the configuration options and proceed with (or abort) the installation
      2. # have a cup of tea (copying everything takes about 20 minutes for an HP compaq nw8000) once you proceed selecting ``yes''
  7. # once knx2hd has finished, the execute.knx2hd.and.all.the.steps.in.this.section script finalizes the basic installation of your brand new debian machine. The most important things performed by the fine tuning script tune.a.lot include:
    1. # loading the modules needed to support firewire devices
    2. # loading the module needed to make usb 2.0 devices operate at full speed
    3. # mount the usbdevfs filesystem (was a knoppix 3.3 bug which has been fixed in 3.4)
    4. # creates sensible defaults for new user accounts in /etc/skel
    5. # automated ntp synchronization at boot time
    6. # makes sure eth0 is started automatically at boot time performing a dhcp request
    7. # setting the /etc/apt/sources.list and /etc/apt/preferences to sensible defaults
    8. # prepare the default files for new user accounts
    9. # mirror in /root a copy of these installation guidelines and a list of the initially selected packages. you will be happy to have them during an offline system recovery session (which I hope you should never need ];-))
    10. # create a script /root/finalize.debian.installation.sh which should be executed after you have rebooted the machine
  8. # once the execute.knx2hd.and.all.the.steps.in.this.section script has finished, you should reboot your machine:
    sudo shutdown -r now
  9. # select the default option from the boot loader (i.e., Linux)
  10. # log in as root
  11. # create a new user account (it is recommended to create individual accounts for each user rather than using the knoppix user):
    adduser godot
    If you wish to specify a home directory other than the default /home, e.g., /users (make sure to edit /etc/fstab to mount /users automatically, read `man fstab` if necessary), you can use:
    sudo adduser --home /users/gdt gdt
    The user who will maintain the system might be given root privileges through the sudo command (read `man sudo` and `man visudo` if necessary). Specify the accounts which can operate as root using the sudo command with:
    visudo
  12. # now you can specify which packages you would like to install and which should be deinstalled (it is best to deinstall these packages which Knoppix selects by default, but they cause non-trivial dependency problems for the debian package manager dselect). Execute the script (note that this script is only available after your reboot)
    screen sudo sh /root/finalize.debian.installation.sh
    or you simply paste the following commands (one after the other: you should not paste all commands at once (except if you know what you are doing). Explaining how to paste commands into a terminal/shell window is out of scope of this HowTo, but pressing shift-ins, middle-mouse-button, and/or shift-middle-mouse-button work pretty well for most terminal/shell windows):
    lynx -source http://godot.studentenweb.org/site/myHowTos/applications/configurations/knoppix/etc/apt/selections.smartcard | sudo dpkg --set-selections # useful for smartcard people
    lynx -source http://godot.studentenweb.org/site/myHowTos/applications/configurations/knoppix/etc/apt/selections | sudo dpkg --set-selections # all non-smartcard related stuff
    sudo apt-get update
    sudo apt-get -y install -t unstable libxft2 # mandatory to make dselect happy
    sudo dselect
    # mini dselect HowTo (have a look at Debian Reference -- Debian package management for more details on this matter):
    1. # select ``1. [U]pdate'' to synchronize your machine's database which reflects all available debian packages
    2. # select ``2. [S]elect'' to specify which packages you want to install, deinstall, purge, etc. Read the welcome screen as it it informs you on the most important dselect commands. I repeat: Read the welcome screen as it it informs you on the most important dselect commands.
      • # /: enter a part of the package name you wish to manipulate
      • # \: find the next occurrence of your search
      • # +: select the package
      • # -: deselect the package
      • # _: purge the package
      • # =: hold the package in the present state
      • # O: scroll through the package sort order
      • # i: scroll through the package details
      • # Return: commit the changes
      # It is quite likely that you will encounter package dependencies and conflicts. Read the introduction to conflict and dependency resolution. Read the instructions on that screen very carefully. Mistakes are quickly made and require years of dselect experience to resolve.
      # Next to the normal dselect commands, there are also a few dependency/conflict resolution keys:
      • # R: forget about your changes and return to the previous state
      • # U: set all packages based on dselect's suggestions
      • # D: selects only what was requested
      • # X: abandon any changes
      • # Q: commit the changes, ignoring the dselect's suggestions based on common sense (very challenging ;-))
      • # Return: commit the changes
    3. # select ``3. [I]nstall'' to start the installation/deinstallation/purging of the packages you selected. Answer the questions sensibly until you get back to the dselect menu
    4. # select ``6. [Q]uit'' to quit the program
  13. # that's it: you now have a fully operational debian machine. Logout root, reboot if you wish, and enjoy your fully operational debian/Knoppix machine. Check out the excellent user's guide found at http://www.debian.org/doc/manuals/users-guide/ch-ctsystem.en.html if you wish to learn more on the configuration of a Debian machine.
  14. # important final security note: if your machine is regularly connected to the Internet, you should keep your machine secure. Installing Knoppix is easy, keeping it secure requires effort. You should certainly have a look at the Securing Debian Manual (cfr. http://www.debian.org/doc/manuals/securing-debian-howto/). Do not forget to keep your machine uptodate by executing the following commands on a very regular basis (preferably daily, or subscribe yourself to the Debian Security Announcements mailing list if you wish to receive emails with debian security alerts):
    sudo apt-get update
    sudo apt-get -y upgrade