logo

SLIM 機林: A Solution to Large Size Networked Linux System Administration, Management and Deployment
大型綱絡Linux系統管理與部署簡化方案

Author: David Lee

1. Foreword

Welcome!

2. SLIM

2.1 About:

SLIM stands for Single Linux Image Management. The key concept of SLIM is to maintain a central server known as the SLIM Server. It holds a single Linux OS image to be shared by all the PCs via network booting or other light weight booting media (e.g USB thumb drive, bootable floppy) to run Linux locally. System administration and management is done on the SLIM Server. Since all client PCs shares the same Linux OS image, installation, administration and management follow the approach of "do-one- used-by-all".

SLIM follows the well-known client/server paradigm and combines distributed computing concept to form a powerful Linux platform. The major component is the SLIM server. The SLIM server holds one or more pre-installed Linux system images for sharing across the network. A system image is exported to all client PCs to build their local system during booting. One SLIM server may serve as many OS images as can be offered by different Linux distributions. Once the SLIM server is set up, any client PC can join the SLIM network without any complex preparation and can boot itself up as a full functional Linux System.

To allow client PCs to join the SLIM environment, a simple configuration procedure is needed in the SLIM server. A SLIM network may be formed by one or more TCP/IP subnets.

At the client side and while using network booting, the preparation may be just as simple as to activate the PXE network boot, to plug the network cable of the client PC to the SLIM network and to turn the power on. If client PCs do not support the PXE network interface, a PXE bootable floppy diskette can be used instead.

SLIM uses a stateless approach. On the server side, there is only one "single" OS file system, which is in contrast with other typical diskless solutions (also known as terminal service) where each client usually has its own OS file system on the server side to store client state information. In SLIM, OS software and applications run locally on the client sides rather than in the central server. Therefore the SLIM server does not need to run on a very powerful machine. With the stateless approach, it is much easier and cost effective to do centralized system administration and management

2.2 Application of SLIM:

Since Linux is widely adopted and it has been used for different purposes. So SLIM is designed and implemented to address the need to following applications.

  1. Build cluster system for parallel computing
  2. Typical Linux Desktop on local computer
  3. Diskless Linux Workstation on local computer
  4. Terminal Services
  5. Single Application Oriented Appliance

3. Technical Background

Before to understand SLIM implementation, booting process of Linux system must be explained. And network-booting technology is needed to discuss since SLIM leverages the merit of network boot technology.

3.1 Booting Process

Normally when a PC is turned on. The BIOS code is first part to be executed. It does the POST to initialize system hardware. Then the boot strap program of the BIOS loads the first sector of the booting device. While the booting device is hard disk, the first sector is the MBR (Master Boot Record). If it is a floppy diskette, it is the boot sector. The sector contains a tiny program, which is not more than 512 bytes. This tiny program either a boot manager, a boot loader and may be simply a boot up program part of the OS Kernel itself. Examples of these programs are LILO, grub, and syslinux. They are commonly termed as boot loader. After the execution of BIOS codes, the boot loader will take over the next step of booting. It may have one or more stages of execution in order to provide a selection menu, display message, getting kernel parameter from user, and etc.

The final step of boot loader is to load kernel image. The components required to boot up Linux includes the kernel image and initial ramdisk known as initrd. The initrd is optional. The usage of initrd is to load additional device drivers before the whole system can start up. For example, initrd in RedHat Linux is to load device driver for SCSI and RAID controller. And it is needed when device driver is too big to compile into kernel image. After the loader load kernel image, it jumps to start point of kernel At this stage, it is kernel to start the initialization of different subsystems such as memory management, networking, buffering, I/O management and etc. Then kernel will mount the root file system on media like hard disk. The device holding root file system can be passed as parameter by the boot loader to the kernel.

Follows that kernel executes the "init" program on the root file system. But there is en exception when initrd is used. A program known as "linuxrc" on initrd will be executed before it mounts root file system and run the init program. The "linuxrc" can be any kind program. It may be shell script or a binary program for a particular purpose.

The task of init program is to initialize system components. It makes activate of network interfaces. It starts the running of the daemon processes. Examples of daemon processes are sendmail , NFS server, NIS and etc. Then it starts the terminal login prompt or graphical login dialog box. Now the whole Linux system is ready. This ends the booting process.

