Category: Computers

Installing LTSP on Ubuntu 9.04

Installing LTSP and enabling thin clients to boot from your ubuntu 9.04 machine is very  easy.

I did the following steps.

a) Install ubuntu 9.04   ( aka Jaunty) desktop   with a static IP.    (  A static IP is needed as your ubuntu box is going to act as a server. My IP is Set up Internet access on this machine. You need to download a lot of packages  from the net to complete the installation.

b)  Install  the packages  ltsp-server-standalone and openssh-server

# apt-get install ltsp-server-standalone
# apt-get install openssh-server

c)  Build the LTSP client environment.


This  command will download all the necessary packages from Internet and build  your environment.

Have a look at /opt/ltsp/i386. This directory will  now contain the chroot environment for the thin clients.  If you want to tweak any settings  you cna do it here.

d) Edit the  /etc/ltsp/dhcpd.conf to suit your network setting. This file  will serve  the ip range by default. If your network uses this range you can leave it  as it is. (The default file worked for me as my server IP is

e) Run the following commands.



The first  command above will export the ssh keys of the server  to the ltsp client environment. The  ltsp-update-image command will rebuild a squashfs image from the ltsp chroot environment and place it under /opt/ltsp/images directory.  This image will be exported to the thin client as root file system by the NBD daemon on the server.

Your LTSP server is ready.  Try booting form a client via pxe or etherboot. You can also try to boot the thin client in qemulator.
There is a sample script for this in /usr/share/doc/ltsp-server/examples/ named qemu-ltsp.

Note:    If you change any thing under /opt/ltsp/i386 , you must rebuild the image for the change to be reflected on the client. Also, if you change the IP address of the server you must do an ltsp-update-sshkeys followed by  ltsp-update-image.

Brute force removal of a deb package in Ubuntu

Today  I was  playing with ubuntu 9.04 .  I tried to install  wwwoffle the  off-line  proxy server.  At the end of installation it failed with a  ” Sub process /usr/bin/dpkg failed ” message.  There was some thing wrong.    Fixing the system required removal of the package. I tried the following in succession in vain.

# apt-get remove wwwoffle

#dpkg -P wwwoffle

#dpkg –force-all  -r wwwoffle

I was stuck.  I did a manual removal of the deb package like this.

a) List out all the file of the deb package.

# dpkg -L wwwoffle

b) Removed all the files from the above list by hand.  If you are smart enough you can write a script for that.

c) Remove the package using apt

#apt-get remove wwwoffle

How to make a USB install/boot disk with Ubuntu 9.04

A USB  boot disk is a cool idea. It allows you to carry your favorite operating system in your pocket. Since  all modern PC provide USB boot from BIOS , you can use any computer and work on your on desktop. It is also possible to make data persistent. With ubuntu 9.04 Jaunty Jackalope  it is very easy to make an install disk.   Here is how you can do it.

Get hold of a USB disk which is large enough to hold ubuntu  and your data. I used a 2 GB Jetflash disk.  First, I partitioned it into two using gparted. Both were formatted to fat32 file system. See the figure below. ( You can also choose to install on a single partition).

Usb Drive Partiitions

Next click on System-> Admininstration -Create USB statrup disk. See the Screenshot below.


This will start the aplication unetbootin as shown below.


Click on other button and select the jaunty desktop iso image and then select the USB partition you want to install Ubuntu.

If you want to keep data persistent across  reboots you can check that  option and select the size for data block.  Unetbootin will create a single file named casper-rw on the flash drive and your home directory will be mounted in that file. It is a good idea to keep data persistent as you can walk into any Internet cafe and work with your data.

Click on Make startup disk and wait for some time, your USB boot/install disk is ready.

Exploring the Mini2440 Arm kit

The friendly arm board
The friendly arm board

As a part of laboratory experiments  for an embedded system course being held at Model finishing School Trivandrum, 2 nos . of mini2440 arm development kits have been purchased by the them  from e bay .  One  of the  kits  is presently with me . My task is to learn it and teach embedded  Linux ( or what ever I learn 😀  ) to the participants of the above course.  I have been playing around it for the past two days and it looks very interesting. See the pictures.

  Layout of of the board
Layout of of the board

The specifications of the board looks like this.

* Processor — Samsung S3C2440 (ARM920T core) clocked at up to 533MHz

* Memory — 64MB SDRAM (up to 100MHz)

* Flash — 64MB NAND flash; 2MB NOR flash

* Flash expansion — 1 x SD card interface

* Display — LCD controller with four-wire resistive touchscreen interface; optional 3.5- or 7-inch LCD displays

* Networking — 1 x 10/100 Ethernet RJ-45 interface (DM9000 chip)

* WiFi — optional WiFi module

* USB — 1 x USB Host; 1 x USB Slave (B-type interface)

* Serial — 3 x serial ports

* Audio — 1 x stereo audio output interface; 1 x mic interface

* Camera — 1 x 20-pin (2.0mm space) camera interface; optional CMOS or USB cameras

