Knoppix Installer


From Knoppix Documentation Wiki
Revision as of 23:44, 10 October 2006 by Joga (Talk | contribs)

Jump to: navigation, search

Notes:

This is a technical description of the knoppix-installer. For a user-friendly HD installation guide, please see the Hd Install HowTo.

The knoppix-installer was written and maintained by Fabian Franz but now appears to be collaborative effort between Fabian, Klaus Knopper, and Kano of Kanotix. To run knoppix-installer you can use the command:

sudo knoppix-installer

If you have an internet connection use the command:

sudo knoppix-installer-latest-web

It will automatically get and use the latest version.

If your system does not meet the disk space requirements for installing the Knoppix system (for a CD version this is approxiamately a 2Gb partition for the root filesystem), the installation will be "stuck" at the partition-menu where you can launch qtparted or cfdisk to try and meet the requirements. Also if the system has less than 512MB of RAM, the user must have at least 128MB of swap space to proceed beyond the partition-menu.

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:

  • Debian (hd swap name user userpass rootpass host services boot)
    • Prefered method of HD install.
    • Just carries acpi, noapic, nosmp, pci, pnpbios and noapm forward on the kernel command line
    • Allows multiple users
    • Bears the closest resemblance to a "normal" debian installation.
  • Knoppix (hd swap services boot)
    • A copy of the liveCD on hard disk
    • 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.
    • DOES NOT ALLOW MULTIPLE USERS! You are automatically logged in.
    • Carries kernel command line to new system (i.e. Cheat codes) except for vga, initrd and BOOT_IMAGE
  • Beginner Default (hd swap name user userpass rootpass host services boot)
    • Uses Knoppix Hardware detection
    • Allows multiple users
    • 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 or beginner type of installation. The debian type install is prefered. 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) versus 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
        • 2.1.6.1 cd /$DEFAULT_DIR
        • 2.1.6.2 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
        • 2.3.5.1 echo line to fstab
        • 2.3.5.2 mkdir for mounting
        • 2.3.5.3 readlink $i | grep -q “$DEFAULT_DIR�? || cp -a $i $TARGET_MOUNT_POINT/dev/
      • 2.3.6 Add automounter links (copy them from mnt to mnt)
      • 2.3.7 Knoppix detect other partitions
        • 2.3.7.1 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
        • 2.4.1.1 with USER_NAME to “$DEFAULT_USER�? system_copy_home
          • 2.4.1.1.1 if user has a .kde, copy their home dir to target, otherwise use /etc/skel
          • 2.4.1.1.2 in chroot, chown the home dir to the user
          • 2.4.1.1.3 in chroot, mount /proc, su $USER_NAME -c mkdesktophdicons, umount /proc
          • 2.4.1.1.4 remove autostart scripts .kde/Autostart/showindex and sorticons
          • 2.4.1.1.5 change background in .kde/share/config/kdesktoprc from /cdrom/KNOPPIX/background.jpg to /usr/local/lib/knoppix.jpg
          • 2.4.1.1.6 if $USER_NAME != $DEFAULT_USER
            • 2.4.1.1.6.1 rm .mozilla/appreg and pluginreg.dat
            • 2.4.1.1.6.2 rename .mozilla/$DEFAULT_USER .mozilla/default
            • 2.4.1.1.6.3 rewrite files which mention /home/$DEFAULT_USER to have /home/$USER_NAME
        • 2.4.1.2 system_add_hd_config
          • 2.4.1.2.1 [ ! -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/
          • 2.4.1.2.2 mkdir -p $DEFAULT_CONFIG_DIR/etc/network/
          • 2.4.1.2.3 save_config $DEFAULT_CONFIG_DIR/install-configuration
          • 2.4.1.2.4 cp -af /$DEFAULT_DIR/etc/network/interfaces $DEFAULT_CONFIG_DIR/etc/network/
          • 2.4.1.2.5 cp -af /$DEFAULT_DIR/etc/pcmcia $DEFAULT_CONFIG_DIR/etc/
          • 2.4.1.2.6 cp -af /$DEFAULT_DIR/etc/cups $DEFAULT_CONFIG_DIR/etc/
          • 2.4.1.2.7 chroot_it update-rc.d knoppix-hd-config start 01 S . >/dev/null
        • 2.4.1.3 system_copy_etc
          • 2.4.1.3.1 copy changed files in /etc
          • 2.4.1.3.2 copy across XF86Config
          • 2.4.1.3.3 change insmod to modprove in knoppix-autoconfig
          • 2.4.1.3.4 s/^CMDLINE=/[ -z "\$CMDLINE" ] && CMDLINE=/g $TARGET_MNT_POINT/etc/init.d/knoppix-autoconfig
          • 2.4.1.3.5 s/modutils/modutils-knoppix/g $TARGET_MNT_POINT/etc/init.d/knoppix-autoconfig
          • 2.4.1.3.6 s/if grep -q /if egrep -q/g $TARGET_MNT_POINT/etc/init.d/knoppix-autoconfig
          • 2.4.1.3.7 [ ! -r /etc/init.d/modutils-knoppix -a -x tools/modutils-knoppix ] && cp -f tools/modutils-knoppix $TARGET_MNT_POINT/etc/init.d/
        • 2.4.1.4 system_add_services
          • 2.4.1.4.1 if isdnactivecards or acpi init scripts are there copy them across
      • 2.4.2 system_type_beginner
        • 2.4.2.1 update_passwd
          • 2.4.2.1.1 make a copy in temp of passwd, shadow and group
          • 2.4.2.1.2 update the etc/passwd $DEFAULT_USER->$USER_NAME, /home/$DEFAULT_USER -> /home/$USER_NAME and $DEFAULT_NAME -> $NAME_NAME
          • 2.4.2.1.3 update $DEFAULT_USER -> $USER_NAME in etc/shadow and etc/group
        • 2.4.2.2 system_copy_home
          • 2.4.2.2.1 See 2.4.1.1.X
        • 2.4.2.3 system_add_hd_config
          • 2.4.2.3.1 See 2.4.1.2
        • 2.4.2.4 system_copy_etc
          • 2.4.2.4.1 See 2.4.1.3
        • 2.4.2.5 system_install_templates
          • 2.4.2.5.1 if $SEARCHPATH/templates
            • 2.4.2.5.1.1 cp -af from $TEMPLATE_PATH to $TARGET_MNT_POINT /etc/profileetc/inittab
            • 2.4.2.5.1.2 remove knoppix entry from sudoers, copy it from template, chown root.root and chmod 440 it
          • 2.4.2.5.2 copy etc/hosts.allow
          • 2.4.2.5.3 disable all inetd services
        • 2.4.2.6 system_install_keymap
          • 2.4.2.6.1 . /etc/sysconfig/keyoard if it exists
          • 2.4.2.6.2 in chroot install-keymap “$KEYTABLE�? if -n “$KEYTABLE�?
        • 2.4.2.7 system_update_files
          • 2.4.2.7.1 update etc/motd
          • 2.4.2.7.2 write /etc/hosts
            • 2.4.2.7.2.1 first write loopback ip4 and ip6 static content
            • 2.4.2.7.2.2 write $HOSTNAME to /etc/hostname and /etc/mailname
            • 2.4.2.7.2.3 remove tmp and remake it properly
            • 2.4.2.7.2.4 remove /etc/mtab and recreate normally
            • 2.4.2.7.2.5 change mirror for LANG=us to ftp.us.debian.org in sources.list
        • 2.4.2.8 system_install_i18n
          • 2.4.2.8.1 if /etc/sysconfig/i18n exists
          • 2.4.2.8.2 run it with .
          • 2.4.2.8.3 append LANG=$LANG to etc/environment
          • 2.4.2.8.4 some special handling for LANG=el_GR
          • 2.4.2.8.5 write etc/kde3/system.kdeglobals, Charset, Country, Language
          • 2.4.2.8.6 fix language in etc/kde3/kdm/kdmrc
        • 2.4.2.9 system_setup_kdm
          • 2.4.2.9.1 force kde first time configuration in /etc/skel and for user if user just came from /etc/skel
          • 2.4.2.9.2 Add kde3 to .wmrc
          • 2.4.2.9.3 set kdm to start in runlevel 5
        • 2.4.2.10 system_add_hd_autoconfig
          • 2.4.2.10.1 echo SYSTEM_TYPE=$SYSTEM_TYPE and SYSTEM_HW_PROFILE=yes to etc/default/knoppix
          • 2.4.2.10.2 [ ! -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/
          • 2.4.2.10.3 chroot_it update-rc.d -f knoppix-autoconfig remove . 2>/dev/null >/dev/null
          • 2.4.2.10.4 chroot_it update-rc.d knoppix-hd-autoconfig start 00 S . >/dev/null
        • 2.4.2.11 system_add_services
          • 2.4.2.11.1 See 2.4.1.4
        • 2.4.2.12 system_fix_menus
          • 2.4.2.12.1 suknoppixmenus usr/share/applnk/Knoppix kdesu
            • 2.4.2.12.1.1 set qtparted to use kdesu
            • 2.4.2.12.1.2 set Partition_Image to use su -c
        • 2.4.2.13 system_create_modules
          • 2.4.2.13.1 create /dev/mouse symlink
          • 2.4.2.13.2 create /etc/modules from currently loaded modules
          • 2.4.2.13.3 save /etc/sysconfig/{i18n,keyboard,desktop,knoppix,netcard,mouse,sound,xserver,floppy}
          • 2.4.2.13.4 Add dma to bootmisc.sh (commented out if no dma)
      • 2.4.3 if Beginner then return
      • 2.4.4 system_services
        • 2.4.4.1 rm etc/rc[023456S].d/[SK]??{xsession,knoppix-autoconfig,knoppix-hd-config,knoppix-reboot,knoppix-halt}
        • 2.4.4.2 updaterc.d for $SERVICES_START
        • 2.4.4.3 if $TEMPLATE_PATH cp etc/rc[S06] from $TEMPLATE_PATH to $TARGET_MNT_POINT
        • 2.4.4.4 add rmnologin to all runlevels (???)
        • 2.4.4.5 Set hotplug to start in levels 1 to 5
        • 2.4.4.6 add defaults scripts to runlevels for sysklogd, klogd, kerneld, ppp, pcmcia, logoutd, makedev, atd and cron
        • 2.4.4.7 set automounter to start
        • 2.4.4.8 set display managers just to start in runlevel 5?
        • 2.4.4.9 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
      • 2.5.5 if $BOOT_LOADER=�?grub�?
        • 2.5.5.1 install_grub
      • 2.5.6 else
        • 2.5.6.1 install_lilo
      • 2.5.7 umount /proc
  • 3 make_floppy