3.2 Network Boot Technology

Common booting devices are hard disk, CDROM and floppy diskette. All PC BIOS support them. Latest BIOS will allow USB device and network interface card as the primary booting device. Using the network interface card for booting is known as network boot. Different technologies are proposed on this area. EtherBoot creates boot strap program image, which is burned into ROM/EPROM to plug on socket of Ethernet network interface. A customized boot image is needed to prepare by the supplied utilities program in order for EtherBoot to load and execute. This boot image may be the combination of kernel and initrd or simply the Linux kernel itself. Netboot is another approach. Differently it uses standard DOS drivers (either Packet or NDIS-2) rather need to develop the network interface driver in the case likes EtherBoot. For similarity, the "netbootable" image is needed to prepare with the utility program with the NetBoot package. Another approach is PXE (Preboot Execution Environment). It is new standard proposed by Intel for Intel Wired for Management. As PXE is widely accepted and supported, it is network technology used in SLIM.

PXE provides various of network connection to servers prior to loading an OS. A number of standard IP protocols such as DHCP and TFTP are support in PXE network connection. Almost latest PC system integrated with NIC in market supports PXE. For Linux, the common boot loader use with PXE is pxelinux, which is a variant of syslinux. Differently to Netboot, EtherBoot, pxelinux does not have initial boot strap code that is supposed to be part of PXE network code. The pxelinux simply communicates with PXE boot code.

Typical network boot sequence is simple. Firstly codes (PXE, Netboot, EtherBoot) in ROM of network interface contacts BOOTP/DHCP server to allocate an IP address. Then it obtains the location of the boot image. Next it uses TFTP to download the boot image, and finally jump to execution point of the boot image.

4. SLIM Components

The major component is the SLIM server. The SLIM server holds pre-installed Linux system image for sharing across the network. The system image is exported as read only by the NFS to all client PC to build the their local root file system during booting up. One SLIM server may serve as many as OS images made by different Linux distributions. It also provides TFTP service to allow client PC to download network boot loader. It also holds OS boot images which are linux kernel and initrd for network boot loader to download.

A DHCP server is also required for network boot configuration. It assigns IP addresses to client PCs. It also provides the IP address of the SLIM server, thus client PC can downloand all boot up files, and use the shared system image. However, it is not restricted that DHCP server needed to be a different machine. A common deployment case may use singe server grade machine to serve as SLIM server and also provide DHCP service (Figure 1).

pic01
Figure 1

How it works

Each client PC is configured to enable PXE network boot. It send out DHCP requests. DHCP server responds with assigned IP addresses and the IP address of SLIM server to the client PC. Client PC download the network boot loader for SLIM server, and initiate the boot loader. The boot loader retrives the kernel and initrd for boot up a linux system.

5. Implementation

Implementation of SLIM basically involves development of customized program. It also involves the integration of legacy software's such as NFS, TFTP and DHCP. This software are available free and can be found on any Linux distribution in market. We employ PXE network boot technology and pxelinux network boot loader for booting up client PC. We develop programs which are formed the customized initrd (known as SLIM loader). We also write utility program to make the setup and configuration of SLIM environment easily.

As the target in mind is to use single sharable Linux system image among PC clients with good performance. Mechanism for exporting the system image and importing the image is the key to the success. We use NFS with the best optimization to export the image, customize the initrd to perform the importing and building root file system by exploring local disk as the cache for part of system image from NFS server.

Set up of NFS service is easy, but some performance options for NFS is important. They are worth to mention. In this section we also describe the functionality of customized initrd. It plays a crucial role for client PC to boot up as full function Linux system.

The SLIM loader basically is the image of a mini root file system with associated programs. It is the implementation of initrd used in booting process. And the programs do following tasks.

  1. Loads driver modules
  2. Activates the network interface, starts the dhcp request to allocate an IP address.
  3. Mounts the Linux system image from SLIM server.
  4. Builds the local file system from mounted Linux system image.
  5. Performs pre-init configuration
  6. Switches to the file system on local stoarge media as root file system.
  7. Starts the init program to carry out normal system initialization.

Building the file system on local stoarge media is very crucial because it directly affect the start up of each client PC in SLIM. To speed up this stage, the files duplicated from the OS image to local hard disk is cached. That's after the first boot up, the subsequence boot up will not need to do the file duplication unless the copy in SLIM server is update than the one found in local hard. This strategy is greatly reduce the client system boot time (see Figure 3).

