PXE and kiskstart for Automatic Installation

Source: Internet
Author: User

PXE(Preboot execute environment, pre-start execution environment) is a technology developed by Intel. It works in the client/server network mode and supports workstation downloading images from remote servers over the network, it also allows you to start an operating system (diskless workstation) over a network.


PXE operating conditions:

  • Client

    • Hardware support: the network adapter or motherboard can communicate with pxeserver only when it is integrated with pxeclient.

  • Server

    • DHCP service: Since network communication IP addresses are essential

    • TFTP (Trivial FTP) or MFTP (Multicast TFTP) service. Simple FTP service provides pxelinux.0, vmlinux, and initrd files required for PXE startup.

    • DNS service, which is sometimes used. Optional.

    • FTP/HTTP/nfs output system installation tree, software Repository


Operation demonstration

# Step 1: Install DHCP [[email protected] ~] # Yum install-y DHCP # copy a configuration file example to save trouble before modifying it [[email protected] ~] # Cp/usr/share/doc/dhcp-4.1.1/DHCPD. conf. Sample/etc/DHCP/DHCPD. conf CP: overwrite '/etc/DHCP/DHCPD. conf '? Y [[email protected] ~] # Vim/etc/DHCP/DHCPD. conf option domain-name "bob.org"; # domain name suffix option domain-name-servers 172.16.100.2; # default DNS-lease-time 43200; # IP address lease max-lease-time 86400; # maximum lease time log-facility local7; # log file # a subnet defines an IP address pool subnet 172.16.100.0 netmask 255.255.0.0 {range 172.16.100.100 172.16.100.200; Option routers 172.16.100.2; next-server 172.16.100.11; # specify the TFTP server address filename = "pxelinux.0"; # specify P The xlinux.0 file address must be enclosed in double quotation marks. The address is relative to the root directory of the TFTP service.} # Install TFTP and syslinux, when syslinux is installed, syslinux-nonlinux and mtools #(pxelinux.0 is provided by syslinux-nonlinux) [[email protected] ~] # Yum install TFTP-server syslinux-y [[email protected] ~] # Rpm-ql tftp-server/etc/xinetd. d/TFTP # TFTP service script, which is a service managed by xinet/usr/sbin/in. tftpd/usr/share/doc/tftp-server-0.49/usr/share/doc/tftp-server-0.49/changes/usr/share/doc/tftp-server-0.49/readme/usr/share/doc/tftp-server-0.49/readme. security/usr/share/doc/tftp-server-0.49/readme. security. tftpboot/usr/share/man/man8/in.tftpd.8.gz/usr/share/man/man8/tftpd.8.gz/var/lib/tftpboot # the root directory of the TFTP service # You Can See That pxlinux.0 is composed [Email protected] ~] provided by syslinux-nonlinux # Rpm-QL syslinux-nonlinux | grep pxelinux.0/usr/share/syslinux/gpxelinux.0/usr/share/syslinux/pxelinux.0 # copy pxelinux.0 to the TFTP service directory, because the DHCP configuration specifies the root directory [[email protected] ~] # Cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/# For convenience, directly mount the disc to the FTP directory [[email protected] ~] # Mount-r/dev/CDROM/var/FTP/pub/centos/# provide vmlinuz and initrd. IMG [[email protected] ~] For TFTP # Cp/var/FTP/pub/centos/images/pxeboot/{vmlinuz, initrd. IMG}/var/lib/tftpboot/[[email protected] ~] # Cd/var/lib/tftpboot/[[email protected] tftpboot] # lsinitrd. IMG pxelinux.0 vmlinuz # The default menu configuration file of TFTP is placed in pxelinux. # Under CFG/default is equivalent to isolinux/isolinux under the CD. cfg. copy the file and modify it. [[email protected] tftpboot] # mkdir pxelinux. CFG # For the installation program and boot.msg in the tftpdirectory, the background image splash.jpg # vesamenu. c32 is a menu program, which can be copied from the disc. The syslinx-nonlinux package is also provided, under/usr/share/syslinux/[[email protected] tftpboot] # cp/var/FTP/pub/centos/isolinux/{boo T.msg,splash.jpg, vesamenu. c32 }. /[[email protected] tftpboot] # lsboot. MSG initrd. IMG isolinux. CFG pxelinux.0 splash.jpg vesamenu. c32 vmlinuz [[email protected] tftpboot] # cp/var/FTP/pub/centos/isolinux. CFG pxelinux. CFG/default # modify the default file [[email protected] tftpboot] # Vim pxelinux. CFG/default vesamenu. c32 # prompt 1 timeout 600 display boot. msgmenu background splash.jpg menu title Welcome to centos 6.4 via PXE! Menu color border 0 # ffffffff #00000000 menu color sel 7 # ffffffff # ff000000menu Color title 0 # ffffffff #00000000 menu color tabmsg 0 # ffffffff #00000000 menu color unsel 0 # ffffffff #00000000 menu color hotsel 0 # ff000000 # ffffffffmenu color hotkey 7 # ffffffff # ff000000menu color scrollbar 0 # ffffffff #00000000 label Linux menu label ^ install or upgrade an existing system menu default kernel vmlinuz Ppend initrd = initrd. IMG Ks = ftp: // 172.16.100.11/pub/KS. cfglabel rescue menu lalbe ^ rescue kernel vmlinuz append initrd = initrd. IMG rescue # TFTP is a xinet-managed service that works on port 69/udp to start TFTP and DHCP services [[email protected] ~] # Chkconfig TFTP on [[email protected] ~] # Service xinetd restartstopping xinetd: [OK] Starting xinetd: [OK] [[email protected] ~] # Service DHCPD startstarting DHCPD: [OK] [[email protected] ~] # Netstat-UNLP | grep 67udp 0 0 0.0.0.0: 67 0.0.0.0: * 15641/DHCPD [[email protected] ~] # Netstat-UNLP | grep 69udp 0 0.0.0.0: 69 0.0.0.0: * 16097/xinetd

# Check whether TFTP works normally. TFTP does not have the LS command [[email protected] ~] # TFTP 172.16.100.11tftp> helptftp-HPA 0.49 commands may be abbreviated. commands are: connect to remote tftpmode set file transfer modeput send fileget receive filequit exit tftpverbose toggle verbose modetrace toggle packet tracingliteral toggle literal mode, norige ': 'In file namestatus show current statusbinary set mode to octetascii set mode to netasciirexmt set per-packet transmission Timeouttimeout set total Retransmission timeout? Print help informationhelp print help information # enable verbose redundancy mode to show more details. TFTP> verboseverbose mode on. # If the get file succeeds, TFTP works normally. TFTP> Get pxelinux?getting from 172.16.100.11: pxelinux.0 to pxelinux.0 [netascii] received 26981 bytes in 0.0 seconds [72143767 bit/s]


Installation Process:

This interface will pop up. If you want to see it, stop TFTP and you will see it.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/BC/wKiom1P_JZOAsGUmAAD2Z4n_LMo664.jpg "style =" float: none; "Title =" pxe_boot.jpg "alt =" wkiom1p_jzoasgumaad2z4n_lmo664.jpg "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/47/BE/wKioL1P_Jqui5-MAAAER_uLuSJU951.jpg "style =" float: none; "Title =" pxe_boot_1.jpg "alt =" wKioL1P_Jqui5-MAAAER_uLuSJU951.jpg "/>

Installed successfully

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/BC/wKiom1P_KFPBjv5oAAEDxC0oKu4443.jpg "Title =" pxe_install_complete.jpg "alt =" wkiom1p_kfpbjv5oaaedxc0oku4443.jpg "/>

This article from "do not understand Chinese medicine it is not good Chinese medicine" blog, please be sure to keep this source http://zhishen.blog.51cto.com/1612050/1546299

PXE and kiskstart for Automatic Installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.