The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

Next Previous Contents

3. Setting up the clients

3.1 Errata

In order to setup the clients, we have to work on the base system. First, we will make some modifications to the startup scripts by hand and second we will boot a workstation with the base system to make sure it works and to polish some details. Note that this part is very distribution specific and perhaps some of those described here are not applicable to your case. I can only guarantee that this works for SuSE 7.0. Please, feel free to send me distribution specific copies of this page!

3.2 Fiddling with scripts and files!

After init is started, it executes a script described in /etc/inittab. This script has a very spesific job to do: Bring the system in a state that other programms can be started. In most distributions I can think of this script does the following:

  1. Mounts the /proc, /dev/pts and swap filesystems.
  2. Activates raid arrays and fscks the root filesystem.
  3. Adjusts the clock.
  4. Starts the kernel deamon for autoloading of modules.
  5. Executes user defined client scripts.
  6. Set some kernel parameters.
On most distributions I have checked this script is very well commented and it is possible for an experienced user to remove some lines that are not wanted or not applicable during a network boot. I 've also noticed that all programms started do not require the /usr directory to be mounted. If you are trying to netboot a host you must do the following modifications to this script:

How to setup a swap partition

This is tricky business! Swapping over NFS is not allowed by the kernel and not functioning either. You cannot use swapon on files that are on an NFS mounted filesystem. We have to do some tricks to enable it:

  1. Create the swap file. Its size can be variable but for a machine with 128 MB of RAM a swap size of 40-50 MB seems reasonable. The command to create the swap file is: dd if=/dev/zero of=/var/swap bs=1k count=Xk where X stands for the number of MB your swap should be. It is also a necessity to put the swap file under /var as long as it is mounted at boot.
  2. Format the swap file using the mkswapfs command.
  3. Initialise a loopback device using the swap file. The command is losetup /dev/loop0 /var/swap.
  4. Mount the loopback device with the command mount /dev/loop0 swap.
You have to initialise a swap partition at the very beginning of the boot process. So place commands 2-4 somewhere near to the top of the startup script. The first command is very time consuming,especially in the case of a loaded network so just copy a swap file in the base system and do not delete it when you create directories for each host.

Modifying /etc/fstab

The /etc/fstabfile contains entries for automounting file systems at boot. In our case, we have to place the following lines at the end of it:

server_IP:/usr/local/linux/base/usr /usr nfs nfsvers=3,wsize=2048,tcp 0  0
server_IP:/usr/local/linux/base/opt /opt nfs nfsvers=3,wsize=2048,tcp 0  0
server_IP:/usr/local/linux/base/lib/modules /lib/modules nfs nfsvers=3 wsize=2048,tcp 0  0
fileserver_IP:/home /home nfs nfsvers=3,wsize=2048,tcp 0  0

Also, do not forget to comment out lines that mount local partitions. Save this file as /etc/fstab.new because it should not be activated yet, as long as we have to boot the base system first.

Copying password files

You must provide the system with to files to let the users perform a login. To do this just copy the files /etc/passwd and /etc/shadow from your file server to the base system. Notice that you have to do it every time you add a user to the system, or a user changes his/her password, so can best be done by creating a cron job.

3.3 Booting the base system

To boot the base system we have to create a boot disk first. Go to the next section and create a boot disk as recommended. Please, change the 'append' line to this one:

append init=/sbin/init root=/dev/nfs
                ip=X:Y:195.251.160.254:255.255.255.0:::'off'
                nfsroot=Y:/usr/local/linux/base vga=0x318

(Of course, in a sigle line)
where X stands for an unused IP address in your network and Y for the IP address of the NFS server. Of course, you have to export the /usr/local/linux/base directory from the NFS server with the rw,no_root_squash options. Now boot the base system. Everything should work OK, but I don' t think that there is a possibility that you succeeded from the first boot! There are many obscure points, that you have forgotten to edit or I have forgotten to mention.

This is the standard method to boot the base system and to add programms or a new kernel to your installation. So backup the files you have edited as well as the boot disk image.

After succeeding to boot the system, you are in a complete linux enviroment. Login as root and enjoy a first ride in your newly created system! Now comes the hard time... You have to disable some services that startup automatically and remove some programms not needed by the users.

3.4 Configuring the system

Nearly all distributions start these services:

Also, according to your installation, there may be started sshd, nscd, cupsd and other network services not needed on clients. To disable these services, remove their entries from the runtime directory under /etc/rc.d/X. There is a more elegant way to do this under SuSE or RedHat, using Yast or Linuxconfig. For Yast, go to System administration ---> Change configuration file and using search locate the entries for every service you want to stop.

Then, uninstall all these services from the base system. The only service that seems reasonable to me to be left running is the NameServer caching deamon, which is able to reduce network traffic a lot.

Now, you have to edit some files:

Configuring the language

Perhaps, you do not leave in the US or the UK, like me, so you have to configure the language. This is simply done through the .profile file. Just add the following: export LANG="X"where X is your natural language. Then, download a console font which supports your codepage and set, with the help of Yast, the keyboard keymap. Copy .profile to /etc/skel of the file server or to all the users' home directories.

The X window system

If you want to provide a working X enviroment for clients with different graphics hardware, you have to use the XFBDev server. If you followed the instructions on howto create a boot disk, you would now be in framebufer mode at 1024x768@16M colors, which is sufficient for use with X windows. Now, you have to configure the X server to load the framebuffer driver. SuSE provides an exellent tool for configuring X wherher it might be version 3 or 4. It is called sax for X 3.3.x and sax2 for X 4.x. To use XFBDev driver start sax with the -s XF86_FBDev option and configure the server according to your hardware. In case you do not use SuSE, most of the work must be done by hand. Create a basic /etc/X11/XF86Config file using xf86config4. Please choose entries that are as much as possible closer to your needs. Then edit the /etc/X11/XF86Config. This file is devided into sections that start with the keyword 'Section' and end with 'EndSection'. Do the following modifications:

I thing that it should be a working configuration for framebuffer systems. For further reference take a look at the XF86Config and the xf86cfg4 man pages. You will find a working XF86Config file at Appendix C.

Configuring network access for KDE2

KDE is the most extensible, configurable and internet enabled window manager available, even if we count some commercial ones that are proud of it! To download KDE, ftp to ftp.kde.org and get the rpms for your distribution. There, you can also find vanilla sources and other related projects.

The main configuration to KDE is done through the K Control Center. There you can find options for configuring the fonts, colors, backgrounds etc. The most important thing you can configure is the LAN browsing deamon that KDE incorporates, lisa. There is also a readme file under \$KDE2ROOT/share/apps/lisa. After you configure lisa, you have to make it (or her?) start in the background every time the computer is started. Find the lisa 's configuration file under /root. Copy it under /etc. Aftewards, place the command lisa -c /etc/lisa.conf at the /etc/rc.d/boot.local file, or the similar for your installation. Now tell me, which is easiest to search a network Windows or Linux?

If your users are coming from the Windows world, they are familiar to find programms at the damned 'Start' menu. To make their transition easy, edit the KDE menu with the Menu Editor programm and add or remove applications there. Then, copy the .kde2 directory from you directory to the /etc/skel directory of your file server. Every new account you create will have access to the menu (and the settings) you have created.


Next Previous Contents


Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру