电脑技术学习

PXE 网络化安装linux系统实现原理介绍

dn001

2.tftp服务器配置

  [root@localhost ~]# cat /etc/xinetd.d/tftp

  # default: off

  # de.ion: The tftp server serves files using the trivial file transfer

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

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

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

  service tftp

  {

  socket_type = dgram

  protocol = udp

  wait = yes

  user = root

  server = /usr/sbin/in.tftpd

  server_args = -s /tftpboot

  disable = no

  per_source = 11

  cps = 100 2

  flags = IPv4

  }

3.准备相关文件

  安装目录树,ks.cfg,initrd.img,pxelinux.0,pxelinux.cfg,vmlinuz

  A--把安装目录树拷贝到一个共享目录中,例如,/var/ftp/pub下面,用ftp共享

  B--ks.cfg也拷贝到 /var/ftp/pub下面

  C--

  cp /usr/lib/syslinux/pxelinux.0 /tftpboot

  cp /media/cdrom/images/pxeboot/{initrd.img,vmlinuz} /tftpboot

  mkdir /tftpboot/pxelinux.cfg

  touch /tftpboot/pxelinux.cfg/default

  default文件内容:(ftp地址自己改)

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

  default linux

  prompt 1

  timeout 60

  display boot.msg

  label linux

  kernel vmlinuz

  append initrd=initrd.img text ks=ftp://192.168.1.112/pub/ks.cfg

标签: linux