HowTo Install Knoppix on the EPIA M10000

Knoppix is a debian-based linux distribution. Knoppix is especially interesting because it is completely functional using only the CD-ROM drive (doesn't require a hard drive). If you like Knoppix you can install it to your hard-drive. Once installed, the knoppix system is essentially a debian unstable linux distribution. It is the easiest debian install I have ever done. But getting accelerated graphics working is a bit tricky. This document describes how to install Knoppix 3.3 on the EPIA M10K.

Installing Knoppix

First, boot from a Knoppix CD-ROM. Once knoppix has finished loading switch to a virtual console using CTRL-ALT-F2. Execute the knoppix-installer command. Follow the instructions to install knoppix to the hard drive, then reboot.

You should now have a completely functional EPIA system. Sound, USB, video, LAN should all be properly set up. Before we go any further, we must fix the apt-get system. The /etc/apt/sources.list file is preconfigured. You can try it like it is, or you might want to change the debian sources to a closer mirror. You decide. Then connect to the internet and do this:

[bash]# apt-get update

Now the apt system is ready to go.

Knoppix configured Xfree86 to use the VESA driver, which means no accelerated video. Next we want to get accelerated video working. To get accelerated video working you must compile a new kernel and install the Xfree86 via driver.

Compiling the New Kernel

To use accelerated video you must have the via agpgart and via DRI kernel modules. There are via patch sets for both the 2.4 and 2.6 kernels. I recommend compiling and installing the linux 2.6 kernel because 2.6 is faster than 2.4 (io scheduling). See the EPIA HowTo for an explanation of how to build and install the 2.6.2-epia kernel. Once the new kernel is installed we have to change the boot loader to use the new kernel. Knoppix installed lilo. I prefer grub. This is how I installed grub. You should read the grub install manual regarding what the command do and how to adapt them to your drive/partition system.

[bash]# apt-get install grub
[bash]# grub
[grub]# root (hd0,3)
[grub]# setup (hd0)

You will also need a menu.lst file in the /boot/grub directory. Here is mine:

title linux-2.4.22-xfs
    root (hd0,3)
    kernel /boot/vmlinuz-2.4.22-xfs vga=791 ro root=/dev/hda4 hdc=scsi
    initrd /boot/initrd-2.4.22-xfs.img

title linux-2.6.2
    root (hd0,3)
    kernel /boot/vmlinuz-2.6.2 ro root=/dev/hda4

Notice that I have unzipped and renamed the init ramdisk image. Here's what I did:

[bash]# cd /boot
[bash]# cp initrd.gz initrd-2.4.22-xfs.img.gz
[bash]# gzip -dc initrd.gz > initrd-2.4.22-xfs.img

For some reason the modules don't load properly when linux boots using the new kernel. I don't know why, but I figured out a way to fix it using an initialization script. I created an executable script (ie remember to chmod +x /etc/init.d/linux262) called /etc/init.d/linux262 containing the following instructions:

#  Script to load the modules for the 2.6.2 kernel


if [ "$KERNEL_VERSION" = "2.6.2" ]; then

  /sbin/modprobe via-rhine
  /sbin/modprobe uhci-hcd
  /sbin/modprobe via82cxxx_audio
  /sbin/modprobe hid
  /sbin/modprobe agpgart
  /sbin/modprobe via_agp
  /sbin/modprobe via_v4l_drv
  /sbin/modprobe via
  /etc/init.d/networking restart


Now change it to executable and create symbolic links in the appropriate runlevel initialization directories:

[bash]# cd /etc/init.d
[bash]# chmod +x linux262
[bash]# cd ../rc3.d
[bash]# ln -s ../init.d/linux262 S15linux262
[bash]# cd ../rc5.d
[bash]# ln -s ../init.d/linux262 S15linux262

While you are in the runlevel initialization directories you might want to remove startup scripts for services you don't actually need (like pcmcia, hotplug, etc).

Installing the XFree86 Drivers

Note: this step might not be required for Knoppix 3.4 and 3.6.

Follow Thomas Hellström's instructions regarding how to install the Xfree86 drivers. Here's the summary:

  1. Download the via_drv.o.bz2 file. Uncompress the file and move it to /usr/X11R6/lib/modules/drivers/via_drv.o

  2. Download the file. Uncompress the file, change its permissions to 666, and move it to /usr/X11R6/lib/modules/dri

  3. Edit the /etc/X11/XF86Config-4 file. You need to add a new device section, make sure the DRI section is ther, and change the screen section. Also, make sure that dri, drm, glx, Glcore and v4l are loaded in the Module section. Here are the corresponding sections of my XF86Config-4 file:

Section "Module"
    Load  "ddc"  # ddc probing of monitor
    Load  "GLcore"
    Load  "dbe"
    Load  "v4l"
    Load  "drm"
    Load  "dri"
    Load  "extmod"
    Load  "glx"
    Load  "bitmap" # bitmap-fonts
    Load  "speedo"
    Load  "type1"
    Load  "freetype"
    Load  "record"

Section "Device"
    Identifier "via"
    Driver "via"
    Option "DPMS"
    Option "TVType" "NTSC"
    Option "TVVScan" "over"
    Option "TVOutput" "S-Video"
    Option "ActiveDevice" "CRT,TV"

Section "Screen"
    Identifier "Screen0"
    Device     "via"
    Monitor    "Monitor0"
    DefaultColorDepth 16
    SubSection "Display"
       Depth     16
       Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
    SubSection "Display"
       Depth     24
       Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
    SubSection "Display"
       Depth     32
       Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"

Section "DRI"
    Mode 0666

Odds and Ends

You may need to change the permissions on the DVD drive device files if you wish to play DVDs from user accounts.