CSDN home>

PXE OpenPOWER no disk workstation environment to build

Published in18:26 2016-06-16| Time reading| sourceCSDN| ZeroArticle comments| authorToo

Abstract:Diskless workstation is one of X86 server world of regulatory requirements, the openpower fulfill the requirement and x86 did not essential difference, for domestic first openpower server manufacturers and we in RedPOWER server on top of also provides this service. The following is the build process, hope to help you!

No disk workstationX86One of the conventional needs of the server worldOpenPOWERTo achieve this demand andX86And there is no essential difference, as the first domesticOpenPOWERServer manufacturer, we are inRedPOWERThe server also provides this service, the following for the building process, and I hope to help you!

First on a whole flow chart.


Part one: buildNFS, DHCP, TFTPservice  (byX86Build a server can also be I was inX86_centos7.2On test pass.

Note: When the server is set up, theSELinuxandIptablesClose, such as executionSetenforce 0and-F IPtable 

One, configurationNFS


Install nfs-utils portmap yum

Restart nfs-server systemctl

Enable nfs-server systemctl

Status nfs-server systemctl

Note: do not manually enableRpcbindIn service, in other words, not to be executed.Restart rpcbind systemctl

Two, serverDHCPInstallation:Install *dhcp* yum 


Tftpboot]# cat /etc/dhcp/dhcpd.conf [root@localhost netmask subnet { range;

Domain-name-servers option;

Routers option;

Default-lease-time 21600;

Max-lease-time 43200; next-server;

Pxelinux.0 "filename";



Restart dhcpd systemctl

Enable dhcpd systemctl

Status dhcpd systemctl

Three,TFTPServer build:TFTPService is throughXinetdTool management

1) install tftp-server xinetd yum

2) /tftpboot/ MKDIR/ creationTFTPDirectory of service sharing

Modify as follows:

Tftpboot]# VIM /etc/xinetd.d/tftp [root@localhost 

# default: off

The TFTP server serves # description: files using the trivial file transfer.

The TFTP protocol is # protocol. often used to boot diskless.

# workstations, download configuration files to network-aware printers, \

To start the installation # and process for some operating systems.

TFTP service


Socket_type = Dgram

Protocol = UDP

Wait = yes

User = root

Server = /usr/sbin/in.tftpd

Server_args = -s - /tftpbootModify directory/tftpboot

Disable ---------------------------- = noTo be modified asNo

Per_source = 11

CPS = 1002

Flags = IPv4



Restart xinetd.service systemctl 

Enable xinetd systemctl

Status xinetd systemctl

So far, all the services have been completed. Final inspectionDHCP,TFTP,NFSthisThreeWhether the service has been started, whether it has been set to boot from the start

Status dhcpd systemctl

Status xinetd systemctl

Status NFS systemctl

The second part: the setting of no disk workstation

OneCreate a system directory, no disk workstation is to get the file from this.

-p /client/ppc_centos72 MKDIR

The following is a line of command, is to own the system fileCopyreach/client/ppc_centos72, in other words is to use their own production system files.

Rsync -avz --exclude='/client'--exclude='/proc' --exclude='/sys'--exclude='/tmp' --exclude='/var/tmp'--exclude='/media' --exclude='/mnt'--exclude='/lost+found' --exclude='/etc/mtab'--exclude='/run' --exclude='/opt'--exclude='/dev' --exclude='/opt'switchblade /client/ppc_centos72/ /client/ppc_centos72/


Enter this directory, create the other empty folders:

/client/ppc_centos72/ CD

-p proc sys MKDIR TMP var/tmp media MNT opt run dev

get into/client/ppc_centos72/dev/Execute the following two commands

Dev]# mknod -m [root@www 666 C console 51

Dev]# mknod -m [root@www 666 C null 13


TwoeditFstabContent is as follows, (the original/ /bootEtc all deleted)

editOKAs follows:

[root@localhost cat /client/ppc_centos72/etc/fstab /]# / defaults sync, NFS, RW, nolock 00

/dev/shm TMPFS defaults TMPFS 11

/dev/pts devpts gid=5 mode=620, devpts 00

/sys sysfs defaults sysfs 00

/proc proc defaults proc 00

The two step is inPPCPlatform to produce a good file system, and thenCopyreachX86_centos7.2On test. Of course, can also be usedPPCPlatform to build the server, which is a bit of luxury

ThreeadoptNFSShared publishing workstation system

[root@pxesvr VIM /etc/exports ~]#

/client/ppc_centos72 * (RW, async, no_root_squash, insecure).be careful:InsecureMust add

to update:

-rv exportfs

verificationNFSWhether the configuration is successful:-a showmount

[root@localhost showmount / -a /]#Normal return as follows:

Mount points on localhost.localdomain: All

Problems that may be encountered:

[root@localhost showmount -a ~]#

Clnt_create: RPC: Program not / / registeredexplainNfs-serverNot enabled

Fourget readyPXEBootstrap programPxelinux.0BySyslinuxPackage provided, if not onInstall syslinux yum,fromX86System extraction can be)


/usr/share/syslinux/pxelinux.0 /tftpboot/ CP

FiveCreate folder and editDefaultfile

-p /tftpboot/pxelinux.cfg MKDIR

/tftpboot/pxelinux.cfg/default VIM

[root@localhost cat /tftpboot/pxelinux.cfg/default /]#

CENTOS72 default

Prompt 1 //0Automatic selection, do not wait for client intervention1Wait for the client to operate

Timeout 20

CENTOS72 label

Vmlinuz kernel / /Note: Although the true path to the file is/tftpboot/vmlinuzBut here to writeVmlinuz

Append initrd=initrd.img ip=dhcp RW root=nfs: / / selinux=0hinderSelinux=0Must be added, otherwise the system will start to get stuck.

SixTwo files are ready for guidance (in strict accordance with the following steps)

One)LinuxKernel fileVmlinuz

Two)Initrd.imgMirror file(Note: the problem is easy toInitrd.imgupper)

[root@pxesvr CD /client/ppc_centos72/boot/ ~]#

Boot]# CP vmlinuz-2.6.32-220.el6.i686 /tftpboot/vmlinuz [root@pxesvr


[root@pxesvr chroot /client/ppc_centos72/ ~]#

[root@pxesvr ppc_centos72]# dracut initrd.img `uname / / -r`Note: first in the current system executionInstall nfs-utils portmap yumEnsureNFSAll installed, and then generatedInitrdDocuments. Premise: to ensure that it has been installedDracut-network, and then useDracutTool makingCentos7Installed by default

Ppc_centos72]# exit [root@pxesvr

[root@pxesvr MV /client/ppc_centos72/initrd.img /tftpboot/ ~]#

SevenImprove authority:

-R Chmod 777 /tftpboot/

At this point, all operations are completed, the client is currently throughPXEStart, you should be able to enter the system!

Other shows that the general experiment is not successful becauseInitrd.imgDoes not containNFSThe module contains, or not comprehensive, can not cause the system to launch the remote mount file system. So makeInitrd.imgShould pay more attention to.

Attached, the experiment is successful.Initrd.imgContainedNFSsituation:

Tftpboot]# lsinitrd initrd.img|grep NFS [root@localhost


-rw-r--r-- 1 root root 15 Jun 15 etc/modprobe.d/nfs.conf 15:07

Drwxr-xr-x 2 root root 0 Jun 15 usr/lib64/libnfsidmap 15:07

-rwxr-xr-x 1 root root 68656 Jun 15 usr/lib64/libnfsidmap/ 15:07

-rwxr-xr-x 1 root root 69240 Jun 15 usr/lib64/ 15:07

Lrwxrwxrwx 1 root root 20 Jun 15 15:07 usr/lib64/ - >

-rwxr-xr-x 1 root root 68640 Jun 15 usr/lib64/libnfsidmap/ 15:07

-rwxr-xr-x 1 root root 68952 Jun 15 usr/lib64/libnfsidmap/ 15:07

-rwxr-xr-x 1 root root 955 Sep 122013 usr/lib/dracut/hooks/cleanup/

-rwxr-xr-x 1 root root 3358 Oct 202015 usr/lib/dracut/hooks/cmdline/

-rwxr-xr-x 1 root root 929 Sep 122013 usr/lib/dracut/hooks/pre-udev/

Drwxr-xr-x 5 root root 0 Jun 15 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs 15:07

Drwxr-xr-x 2 root root 0 Jun 15 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs/blocklayout 15:07

-rw-r--r-- 1 root root 92289 Jan 312015 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs/blocklayout/blocklayoutdriver.ko

Drwxr-xr-x 2 root root 0 Jun 15 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs_common 15:07

-rw-r--r-- 1 root root 9697 Jan 312015 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs_common/nfs_acl.ko

Drwxr-xr-x 2 root root 0 Jun 15 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfsd 15:07

-rw-r--r-- 1 root root 674489 Jan 312015 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfsd/nfsd.ko

Drwxr-xr-x 2 root root 0 Jun 15 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs/filelayout 15:07

-rw-r--r-- 1 root root 69417 Jan 312015 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs/filelayout/nfs_layout_nfsv41_files.ko

-rw-r--r-- 1 root root 534513 Jan 312015 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs/nfs.ko

-rw-r--r-- 1 root root 102105 Jan 312015 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs/nfsv3.ko

-rw-r--r-- 1 root root 991329 Jan 312015 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs/nfsv4.ko

Drwxr-xr-x 2 root root 0 Jun 15 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs/objlayout 15:07

-rw-r--r-- 1 root root 51913 Jan 312015 usr/lib/modules/3.10.0-229.ael7b.ppc64le/kernel/fs/nfs/objlayout/objlayoutdriver.ko

-rwxr-xr-x 1 root root 4757 Oct 202015 usr/lib/

-rwsr-xr-x 1 root root 199296 Jun 15 usr/sbin/mount.nfs 15:07

Lrwxrwxrwx 1 root root 9 Jun 15 15:07 usr/sbin/mount.nfs4 - > mount.nfs

-rwxr-xr-x 1 root root 825 Oct 202015 usr/sbin/nfsroot

Drwxr-xr-x 4 root root 0 Jun 15 var/lib/nfs 15:07

Drwxr-xr-x 2 root root 0 Jun 15 var/lib/nfs/rpc_pipefs 15:07

Drwxr-xr-x 3 root root 0 Jun 15 var/lib/nfs/statd 15:07

Drwxr-xr-x 2 root root 0 Jun 15 var/lib/nfs/statd/sm 15:07

Tftpboot]# [root@localhost

step on