Note: You should be fairly comfortable using the commandline environment. Also, root access is required for the majority of these commands. Use the su command.
knoppix desktop=fluxbox at boot to enter the Fluxbox window manager. You will need a copy of a working /etc/X11/XF86Config-4 for your development environment. We let KNOPPIX do all the work at boot. You will need a terminal.
netcardconfig to configure IP settings. Also, you can manually use ifconfig, route, and edit /etc/resolve.conf.
fdisk /dev/hda. Here is what the partition table looked like for us using the p command in fdisk:
Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 125 1004031 82 Linux swap
/dev/hda2 * 126 748 5004247+ 83 Linux
mkswap /dev/hda1 command will set up a Linux swap area. This needs to be done after you create the swap partition with fdisk. Once the swap area is created, you can use swapon /dev/hda1 to enable the swap. We verified the swap addition using cat /proc/swaps like:
Filename Type Size Used Priority /dev/hda1 partition 1004020 0 -1
mkfs.ext3 /dev/hda2 command will create an ext3 filesystem on the /dev/hda2 partition. We needed to do this after we created the linux partition with fdisk. We then mounted the partition with mount -t ext3 -rw /dev/hda2 /mnt/hda2. You can verify the new mount point by typing mount with no other parameters. You should see something similar to this:
/dev/hda2 on /mnt/hda2 type ext3 (rw)
mkdir /mnt/hda2/knx to create a base directory for developing your LiveCD. You will have to create two subdirectories for your master and source. Each subdirectory must have a KNOPPIX subdirectory in it. You can use these commands:
mkdir -p /mnt/hda2/knx/master/KNOPPIX
mkdir -p /mnt/hda2/knx/source/KNOPPIX
mkdir with -p will make directories as needed. Next, the KNOPPIX files are copied into the source/KNOPPIX directory using cp -Rp /KNOPPIX/* /mnt/hda2/knx/source/KNOPPIX. -R will cause cp to copy recursively, and -p will preserve file attributes. This will take a minute or twenty.
index.html use touch /mnt/hda2/knx/master/index.html. Next, cp -Rp autorun.bat autorun.inf autorun.pif boot/ cdrom.ico /mnt/hda2/knx/master/.
cp /etc/X11/XF86Config-4 /mnt/hda2/knx/source/KNOPPIX/etc/X11/ so that startx will work in the development environment.
init 2.
chroot /mnt/hda2/knx/source/KNOPPIX/ will start a new shell using /mnt/hda2/knx/source/KNOPPIX/ as the root directory. Next, mount -t proc /proc proc. /proc is a filesystem that contains special files which represent the current state of the kernel.
sshstart. Verify that /etc/resolve.conf has the correct nameserver setting. Remember /etc/resolve.conf is actually /mnt/hda2/knx/source/KNOPPIX/etc/resolve.conf outside the chroot environment. Our resolve.conf looks like this:
# Insert nameservers here # nameserver 127.0.0.1 nameserver 192.168.0.1
ping google.com and/or lynx http://www.google.com.
apt-get update resynchronizes package indexes from the Internet. /etc/apt/sources.list contains a list of sources for packages. We had some failures with apt-get update until we removed some java related sources in /etc/apt/sources.list.
knoppix user will need a home directory. cp -R /etc/skel /home/knoppix will copy the skeleton directory to the knoppix's home directory. /etc/skel is typically copied into a user's home directory when the user account is created. chown -R knoppix:knoppix /home/knoppix/ will give the knoppix user and group ownership of the /home/knoppix/ directory. Now, you can su knoppix into a knoppix user shell.
WINDOWMANAGER shell environment variable tells startx which window manager program to use. export WINDOWMANAGER="/usr/bin/fluxbox" is what we used. Now you can run startx.
dpkg-query -l will list all the packages installed on the system. However, you may want to order the package list by size using dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n. You can use apt-get remove <nameofpackage> to remove a package from the system. You can add packages to a kicklist and run apt-get commands using the list. Each package name goes on a seperate line in the file. Examples of these commands are:
apt-get install tinc
apt-get install `cat install_list.txt`
apt-get remove kde-i18n-de
apt-get remove `cat remove_list.txt`
`cat remove_list.txt` uses the backtick and not a single quote.
exit to leave the su knoppix shell. We moved the /home/knoppix/ directory into /etc/skel using mv -R /home/knoppix/ /etc/skel/. These files should be owned by root. Use chown root:root /etc/skel/.
/proc. Leaving this mounted can cause problems. The command is umount /proc. To exit the chroot environment, press CTRL-D.
/etc/rc5.d/ (This only loads items before X loads)
/cdrom/KNOPPIX/background.gif (in knoppix 3.4: background.jpg)
knoppix desktop=fluxbox cheat.
netcardconfig, ping, and lynx.
mount -t ext3 -rw /dev/hda2 /mnt/hda2.
cp /etc/X11/XF86Config-4 /mnt/hda2/knx/source/KNOPPIX/etc/X11/
init 2
chroot /mnt/hda2/knx/source/KNOPPIX/.
mount -t proc /proc proc. /proc.
/etc/resolve.conf and network settings.
sshstart
apt-get update
cp -R /etc/skel /home/knoppix
chown -R knoppix:knoppix /home/knoppix/
su knoppix
export WINDOWMANAGER="/usr/bin/fluxbox"
startx
exit
mv -R /home/knoppix/ /etc/skel/
chown root:root /etc/skel/
umount /proc