The documentation for LTSP is very good, you may want to refer to it.
Source
UBC Physics Administrator's Guide for Computer Lab
Author: Eric Nodwell
Source
UBC Physics Administrator's Guide for Computer Lab
Author: Eric Nodwell
This document can be freely redistributed according to the terms of the GNU General Public License.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
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 http://http.us.debian.org/debian
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.)
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.
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.
usr/sbin/base-config
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:
Contents of /etc/apt/apt.conf :
Contents of /etc/apt/preferences :
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).
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 http://http.us.debian.org/debian
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 |
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 address 172.16.0.10 network 172.16.0.0 netmask 255.255.0.0 broadcast 172.16.255.255 gateway 172.16.0.1 |
search physics.ubc.ca nameserver 172.16.0.1 |
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:
eepro100 |
usr/sbin/base-config
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 http://mirror.direct.ca/linux/debian/ stable main non-free contrib deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free deb http://security.debian.org/ stable/updates main contrib non-free # Testing deb http://mirror.direct.ca/linux/debian/ testing main non-free contrib deb http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free # Unstable deb http://mirror.direct.ca/linux/debian/ unstable main non-free contrib deb http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free # Sources #deb-src http://mirror.direct.ca/linux/debian/ testing main non-free contrib #deb-src http://mirror.direct.ca/linux/debian/ unstable main non-free contrib # Java deb ftp://ftp.gwdg.de/pub/languages/java/linux/debian testing main non-free |
APT { Cache-Limit "25165824"; Get { Show-Upgraded "true"; }; }; |
Package: * Pin: release a=stable Pin-Priority: 500 Package: * Pin: release a=testing Pin-Priority: 600 Package: * Pin: release a=unstable Pin-Priority: 400 |
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:
boot=/dev/hda |
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:
Post a Comment