Linux系統無盤工做站架設實例

客戶端是支撐PXE方法啓動的刀片,用Linux做爲服務器,服務器配置以下:
1)安裝DHCP服務器dhcpd
2)配置/etc/dhcpd.conf文件,下面是我機器上的文件

max-lease-time-1;default-lease-time-1;#注:IP地址永不過時optionsubnet-mask255.0.0.0;optionrouters10.0.0.1;optiondomain-name-servers10.10.10.10;#optionnetbios-name-servers10.10.10.10;optionbroadcast-address10.255.255.255;#optiondhcp-class-identifier"PXEClient";#optionvendor-encapsulated-options01:04:00:00:00:00:ff;#optionoption-135"start";subnet10.0.0.0netmask255.0.0.0{range10.10.12.13110.10.12.150;hostblade01{hardwareethernet00:e0:43:00:02:00;fixed-address10.10.12.131;filename"/tftpboot/pxelinux.0";#注:啓動映象文件}hostblade02{hardwareethernet00:e0:43:00:02:02;fixed-address10.10.12.132;filename"/tftpboot/pxelinux.0";}hostblade03{hardwareethernet00:e0:43:00:02:04;fixed-address10.10.12.133;filename"/tftpboot/pxelinux.0";}hostblade04{hardwareethernet00:e0:43:00:02:06;fixed-address10.10.12.134;filename"/tftpboot/pxelinux.0";}hostblade05{hardwareethernet00:e0:43:00:02:08;fixed-address10.10.12.135;filename"/tftpboot/pxelinux.0";}}
闡明:dhcp客戶獲得IP地址後用TFTP協議從服務器高低載啓動映象文件。我用syslinux
工具包裏邊的pxelinux來做爲遠程啓動的loder.
3)配置tftpserver
應用pxelinux做領導工具須要支撐TSIZE參數的tftpserver。可從http://www.kernel.org/pub/software/network/tftp/下載。
經過xinetd來應用tftp服務,個人/etc/xinetd.conf文件以下

......servicetftp{socket_type=dgramprotocol=udpwait=yesuser=rootserver=/usr/sbin/in.tftpd}
4)配置PXELINUX
先安裝syslinux軟件包。可從http://www.kernel.org/pub/linux/uti……syslinux/下載。
將pxelinux.0拷貝到/tftpboot/目錄下,而後創建/tftpboot/syslinux.cfg/目錄。該目錄下存放配置文件。
pxelinux應用ip地址的十六進制表現來做爲該ip地址的配置文件的文件名。如blade01的
ip地址爲10.10.12.131,配置文件名爲0A0A0C83,內容爲:

defaultlinuxlabellinuxkernelvmlinuzappendip=dhcproot=/dev/nfsrootnfsroot=10.10.11.120:/remote/blade01vga=normal
5)配置nfs
爲每一個刀片創建一個根目錄,在該刀片的pxelinux配置文件裏指定了從這個nf***port的目錄啓動。
該根目錄裏應把尺度的目錄都建好,另外須要從新mount的usr,home,public等目錄也要export。
個人/etc/exports文件:

#/etc/exports:theaccesscontrollistforfilesystemswhichmaybeexported#toNFSclients.Seeexports(5)./remote/blade01blade01(rw,async,no_root_squash)/remote/blade02blade02(rw,async,no_root_squash)/remote/blade03blade03(rw,async,no_root_squash)/remote/blade04blade04(rw,async,no_root_squash)/remote/blade05blade05(rw,async,no_root_squash)/remote/root*(rw,async,no_root_squash)/remote/home*(rw,async,no_root_squash)/usr*(ro,async,no_root_squash)/sbin*(ro,async,no_root_squash)/bin*(ro,async,no_root_squash)/lib*(ro,async,no_root_squash)/home*(ro,async,no_root_squash)
6)爲每一個刀片修正它的/etc/fstab文件,以blade01爲例,它的nfsroot是/remote/blade01
/remote/blade01/etc/fstab文件以下:

#/etc/fstab:staticfilesysteminformation.##10.10.11.120:/remote/blade01/nfsdefaults,intr0110.10.11.120:/remote/root/rootnfsdefaults,intr0110.10.11.120:/remote/home/homenfsdefaults,intr0110.10.11.120:/bin/binnfsdefaults,intr0110.10.11.120:/usr/usrnfsdefaults,intr0110.10.11.120:/sbin/sbinnfsdefaults,intr0110.10.11.120:/lib/libnfsdefaults,intr01none/procprocdefaults,intr01
同時還要爲每一個刀片修正它的網絡配置文件,配置ip地址,啓動兩塊網卡等等……
7)編譯內核
刀片用的內核,應當支撐KernelLevelAutoConfiguration的DHCP協議,支撐NFS,支撐NFSROOT,
假設編譯好的內核爲vmlinuz,將它拷貝到/tftpboot/目錄下。
相關文章
相關標籤/搜索