PXE Network Boot and Install Linux over NFS server

PXE Network Boot is an Intel technology that can boot a system and install OS from remote image source. The prerequisites to achieve this include: a ROM embedded into a network card confroming Intel PXE specification, a DHCP server that can serve as a responser of the request sent by NIC card and assign an IP for it, a remote boottrap and kernel over TFTP protocol. In this demo, additionally we will use a NFS server that provides the actual image source.

Set up NFS Server

Served as a remote image source provider, we set up a NFS server that the images locates and will be remotely attached to a client. NFS is a cluster file system relatively simple and is readily provided in almost all the Linux distributions. So the first thing to do is to enable the NFS daemo. The NFS server processes are started from the /etc/init.d/nfs and /etc/init.d/nfslock files. Both of these files may be enabled with the customer chkconfig commands:

Code

The behavior of NFS on your server may be controlled by the /etc/sysconfig/nfs file. This file contains the options used by the /etc/init.d/nfs file, and usually does not exist by default. So, firstly, start NFS daemon and tell the NFS process where the image source locates and can be mounted remotely by a client server. The more detailed behavior information of NFS process can be seen below:

NFS detailed info

Set up TFTP Server

TFTP is a file transfer protocal silimar to FTP but a lot more simpler. Install TFTP packages on the NFS server (or any other server). Further configure the root of the TFTP service via config file /etc/xinetd.d/tftp, a typical specification will look like:

tftp service

 Configure PXELINUX on TFTP server

Now configure PXELINUX on TFTP server so that the PXE client can know where to load an OS bootstrap and start the installation process. The necessary files include:

Code

A sample configuration file looks like:

Sample cfg

 Configure DHCP server 

A typical DHCP configuration looks like the following. Note that in the configuration file, it specifies the NIC address of the client, designates an IP for the client, and specifies the location of the TFTP server and bootstrap location. 

Code

 A demo reference can de found on IBM developer network: 如何远程安装Linux

posted @ 2008-12-22 11:15  xiaoyixy  阅读(1055)  评论(0编辑  收藏  举报