Hard Disk Install Procedure For Knoppix Cd, Version 3.6
This procedure is under construction...
Struggling with some configuration and finetuning issues... Hotplug does not seem to be very stable with a 2.4.17 kernel.
I suggest for the time being to follow the Knoppix 3.4 installation instructions...

----

Instructions To Install Knoppix On Hard Disk, Booting From A Knoppix 3.4 Cd
  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

----

Instructions To Install A Knoppix Cd On A Hard Disk, Booting From A Knoppix Cd
  1. # boot from your Knoppix cd, and make sure you become root:
    sudo su -
  2. # assume you will install the Knoppix cd on /dev/hda3 (make sure it is large enough, say 800 megabyte, to hold at least the Knoppix iso image and the filesystem's management data). Propagate this preference:
    export PARTIT=/dev/hda3
  3. # export a few preferences:
    export TARGET=/target; export BOOT=$TARGET/boot; export LILO=$BOOT/lilo.conf
  4. # create a filesystem on that partition:
    mkfs.ext3 $PARTIT
  5. # create a mount point $TARGET for that new partition and mount it:
    mkdir $TARGET; mount -t auto $PARTIT $TARGET
  6. # copy the Knoppix cd to hard disk (this may take a while):
    time cp -a /cdrom/* $TARGET
  7. # mount the Knoppix image's boot floppy:
    mkdir /floppy; mount -t vfat -o loop /cdrom/KNOPPIX/boot.img /floppy/
  8. # prepare the hard disk image's boot directory:
    mkdir $BOOT; cp /boot/System.map $BOOT/; cp /floppy/* $BOOT/
  9. # unmount the floppy:
    umount /floppy
  10. # determine which root device you are currently using:
    export THISROOT=`grep root= /etc/lilo.conf|head -1|cut -d= -f2-`; echo your root partition is :$THISROOT:
  11. # generate a lilo.conf which is configured automagically:
    genliloconf /dev/hda $THISROOT "" $BOOT/vmlinuz > $LILO
  12. # add a mysterious line to this newly generated lilo.conf file:
    echo image=/boot/vmlinuz append=\"lang=us noprompt dma ramdisk_size=100000 init=/etc/init initrd=miniroot.gz __BOOT_IMAGE=knoppix\" root=$PARTIT read-only initrd=/boot/miniroot.gz label="KnoppixCd" >> $LILO
  13. # overlink the cdrom's /boot:
    ln -sf $BOOT /
  14. # execute lilo on this new lilo.conf:
    lilo -C /boot/lilo.conf
  15. # you may wish to add the line specifying the mount point of the newly installed Knoppix cd to the /etc/fstab of your other unix installations:
    echo $THISROOT $TARGET auto defaults 0 0
  16. # you can now reboot your machine an select 'KnoppixCd' from your lilo menu

----

Instructions To Install A Knoppix Cd On A Hard Disk, Booting From An Existing Unix Installation
  1. # boot from your already existing unix installation on hard disk (provided you already have a working unix installation or that you succeeded with the Knoppix hard disk installation above), and log in as root
  2. # assume you will install the Knoppix cd image on /dev/hda6 (make sure it is large enough, say 800 megabyte, to hold at least the Knoppix iso image and the filesystem's management data). Propagate this preference:
    export PARTIT=/dev/hda6
  3. # create a filesystem on that partition:
    mkfs.ext3 $PARTIT
  4. # export a few preferences:
    export KNOPPIXISO=/data/knoppix.iso; export TARGET=/tmp/target; export BOOT=$TARGET/boot; export LILO=$BOOT/lilo.conf
  5. # create a mount point $TARGET for that new partition and mount it:
    mkdir $TARGET; mount -t auto $PARTIT $TARGET
  6. # create a mount point /tmp/source which contains your Knoppix iso image. Make sure $KNOPPIXISO points to that iso image:
    mkdir /tmp/source
    mount -t iso9660 $KNOPPIXISO /tmp/source -o loop
  7. # copy the Knoppix iso image to hard disk (this may take a while):
    time cp -a /tmp/source/* $TARGET
  8. # mount the Knoppix image's boot floppy:
    mkdir /tmp/floppy; mount -t vfat -o loop /tmp/source/KNOPPIX/boot.img /tmp/floppy/
  9. # prepare the hard disk image's boot directory:
    mkdir $BOOT
    cp /boot/System.map $BOOT/
    cp /tmp/floppy/* $BOOT/
  10. # unmount the floppy and the Knoppix iso image:
    umount /tmp/floppy /tmp/source
  11. # determine which root device you are currently using:
    export THISROOT=`grep root= /etc/lilo.conf|head -1|cut -d= -f2-`; echo your root partition is :$THISROOT:
  12. # generate a lilo.conf which is configured automagically:
    genliloconf /dev/hda $THISROOT "" $BOOT/vmlinuz > $LILO
  13. # add a mysterious line to this newly generated lilo.conf file:
    echo image=$BOOT/vmlinuz append=\"lang=us noprompt dma ramdisk_size=100000 init=/etc/init initrd=miniroot.gz __BOOT_IMAGE=knoppix\" root=$PARTIT read-only initrd=$BOOT/miniroot.gz label="KnoppixCD" >> $LILO
  14. # execute lilo on this new lilo.conf:
    lilo -C $LILO
  15. # you may wish to add the line specifying the mount point of the newly installed Knoppix cd to the /etc/fstab of your other unix installations:
    echo $THISROOT $TARGET auto defaults 0 0
  16. # you can now reboot your machine an select 'KnoppixCD' from your lilo menu

----

Instructions To Install Knoppix On Hard Disk, Booting From A Knoppix 3.3 Cd
  1. # download the Knoppix 3.3 iso image from http://www.knoppix.net -> get knoppix -> choose your Knoppix mirror, accept the download agreement, select the most recently issued KNOPPIX*.iso for download, have a cup of tea (or have a nap if you download the stuff over a slow Internet connection), burn the iso image on cd, and boot from it
  2. # 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
  3. # open a terminal/shell window and start the Knoppix hard disk installation program answering all the questions sensibly (e.g., install Knoppix on a partition of at least 3.5 gigabyte (the partition type should be 0x83, no need to make it bootable; do not make this partition much smaller than 3 gigabyte if you want to have a decent installation. Anything much larger than 5 gigabyte is overkill. Add a swap partition (this partition's type should be 0x82) of any size between 500 megabyte and two gigabyte, depending on the amount of your system's RAM. Do not forget to save the new partition table before quitting cfdisk, fdisk, or any other partition table editor you might be using. It is also wise to have a separate partition for your home directories (partition type 0x83, ext3, size depends on your habits, I use 10 gigabyte):
    sudo su -
    time sudo /usr/local/bin/knx-hdinstall
    and have another cup of tea (a Compaq N800c takes about 10 minutes to complete knx-hdinstall if `dma' is specified at the knoppix boot prompt, or more than 30 minutes if `dma' is omitted)...
  4. # once the knx-hdinstall program has finished copying the files to the hard disk, you can reboot the machine:
    sudo shutdown -r now
  5. # select Linux in the boot loader's menu, and log in as root
  6. # you can now open a terminal/shell window and finalize the main installation step:
  7. lynx -source --dump http://godot.studentenweb.org/site/myHowTos/applications/scripts/knoppix/tune.a.lot > /tmp/tune.a.lot
    echo openoffice-de-en deinstall | sudo dpkg --set-selections
    echo libsasl2-modules-mysql deinstall | sudo dpkg --set-selections
    sudo sh /tmp/tune.a.lot
  8. # log in as root
  9. # 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
  10. # 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
  11. # 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.
  12. # 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

----

Tips For Knoppix-customize
  1. # an excellent HowTo on customizing the Knoppix cd can be found at knoppix-customize
  2. # I customize my Knoppix cd as follows:
    1. # initialize the location of the Knoppix iso image:
       export IMAGE=/tmp/KNOPPIX_V3.3-2004-02-16-EN.iso 
      
    2. # list the current defaults of your Knoppix cd image:
       echo "APPEND"|knoppix-customize --image $IMAGE --action get_syslinux_opt 
      
    3. # make `us' the default language, icewm the default window manager, make sure the to use no swap space, boot with a fancy background image, use dma for all ide hard disks, does not prompt for the cd to be ejected at reboot:
       echo "lang=us"|knoppix-customize --image $IMAGE --action set_append_opt
       echo "desktop=icewm"|knoppix-customize --image $IMAGE --action set_append_opt
       echo "noswap"|knoppix-customize --image $IMAGE --action set_append_opt
       echo "splash"|knoppix-customize --image $IMAGE --action set_append_opt
       echo "dma"|knoppix-customize --image $IMAGE --action set_append_opt
       echo "noprompt"|knoppix-customize --image $IMAGE --action set_append_opt
       
      
    4. # list the new defaults of your Knoppix cd image:
       echo "APPEND"|knoppix-customize --image $IMAGE --action get_syslinux_opt 
      

----