Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Tuesday, May 24, 2011

Linux Terminal Server Project on Debian

The documentation for LTSP is very good, you may want to refer to it.
UBC Physics Administrator's Guide for Computer Lab
Author: Eric Nodwell

Table of Contents
1. Installation
I'm going to do an unusual install, which doesn't require any installation media. The general instructions for this kind of install are here. The first thing needed is a KNOPPIX CD. Boot with this CD, which gives you a fully-functional Linux system, running entirely off of the CD.
Set up the network for KNOPPIX, under the system menu KNOPPIX -> Network/Internet -> Network card configuration. Use the same network settings which you will ultimately use for the server (given below).
Get a root console on KNOPPIX with
sudo bash
Partition the hard drive with fdisk /dev/hda. I set up /dev/hda1 to be a 1GB swap partition, and the rest as a single Linux partition /dev/hda2. You probably want to reboot KNOPPIX after this.
Format /dev/hda2 with the ext3 file system.
mke2fs -j /dev/hda2
mkswap /dev/hda1
Create a mount point and mount the partition we will install on.
mkdir /mnt/debinst
mount /dev/hda2 /mnt/debinst
Now call the debootstrap which will install a Debian base system.
/usr/sbin/debootstrap --arch i386 woody /mnt/debinst
Now we chroot into our new bare-bones Debian system.
chroot /mnt/debinst /bin/bash
We need to create an /etc/fstab file. (You can use the nano editor, which is part of Debian base and easy to use, or, since you're running a KNOPPIX X-session, you can select the following file contents with the mouse, run cat > /etc/fstab, clip with the middle mouse button to paste in the selected contents, and then hit CTRL-D.)
#/etc/fstab for lts1
# file system    mount point   type    options                  dump pass
/dev/hda2        /             ext3    defaults                 0    0
/dev/hda1        none          swap    sw                       0    0
proc             /proc         proc    defaults                 0    0
/dev/fd0         /mnt/floppy   auto    noauto,rw,sync,exec      0    0
/dev/cdrom       /mnt/cdrom    iso9660 noauto,ro,exec           0    0
We need to mount the proc file system before continuing.
mount -t proc proc /proc
To configure the networking, we need an /etc/network/interfaces file.
# /etc/network/interfaces

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
And we need a /etc/resolv.conf file.
And a /etc/hostname file.
echo lnx1 > /etc/hostname
At this, point, you should also run
hostname lnx1
We also need to make sure that the network driver kernel module is loaded at boot time. To find out which module it needed, run lsmod. It's one of these, since KNOPPIX has figure it out. In the present case, I need to add this line to /etc/modules:
Now run base-config to configure some other stuff and answer the questions. Don't select md5 paswords, because of compatibility with Solaris. Don't select any packages or package groups either - we'll leave this till later.
Now we are going to customize apt, the package management system. We are going by default to use the testing branch of debian, with some packages from unstable (at the current time, some important KDE and Gnome stuff is still in unstable).
Contents of /etc/apt/sources.list:
# Stable
deb stable main non-free contrib
deb stable/non-US main contrib non-free
deb stable/updates main contrib non-free

# Testing
deb testing main non-free contrib
deb testing/non-US main contrib non-free

# Unstable
deb unstable main non-free contrib
deb unstable/non-US main contrib non-free

# Sources
#deb-src testing main non-free contrib
#deb-src unstable main non-free contrib

# Java
deb testing main non-free
Contents of /etc/apt/apt.conf :
  Cache-Limit "25165824";
     Show-Upgraded "true";
Contents of /etc/apt/preferences :
Package: *
Pin: release a=stable
Pin-Priority: 500

Package: *
Pin: release a=testing
Pin-Priority: 600

Package: *
Pin: release a=unstable
Pin-Priority: 400
We need to install a kernel.
apt-get install kernel-image-2.4.20-3-686-smp
There will be some funny complaints about an initrd kernel, but actually there's no problem. Don't install a boot loader, because we have to make one change to the /etc/lilo.conf file first. Make sure it has this line:
Now run lilo.
Now we want to be able to go complete the installation sitting somewhere else, so install ssh.
apt-get install ssh
Now reboot (remove the KNOPPIX CD).

No comments: