Knoppix Installer

From Knoppix Documentation Wiki
Revision as of 17:54, 27 May 2005 by BFree (Talk | contribs)

Jump to: navigation, search


I started writing this document to help me understand the different types of installation options presented in the knoppix-installer, and to begin some documentation of them. As you will see this document currently quickly degrades into a run through of just what the installer does. I hope it is still useful to someone else.


As of Knoppix 3.8.2 the installer is now drawn from the work of Kanotix, which in turn began life from the Knoppix installer. While the basics are still the same some details have changed. Hopefully I'll get around to overhauling this page sooner rather then later if nobody else beats me too it please :-)

The main change is that the Kanotix installer only supports debian type installs by default. If you really want an old style knoppix or beginners install I believe you may still be able to get at the somehow.

For general usage of the Kanotix installer you may find useful.

Everything below this point has not been updated.


knoppix-installer is distributed from at this time (22nd November 2004), the latest version is 0.3.14 which was released on the 30th june 2004. knoppix-installer is written and maintained by Fabian Franz. To run knoppix-installer you can use "sudo knoppix-installer" or if you have an internet connection use "sudo knoppix-installer-latest-web" which will automatically get and use the latest version.

knoppix type installs and debian/beginner type installs are two quite different things. Debian type installs are very similar to a beginner type except that it runs system_services which changes (removes) the hardware detection system and uses a common command line for the kernel except for a few rescue type commands which carry on to the installed system. A beginner type install retains Knoppix's hardware autodetection and the full command line/cheatcodes.

Types of installation:

  • 1 Knoppix (hd swap services boot)
    • 1.1 A copy of the liveCD on hard disk
    • 1.2 Works exactly as the cd based system does except apt-get can be used to add more software and the system is no longer read-only.
    • 1.3 DOES NOT ALLOW MULTIPLE USERS! You are automatically logged in.
    • 1.4 Carries kernel command line to new system (i.e. Cheat codes) except for vga, initrd and BOOT_IMAGE
  • 2 Debian (hd swap name user userpass rootpass host services boot)
    • 2.1 Just carries acpi, noapic, nosmp, pci, pnpbios and noapm forward on the kernel command line
    • 2.2 Allows multiple users
    • 2.3 Bears the closest resemblance to a "normal" debian installation.
  • 3 Beginner Default (hd swap name user userpass rootpass host services boot)
    • 3.1 Uses Knoppix Hardware detection
    • 3.2 Allows multiple users
    • 3.3 Carries kernel command line to new system (i.e. Cheat codes) except for vga, initrd and BOOT_IMAGE

The general consensus seems to be that most problems and confusion arrive with people using the knoppix type installation so generally the debian or beginner type install are preferable. More experienced users will probably want the debian type install, users not familiar with setting up hardware may not want to follow them however. If you are going to use the beginner type be aware that you are still using the auto-configuration so you can change your cheatcodes, the flip-side is that changes you may think you are making permanently will be overwritten when you reboot. It is the balance of convinience of hardware setup (especially if you change hardware) Vs having a more regular installed linux (debian) system.

