Vidupiyasa Live

From UCSC Wiki

Jump to: navigation, search

Contents

Vidupiyasa Live CD/ USB Disk

Introduction

Objectives

  • Part of the Virtual Campus Infrastructure
  • Deliver courses for Off line viewing
    • SCORM packages
    • PDF Files
    • Audio/Video Files
    • or any other format?
  • Localization
    • Supports contents in all three languages, English, Sinhala and Tamil.
    • Most of the software localized to native languages

Requirements

Core Packages

Optional Packages

  • firefox3 beta1 (To overcome some rendering issues)
    • Flash Player 9 Plugin
    • Java Plugin
  • Pidgin (An excellent IM client)
  • xPDF ( A PDF viewser for X )
  • Reload SCORM Viewer
    • Java RTE 1.6
  • truecrypt4.2a (An encryption tool)
  • OpenVPN
  • VLC (A Multimedia player)
  • Moodle 1.8
    • apache 2.0.55
    • MySQL 5.0.22
    • PHP 5.1.2

Enabling Sinhala and Tamil

  • Download the fonts lklug.ttf and lohit-tamil.ttf
  • Copy them into the /usr/share/fonts directory
  • Run the following command; fc-cache -fv

Download

Coming Soon... If you cant wait, then pls contact Rashan At eLC




Custom Kernel Compilation

Requirements

Patching the Kernel

Setup the environment

  • Create a temporary directory (/tmp/livecd)
  • Copy the necessary files to that directory and extract them.
    • linux-2.6.23.11.tar.bz2 (tar xjf linux-2.6.23.11.tar.bz2)
    • aufs
    • squashfs3.3.tar.gz (tar xzf squashfs3.3.tar.gz)
    • sqlzma3.3-fixed.tar.bz2 (mkdir sqlzma-patch && mv sqlzma3* sqlzma-patch/ && cd sqlz* && tar xjf sqlzma3.3-fixed.tar.bz2 )
    • lzma449.tar.bz2 (mkdir lzma449 && mv ../lzma* lzma449/ && cd lzma* && tar xjf lzma449.tar.bz2 && cd ..)

Patching the Kernal

  • Go to the root of the kernel source ( cd /tmp/livecd/linux* )
  • Apply Aufs patches ( patch -p0 < ../aufs/patch/ksize.patch )
    • patch -p0 < ../aufs/patch/lhash.patch ( Not sure??? )
  • Apply SquashFS patches ( patch -p1 < ../squashfs3.3/kernel-patches/linux-2.6.23/squashfs3.3-patch )
  • Apply LZMA paches to both Kernel and SquashFS
    • cd /tmp/livecd
    • ln -s linux2.6.23.* linux2.6.23
    • patch -p0 < sqlzma-patch/sqlzma1-449.patch
    • patch -p0 < sqlzma-patch/sqlzma2k-3.3.patch
    • patch -p0 < sqlzma-patch/sqlzma2u-3.3.patch

Configure and Build

  • Go into the Kernel source directory ( cd /tmp/livecd/linux2.6.23.* )
  • Configure the kernel ( make menuconfig ) NOTE: You can use any existing config file as a basis. Also make sure that SquashFS support is turned OFF.
  • Build the Kernel ( time make > /dev/null )
  • Build the Kernel Modules ( time make modules > /dev/null )

Install the Kernel and KModules

  • Install the Kernel
    • Copy the kernel to the live system ( cp arch/i386/boot/bzImage <LIVE_ROOT>/boot/vmlinuz )
    • Copy the System map ( cp System.map <LIVE_ROOT>/boot/ )
    • Copy the configuration file ( cp .config <LIVE_ROOT>/boot/ )
  • Install the kernel Modules
    • Set the module directory (export INSTALL_MOD_PATH = <LIVE_ROOT>/
    • Install the modules (make modules_install)

Compiling and Install Aufs

  • Go to the Aufs Directory ( cd /tmp/livecd/aufs )
  • Copy the 'local.mk' file as 'Makefile' (cp local.mk Makefile)
  • Do the following changes in the Makefile;
    • Turn Aufs debug off (Comment the relevant line, i.e. #CONFIG_AUFS_DEBUG = y )
    • Disable Aufs compatibility mode ( Comment the relevant line, i.e. #CONFIG_AUFS_COMPAT = )
    • Update the custom kernel directory ( replace 'KDIR = /lib/modules/$(shell uname -r)/build' with 'KDIR = <LIVE_ROOT>/lib/modules/2.6.23.11/build
  • Build the module (make)
  • Copy the module to the kernel modules directory
    • Create the directory under `fs` ( mkdir -p <LIVE_ROOT>/lib/modules/2.6.23.11/kernel/fs/aufs)
    • Copy the module to the above directory ( cp aufs.ko <LIVE_ROOT>/lib/modules/2.6.23.11/kernel/fs/aufs/

Compiling SquashFS with LZMA

  • Go to the sqlzma-patches Directory ( cd /tmp/livecd/sqlzma-patch )
  • Backup the sqlzma_patches directory ( cp -r sqlzma_patches sqlzma_patches_backup) - Optional
  • Do the following changes in the Makefile;
    • Replace SqFs = ${Squashfs}/kernel-patches/${KVer}/fs/squashfs with SqFs = fs/squashfs
    • Replace KDir = /lib/modules/$(shell uname -r)/build with KDir = <LIVE_ROOT>/lib/modules/2.6.23.11/build
  • Copy the squashfs and lzma499 directories into the patch directory;
    • cp -r ../lzma449 .
    • cp -r ../squashfs3.3 .
  • Build the module (make)

Installing SquashFS with LZMA

Method 1: Direct copying

  • Copy the mksquashfs and unsquashfs binaries to the live system ( cp squashfs3.3/squashfs-tools/{mk,un}squashfs <LIVE_ROOT>/usr/bin/ )
  • Copy the module to the kernel modules directory
    • Create the directory under `fs` ( mkdir -p <LIVE_ROOT>/lib/modules/2.6.23.11/kernel/fs/squashfs)
    • Copy the module to the above directory ( cp lzma449/C/Compress/Lzma/kmod/{sq,un}lzma.ko <LIVE_ROOT>/lib/modules/2.6.23.11/kernel/fs/squashfs/ )
    • Copy the squashfs kernel module to the live system ( cp ../linux-2.6.23/fs/squashfs/squashfs.ko <LIVE_ROOT>/lib/modules/2.6.23.11/kernel/fs/squashfs/ )

Method 2: Create Package and Install (Reusable)

  • Depends on the base linux distro
Personal tools