Mounting system image from the SLIM server is another critical point. The NFS options for client PC to mount system image are as following. As the exported system image is read only. The buffer caching at file system level can further increase the over system performance while client PC booted up. Below shows the options.

OptionsDescriptionParameter Value
ro Read only None
nolockNo need file lock crossing NFSNone
actimeoTimeout of caching file attributesLarge value prefered
noatimeDon't update of file access times for each access None
udp Use UDP as underlying network protocol instead of heavy protocol TCP. Anyway,this is default protocol even you don't specify. None
asyncAsynchronous I/ONone

6. SLIM in CS Department

SLIM is applied to following applications in Department of Computer Science(CS). We have many hundreds of PCs in different laboratories and postgraduate student room and faculty staff offices. SLIM allows us to run Linux everywhere in CS across the network for different purpose.

Parallel Computing

The Gideon 300 Cluster consists of 300 dedicated Pentium 4 2.0 GHz PCs running Linux Operating System. It is a high-performance cluster computer built by the Systems Research Group (SRG) of the Department of Computer Science and Information Systems. The construction of the cluster started in early-October 2003 and became fully operational in mid-October 2003. The Gideon 300 Cluster is used to conduct research at HKU on new classes problems that are only solvable using a high degree of parallelism and supercomputing power. It is ranked #175 on the latest TOP500 Supercomputers. It explores SLIM environment to administrate and manage 300 hundred cluster nodes. There is no need to manually install Linux on 300 machines. The SLIM environment applied here includes 3 SLIM servers across two physical Ethernet network.

gideon gideon
Figure 2: Gideon 300 Cluster System

Figure 3 shows the bootup time of Gideon Cluster with different media for holding system files during booting. With caching the bootup time is largely reduced.

boottime
Figure 3

Disk and Diskless Desktop/Workstation

SLIM is applied to CS computer labs. As Linux is good platform for education and research, there is great demand to have Linux platform setup on computer Lab. As it is quite a burden to the software management since different course may need software package differently. With SLIM, software removal and installation is done almost instantly.

Moreover, PC in the Lab already have other OS installed. To make able to use Linux platform, we simply extract a small empty partition from existing OS. For those no able to extract partition or no hard disk, we use SLIM diskless (see Figure 4) feature. Diskless feature is also applied to PC used in postgraduate student rooms and faculty staff office. So it is quite a painless to turn a PC running other OS into a full function Linux system.

While boot up via network, a menu is shown for students to pick which Linux they like to run. To boot locally, it will fall back to start Windows platform.

lab
 
Figure 4: Linux Desktop on PC which just has CPU+Power Supply+RAM


lab
 
Figure 5: CS Computer Lab


Using Virtual Machine

Virtual machine is new emerging computing paradigm. SLIM server/clients works well on VMware. This allows other OS desktop to boot and run Linux without worrying about Linux installation, software upgrading and management. People even don't need to reboot their machines to start a Linux system. This pure Linux/OS on Demand concept provides most convenience to virtual computing model.

lab
 
Figure 6: Using VMWare

On the other hand, Virtualization also allows new kind of parallel computing model: Virtual Clusters (VC). In contrast to traditional and typical cluster systems, more than one cluster nodes can exist in single machine. The machines with dual-core and multi-procssors are speically good for it. Moreover, nodes can join the whole VC easily. It is quite often desktop machines are idle at night. They can contribute their computing power by just joining the VC. SLIM helps to build VC easily and reduces the burden of system administration.

X Window Terminal

CS Department also maintains number of SUN Solaris UNIX servers for students to use. With SLIM, we use Linux to turn PC to a X window Terminal for remote XDM login the Solaris Server. By XDM login, student can select which Solaris Server they want to login. Starting X Terminal is to select the item on menu shown (see Figure 5).

Single Application Oriented Appliance

Many application programs are desktop or single purpose applications. Installing and upgrading is need to go each individual user or location. This is quite a burden when user group is large in size. One of usage of SLIM solution is to make these application becoming network distribute-able/runable application. So there is no need to go each to user's machine or location to update. In short, it simply run anyway and use anyway.