All installs go as follows:

  • 1 show_install_options
  • 2 do_install
    • 2.1 module_hd_doaction
      • 2.1.1 Format ($HD_FSTYPE = xfs, reiser, mkfs.*) if $HD_FORMAT
      • 2.1.2 Turn off dir_index of ext2/3
      • 2.1.3 mkdir $TARGET_MOUNT_POINT
      • 2.1.4 mount the partition
      • 2.1.5 mount from $HD_MAP
      • 2.1.6 module_hd_knoppix_copy
        • cd /$DEFAULT_DIR
        • cp -a $TARGET_MOUNT_POINT
    • 2.2 module_swap_doaction
      • 2.2.1 if $SWAP_AUTODETECT = no then foreach $SWAP_CHOICES echo $_ none swap defaults 0 0 > $TARGET_MOUNT_POINT /etc/fstab
    • 2.3 update_fstab
      • 2.3.1 write header into etc/fstab
      • 2.3.2 write / to etc/fstab (errors=remount-ro unless reiserfs|xfs)
      • 2.3.3 Add other $HD_MAP entries to etc/fstab
      • 2.3.4 Add swap devices, preserved by copying to temp
      • 2.3.5 Add CD-Roms/DVDs
        • echo line to fstab
        • mkdir for mounting
      • 2.3.6 Add automounter links (copy them from mnt to mnt)
      • 2.3.7 Knoppix detect other partitions
        • in chroot mount /proc, rebuildfstab -r, umount /proc
      • 2.3.8 set ntfs to umask=000
      • 2.3.9 if $INSTALL_KANO make /dev/hd mount auto not noauto
      • 2.3.10 on vfat use noauto, users, exec, umask=000
    • 2.4 old_installer
      • 2.4.1 system_type_knoppix if KNOPPIX then return when finished
          • if user has a .kde, copy their home dir to target, otherwise use /etc/skel
          • in chroot, chown the home dir to the user
          • in chroot, mount /proc, su $USER_NAME -c mkdesktophdicons, umount /proc
          • remove autostart scripts .kde/Autostart/showindex and sorticons
          • change background in .kde/share/config/kdesktoprc from /cdrom/KNOPPIX/background.jpg to /usr/local/lib/knoppix.jpg
          • if $USER_NAME != $DEFAULT_USER
            • rm .mozilla/appreg and pluginreg.dat
            • rename .mozilla/$DEFAULT_USER .mozilla/default
            • rewrite files which mention /home/$DEFAULT_USER to have /home/$USER_NAME
        • system_add_hd_config
          • [ ! -r /etc/init.d/knoppix-hd-config -a -x tools/knoppix-hd-config ] && cp -f tools/knoppix-hd-config $TARGET_MNT_POINT/etc/init.d/
          • mkdir -p $DEFAULT_CONFIG_DIR/etc/network/
          • save_config $DEFAULT_CONFIG_DIR/install-configuration
          • cp -af /$DEFAULT_DIR/etc/network/interfaces $DEFAULT_CONFIG_DIR/etc/network/
          • cp -af /$DEFAULT_DIR/etc/pcmcia $DEFAULT_CONFIG_DIR/etc/
          • cp -af /$DEFAULT_DIR/etc/cups $DEFAULT_CONFIG_DIR/etc/
          • chroot_it update-rc.d knoppix-hd-config start 01 S . >/dev/null
        • system_copy_etc
          • copy changed files in /etc
          • copy across XF86Config
          • change insmod to modprove in knoppix-autoconfig
          • s/^CMDLINE=/[ -z "\$CMDLINE" ] && CMDLINE=/g $TARGET_MNT_POINT/etc/init.d/knoppix-autoconfig
          • s/modutils/modutils-knoppix/g $TARGET_MNT_POINT/etc/init.d/knoppix-autoconfig
          • s/if grep -q /if egrep -q/g $TARGET_MNT_POINT/etc/init.d/knoppix-autoconfig
          • [ ! -r /etc/init.d/modutils-knoppix -a -x tools/modutils-knoppix ] && cp -f tools/modutils-knoppix $TARGET_MNT_POINT/etc/init.d/
        • system_add_services
          • if isdnactivecards or acpi init scripts are there copy them across
      • 2.4.2 system_type_beginner
        • update_passwd
          • make a copy in temp of passwd, shadow and group
          • update the etc/passwd $DEFAULT_USER->$USER_NAME, /home/$DEFAULT_USER -> /home/$USER_NAME and $DEFAULT_NAME -> $NAME_NAME
          • update $DEFAULT_USER -> $USER_NAME in etc/shadow and etc/group
        • system_copy_home
          • See
        • system_add_hd_config
          • See
        • system_copy_etc
          • See
        • system_install_templates
          • if $SEARCHPATH/templates
            • cp -af from $TEMPLATE_PATH to $TARGET_MNT_POINT /etc/profileetc/inittab
            • remove knoppix entry from sudoers, copy it from template, chown root.root and chmod 440 it
          • copy etc/hosts.allow
          • disable all inetd services
        • system_install_keymap
          • . /etc/sysconfig/keyoard if it exists
        • system_update_files
          • update etc/motd
          • write /etc/hosts
            • first write loopback ip4 and ip6 static content
            • write $HOSTNAME to /etc/hostname and /etc/mailname
            • remove tmp and remake it properly
            • remove /etc/mtab and recreate normally
            • change mirror for LANG=us to in sources.list
        • system_install_i18n
          • if /etc/sysconfig/i18n exists
          • run it with .
          • append LANG=$LANG to etc/environment
          • some special handling for LANG=el_GR
          • write etc/kde3/system.kdeglobals, Charset, Country, Language
          • fix language in etc/kde3/kdm/kdmrc
        • system_setup_kdm
          • force kde first time configuration in /etc/skel and for user if user just came from /etc/skel
          • Add kde3 to .wmrc
          • set kdm to start in runlevel 5
        • system_add_hd_autoconfig
          • echo SYSTEM_TYPE=$SYSTEM_TYPE and SYSTEM_HW_PROFILE=yes to etc/default/knoppix
          • [ ! -r /etc/init.d/knoppix-hd-autoconfig -a -x tools/knoppix-hd-autoconfig ] && cp -f tools/knoppix-hd-autoconfig $TARGET_MNT_POINT/etc/init.d/
          • chroot_it update-rc.d -f knoppix-autoconfig remove . 2>/dev/null >/dev/null
          • chroot_it update-rc.d knoppix-hd-autoconfig start 00 S . >/dev/null
        • system_add_services
          • See
        • system_fix_menus
          • suknoppixmenus usr/share/applnk/Knoppix kdesu
            • set qtparted to use kdesu
            • set Partition_Image to use su -c
        • system_create_modules
          • create /dev/mouse symlink
          • create /etc/modules from currently loaded modules
          • save /etc/sysconfig/{i18n,keyboard,desktop,knoppix,netcard,mouse,sound,xserver,floppy}
          • Add dma to (commented out if no dma)
      • 2.4.3 if Beginner then return
      • 2.4.4 system_services
        • rm etc/rc[023456S].d/[SK]??{xsession,knoppix-autoconfig,knoppix-hd-config,knoppix-reboot,knoppix-halt}
        • updaterc.d for $SERVICES_START
        • if $TEMPLATE_PATH cp etc/rc[S06] from $TEMPLATE_PATH to $TARGET_MNT_POINT
        • add rmnologin to all runlevels (???)
        • Set hotplug to start in levels 1 to 5
        • add defaults scripts to runlevels for sysklogd, klogd, kerneld, ppp, pcmcia, logoutd, makedev, atd and cron
        • set automounter to start
        • set display managers just to start in runlevel 5?
        • grep -q pcmcia /proc/devices || chroot_it update-rc.d -f pcmcia remove > /dev/null 2>/dev/null
    • 2.5 add_bootmanager
      • 2.5.1 chroot mount /proc
      • 2.5.2 for all kernels create_initrd
      • 2.5.3 set default boot kernel to running kernel or first available
      • 2.5.4 rm and ln -sf boot/vmlinuz, /vmlinuz and /boot/initrd.img
        • install_grub
      • 2.5.6 else
        • install_lilo
      • 2.5.7 umount /proc
  • 3 make_floppy