* Other I/O:

o 1 x 10-pin (2.0mm space) JTAG interface

o 4 x user LEDs

o 6 x user buttons

o 1 x PWM control buzzer

o 1 x adjustable resistance, for AD conversion test

o 1 x I2C bus AT24C08 chip, for I2C bus test

o 1 x 34-pin 2.0mm GPIO interface

o 1 x 40-pin 2.0mm system bus interface

* Power — RTC battery; power supply interface

* Clock — internal real-time clock and 12Mhz passive crystal system clock source

* Dimensions — 3.9 x 3.9 inches (100 x 100mm)

* Operating system — Linux 2.6.13;

The board comes with a 4 inch detachable LCD screen. The cost of the board is around $ 89 plus shipping and customs duty. The end price was around Rs 7500 in India. The kit  is preloaded with Linux and the accompaining DVD has all the tools needed for development. The board can also run windows CE,

I have not yet done any serious stuff with the kit.  The user interface is based on qtopia, and it provides  basic  GUI features.

The kit booting up
The kit booting up

There is handwriting recognition software and an on screen keyboard for data entry.

Onscreen keyboard
Onscreen keyboard
Hand writing recognition
Hand writing recognition

There are various applications  for common tasks.  I was able to browse Internet and access  the embedded web server  on the board.

Shell on the mini2440 kit
Shell on the mini2440 kit

I plan to rebuild the system and try to make it boot from a usb stick or SD card.  Let me see how much I can hack on this. Stay tuned for furthur updates.

Remastering ubuntu 9.04 Jaunty Jackalope

( This document was written in connection with a one day ubuntu ramastering workshop held at College of Engineering Attingal. See this post)

System Requirement

You need a reasonably  good PC with Ubuntu 9.04 installed. It should have plenty of free space ( say 4 GB ) and minimum 1 GB

Preparing the host system

Create a work directory

# mkdir jaunty

Create the following sub directoires

# mkdir  jaunty/cdrom
# mkdir  jaunty/tmp
# mkdir jaunty/root
#mkdir jaunty/remaster

Mount the jaunty iso image on jaunty/cdrom directory
#mount -o loop jaunty.iso jaunty/cdrom

Copy everything from the cdrom to jaunty/image directory

#cp -r jaunty/cdrom  jaunty/image

Now the  image directory has  the content of your cdrom.

You may refer to this post for an explanation of the contents of the image directory.

Rebuilding the squashfs image.

We are going to rebuild filesystem.squashfs under jaunty/image/casper

Move the filesystem.squashfs image to jaunty/tmp directory

#mv  jaunty/image/casper/filesystem.squashfs jaunty/tmp

Mount the filesystem.squashfs under jaunty/root direct

#mount -o loop jaunty/tmp/filesystem.squashfs jaunty/root

Copy the contents of fileystem.squashfs  to jaunty/remaster

#cp -r jaunty/root jaunty/remaster

Now the jaunty/remaster directory holds the uncompressed root filesystem for your live CD.

Copy resolv.conf and sources.list from the host system

#cp /etc/resolv.conf jaunty/remaster/etc/

Preserve   original sources.list.

#cp jaunty/remaster/etc/apt/soures.list   jaunty/remaster/etc/apt/soures.list.backup

#cp /etc/apt/sources.list /jaunty/remaster/etc/apt/

Make sure that sources.list points to jaunty archive

Now you can chroot to  jaunty/remaster .

#chroot jaunty/remaster

Now run the following ( You are inside chroot )

# mount /proc

# mount /sys

# mount -t devpts none /dev/pts

The above commands mount the respective directories inside chroot.

# apt-get update

Install/remove necessary packages using apt.

Cleanup the unwanted files.

#apt-get clean
#rm -rf /tmp/*
#rm /etc/resolv.conf
#umount -l -f /proc

#umount -l -f /sys

#umount /dev/pts
Exit chroot

Now replace the sources.list with the original sources.list

#cp jaunty/remaster/etc/apt/soures.list.backup   jaunty/remaster/etc/apt/soures.list

Repack squashfs

# cd jaunty
#mksquashfs remaster image/casper/filesystem.squashfs

Recreate filesystem.manifest& filesystem.manifest.desktop:
Run the following  commands.

# chroot remaster  dpkg-query -W –showformat=’${Package} ${Version}\n’ |  tee image/casper/filesystem.manifest

#cp -v image/casper/filesystem.manifest{,-desktop}

# REMOVE=’ubiquity casper live-initramfs user-setup discover xresprobe os-prober libdebian-installer4′

# for i in $REMOVE
sed -i “/${i}/d” image/casper/filesystem.manifest-desktop

Recreate md5sum

#cd image && find . -type f -print0 | xargs -0 md5sum > md5sum.txt

Recreate the iso image.

# mkisofs -r -V “Jaunty_remix” -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/ -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-jaunty-remix.iso .
# cd ..

You can test the new image with virtual box.