Below figure shows a Java GUI program we use and stored on SLIM server, run just with X Window server on a local machine (by selecting option 7 on Figure 6). In addition, using virtual machine on other Windows desktop, people even don't need a real hardware for it.

lab
 
Figure 7: Java Swing program (cpt7xx)


lab
 
Figure 8: Standalone web browser - Firefox

Figure 8 shows the FireFox web browser started by option 7 of menu shown on Figure 6. This kind of stand alone web browser on a terminal is very useful for public places like malls, lobby, reception, information center where people only needs to surf the WWW. And technical persons do not need to manage the terminals one by one. They just do that software upgrade on the server. At most, they just reboot the terminal remotely to restart new version software.

lab
 
Figure 9: SLIM booted virus scanner to scan/clean local Windows

Sometime while local OS affected by viruses needed to clean/scan by other OS, figure 9 shows SLIM booted virus scanner for this purpose.

7. SLIM over Internet (Proposed)

SLIM on LAN is very mature and stable since we have been using it for very long time. New development and research is forcusing on SLIM over Internet broadband networks such as xDSL and Hybrid Fiber Coax (HFC) network. This imposes new challenge as performance of typical residential broadband network serivce is largely less than LAN network. However, initial implementation proves the concept is realistic and practical.

SLIM over Internet broadband facilitates the concept of utility computing. Computing environment is considered to be a commodity/service supplied by service provider, just like electricity, water,gas and etc.

Small/medium business enterprises (SME) specially needs this type of service. Linux is low cost but relatively technical issue harder to tackle. SME usually do not have in-house technical support for Linux. They can subscribe the service, use it but they do not need to take care of technical issues and system administration. Although every orgainizatoin can supply this service, ISP will be the ideal party to provide this kind of service to their internet broadband service subscribers.

In short, this new computing model is offering new business opportunity.
pic04
Figure 10

SLIM over Internet needs an innovative system infra-structure which is differently to current Linux on local machine or LAN. The basic components proposed are

  1. An Internet boot loader which is about booting Linux from xDSL/Cable broadband network
  2. A network tunnel for private communication between server/client machine.
  3. A caching file system reduces network traffic to system files access.
  4. A security mechanism protects client/server from hacker attract or intrusion.

These components are not all. There may be some more else.

As long as the Internet boot loader and tunnelling are implemented, at least a verson using current SLIM on LAN architecture can be for demo whole idea and for distribution.

8. Events

We have been invited to conduct number of presentations and demonstrations for SLIM project. We believe the usefullness of SLIM can benefit the community. We think presentation and demonistration are very effective to let people to have more understanding on SLIM.

Date
Events
Oct 2005
Dec 2004
Oct 2004
Sept 2004
  • Demonstration to visitors from InvestHK, The Government of HKSAR.
July 2004
June 2004
  • SLIM was reported in Hong Kong Economic Journal(信報)'s Information Technology section publicshed on June 1st.
May 2004
Apr 2004
  • Invited presentation - Internet Professionals Association
Mar 2004
  • Interviewed by the Linux Pilot Magazine
Feb 2004
Jan 2004
  • Presentation and demonstration for the visitors from the Information Technology Services Department (ITSD), The Government of HKSAR

9. Summary

SLIM provides following advantages:

  1. Elimination of manually installation of Linux OS to individual PC. Instantly turn a PC which running of different OS to join networked Linux environment.
  2. Fast Installation of software. Software is installed centrally. It appears to all PCs
  3. Fast system recovery and backup. Local machine does not hold important data. Only needed to backup the central OS on the SLIM server.
  4. Cost Effective, fewer personnel involved to system administration and management. Required software to build SLIM is free.
  5. Flexibility, it can be used for any purpose. X terminal, workstation and Cluster Computing
  6. Good performance, practical applications have shown us that SLIM work very well on different area of use. They are used daily. Users just feel like they are using the dedicated machine.
  7. Increase utilization of PC, single machine can run Linux system in additional to OS installed locally.

10. References

This project is either not feasible or very difficult and costly without the contribution of people involved in following Linux and open source projects.

11. Glossary

  1. POST: Power-on self-test
  2. PXE: Preboot Execution Environment is new standard proposed by Intel for using network interface as boot device.
  3. Single Linux Image: The file system hierarchy for sharing.
  4. Linux OS Image: same as Single Linux Image.