Knowledge Base Nr: 00038 NFSBoot.txt - http://www.swe-kaiser.de

Linux: NFS-Booten: Installation und Konfiguration Server und Clients
(Auszüge aus einem Vortrag von Marco Schwarz)

  
Server - Installation:
----------------------
- SuSE Linux 7.2 Professional mit Standard/Netzwerkserver/Entwicklung
- NFS-Server, Kernelversion 2.4.10
- TFTP
- BOOTP

Client - Installation:
----------------------
- SuSE Linux 7.2 Professional mit Standard/Entwicklung
- NFS-Client, Kernelversion 2.4.10

Server - Konfiguration:
-----------------------
Dateien und Verzeichnisse

- /etc/inetd.conf: Services für inetd
- /etc/bootptab: Parameter + Konfiguration der Clients (HA, IP, GW, Verzeichnis, NFS-Parameter)
- /etc/exports: NFS-Server Freigaben
- /etc/hosts: IP-Adressen und Namen aller Clients
- /tftpboot/pxelinux.0: PXE - Bootladeprogramm
- /tftpboot/netboot: Kernel - Image zum laden über TFTP
- /tftpboot/pxelinux.cfg/default: Konfigurationsdatei für Kernelparameter
- /netclients: System-Verzeichnisse für die einzelnen Clients sowie Programme
- /opt/oracle: Zentrale Oracle-Installation, wird von allen Clients und vom Server genutzt


/etc/inetd.conf (Auszug)

# Tftp service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
#
tftp dgram udp wait root /usr/sbin/tcpd in.tftpd /tftpboot
bootps dgram udp wait root /usr/sbin/bootpd bootpd


/etc/bootptab (Auszug)

global.prof:\
:sm=255.255.255.0:\
:gw=153.95.240.254:\
:ht=ethernet:\
:bf=pxelinux.0:

local.prof:\
:sm=255.255.255.0:\
:gw=192.168.0.235:\
:ht=ethernet:\
:bf=pxelinux.0:

# QS Client Oberwihl 01
qsclient01.fds:\
:hd=/tftpboot:\
:tc=local.prof:\
:ha=0002B3330B7F:\
:ip=192.168.0.191:\
:sa=192.168.0.235:\
:rp=/netclients/192.168.0.191,rsize=4096,wsize=4096:

# QS Client Oberwihl 02
qsclient02.fds:\
:hd=/tftpboot:\
:tc=local.prof:\
:ha=0002B388BF88:\
:ip=192.168.0.110:\
:sa=192.168.0.235:\
:rp=/netclients/192.168.0.110,rsize=4096,wsize=4096:

# Rohstoffeingang
rohobw01.fds:\
:hd=/tftpboot:\
:tc=local.prof:\
:ha=0002B3891848:\
:ip=153.95.240.182:\
:sa=153.95.240.235:\
:rp=/netclients/192.168.0.86,rsize=4096,wsize=4096:


/etc/exports

## See exports(5) for a description.
# This file contains a list of all directories exported to other computers.
# It is used by rpc.nfsd and rpc.mountd.

/netclients *.fds(rw,no_root_squash)
/opt/oracle *.fds(rw,no_root_squash)
/ obwlxs02(rw,no_root_squash)


/etc/hosts

#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost
153.95.240.245 mir_server
153.95.169.111 fawlxs01.fds fawlxs01
153.95.240.192 lvobw01.fds lvobw01

153.95.240.236 mirobw01.fds mirobw01
192.168.0.80 mirobw02.fds mirobw02

192.168.0.191 qsclient01.fds qsclient01
192.168.0.110 qsclient02.fds qsclient02
192.168.0.111 qsclient03.fds qsclient03


/tftpboot/pxelinux.cfg/default

DEFAULT netboot root=/dev/nfs rw nfsaddrs=153.95.169.113 vga=0x317

/tftpboot/pxelinux.cfg/C0 (192.x.x.x)

DEFAULT netboot root=/dev/nfs rw nfsaddrs=192.168.0.235 vga=0x305



Client - Konfiguration:
-----------------------

Kernelkonfiguration
- Network Block Device support
- IP: kernel level autoconfiguration
- IP: BOOTP support
- EtherExpressPro/100 support
- NFS file system support
- Provide NFSv3 client support
- Root file system on NFS
- Frame buffer support
- VESA VGA graphics console

Dateien und Verzeichnisse

- /etc/hosts: Namen und IP-Adressen von NFS-Server und Datenbankservern
- /etc/fstab: Zu mountende NFS-Verzeichnisse


/etc/hosts

#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost
192.168.0.235 obwlxs04.fds obwlxs04
192.168.0.10 ds_nov_01_ob_ex

192.168.0.121 qsclient13.fds qsclient13

/etc/fstab

obwlxs04:/netclients/common/usr /usr nfs defaults,rsize=8192,wsize=8192 0 0
obwlxs04:/netclients/common/opt /opt nfs defaults,rsize=8192,wsize=8192 0 0
obwlxs04:/opt/oracle /opt/oracle nfs defaults,rsize=8192,wsize=8192 0 0
obwlxs04:/netclients/common/Oberwihl /home/dokend/Oberwihl nfs
defaults,rsize=8192,wsize=8192 0 0