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!
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:
/usrdirectory to be mounted. If you are trying to netboot a host you must do the following modifications to this script:
mount -o remount,rw /because the client has to have rw access to the root directory when it boots.
ln -s /etc/rc.d/portmap /etc/rc.d/boot/S01portmapif you are using SuSE.
ln -s /etc/rc.d/nfs /etc/rc.d/boot/S02nfsfor SuSE.
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:
dd if=/dev/zero of=/var/swap bs=1k count=Xkwhere X stands for the number of MB your swap should be. It is also a necessity to put the swap file under
/varas long as it is mounted at boot.
losetup /dev/loop0 /var/swap.
mount /dev/loop0 swap.
/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.
You must provide the system with to files to let the users perform a login. To do this just copy the files
/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.
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:
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
append init=/sbin/init root=/dev/nfs ip=X:Y:220.127.116.11:255.255.255.0:::'off' nfsroot=Y:/usr/local/linux/base vga=0x318 (Of course, in a sigle line)
/usr/local/linux/basedirectory from the NFS server with the
rw,no_root_squashoptions. 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.
Nearly all distributions start these services:
inetd, the Internet superdeamon responsible for starting other deamons like telnet, ftp etc.
syslogd, the logging deamon. Not needed on a diskless client not needed because all the modifications are done to files easyly replacable.
httpd, the apache webserver. Not needed for obvious reasons.
dhcpclient. Needed for automatic aquisition of an IP address. At out case, this is done by the kernel.
lpd, the line printer deamon. This is needed only when you have a printer connected to a host. In most cases, this is not needed.
/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 fileand 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:
/etc/resolv.confUsed to provide a nameserver. Add these entries: nameserver xxx.xxx.xxx.xxx and domain xxxxx , replacing x with the correct values.
/etc/hostsUsed to match IP addresses to host names localy. Provide the basic servers' names of your network.
/etc/nntpserverUsed to provide a news server. Just append the nameserver 's hostname.
fstab.newfile we have created earlier.
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.
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:
Option "Buttons" "5" Option "ZAxisMapping" "4 5"
BoardName "AutoDetected" Driver "fb" Identifier "Device" VendorName "AutoDetected
Identifier "Modes" Modeline "1024x768" 71.39 1024 1040 1216 1 400 768 768 776 802
DefaultDepth 16 SubSection "Display" Depth 16 Modes "1024x768" EndSubSection Device "Device" Identifier "Screen" Monitor "Monitor"
and then replace the first argument of the InputDevice directives with the identifiers which can be found earlier in the file.
Identifier "Layout[all]" InputDevice "Keyboard" "CoreKeyboard" InputDevice "Mouse" "CorePointer" Screen "Screen"
xf86cfg4man pages. You will find a working XF86Config file at Appendix C.
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.