Unattended automatic batch installation Linux system super detailed

Source: Internet
Author: User

Unattended Automatic installation Linux Systems

first, the technology,PXE is a client/server -based technology developed by Intel Corporation , and its core function is to have the client download the boot image from the remote server over the network for network boot.

,Kickstart installation is one of the main unattended automatic deployment installation operating systems, the core is the automatic answer file (Kickstart file ), This file includes the language, password, network parameters, etc. that we set up when we manually install the system, the file can be generated in three ways, we use one of them, graph generation.

principle, the client needs to set The BIOS starts over the network and the client initiates a broadcast packet to look for the DHCP server to obtain the network parameters and to obtain the TFTP location via DHCP , knowing that tftp The server location can download the boot file, and finally implement diskless boot, which is the network boot installation.

Experimental environment extension and complement map

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/82/B2/wKiom1degSjRBNZrAABxuymjOl8874.jpg "title=" 1.jpg " alt= "Wkiom1degsjrbnzraabxuymjol8874.jpg"/>

experimental Purpose,Clent2 machine through the network automatic installation system, we are experimenting with centos6.5

First, we configure the server side (pay attention to shutting down the firewall, turn off SELinux, how to shut down please Baidu check I do not explain)

installation DHCP

1, installing DHCP yum–y install DHCP

2, config file, this dhcpd.conf file is to be created manually

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/82/B2/wKiom1degRuASeF6AALfJeX_MUo482.jpg "title=" 2.jpg " alt= "Wkiom1degruasef6aalfjex_muo482.jpg"/>

3, start service SERVICEDHCPD start

4, boot chkconfig dhcpd on

Note: The red box is required according to your actual situation to write, this directory and files will be created later, do not understand here can look back.


installation TFTP

1, yum–y install Tftp-server

2, configuration file, this tftp file only need to change one place, the red box in the Yes change to No

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/82/B0/wKioL1degljijzlaAAIv_GCyiiY905.jpg "title=" 3.jpg " alt= "Wkiol1degljijzlaaaiv_gcyiiy905.jpg"/>

Sever_args explains the shared folder directory /var/lib/tftpboot

3, restart the service later, you need to configure some boot files

Copy the startup files required by the client to TFTP server, which is /var/lib/tftpboot this directory

1, yum–y install Syslinux

2, cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot

put the disc in Server CD -ROM, we copy the boot image file and the boot configuration file to TFTP shared directory

1, umount/dev/cdrom

2, Mount/dev/cdrom/media

3, cp/media/isolinux/vmlinuz/var/lib/tftpboot

4, cp/media/isolinux/initrd.img/var/lib/tftpbooot

5, mkdir/var/lib/tftpboot/pxelinux.cfg

6, Cp/media/isolinux/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default

7, chmod 644/var/lib/tftpboot/pxelinux.cfg/default

8, modify The default file as follows, in red box according to your experiment environment write

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/82/B2/wKiom1degVjQeBZ9AASRHLQGiZU221.jpg "title=" 4.jpg " alt= "Wkiom1degvjqebz9aasrhlqgizu221.jpg"/>

9, restart the TFTP service servicexinetd restart

Ten , boot up chkconfig xinetd on

Create Kickstart Auto Answer file

1, yum–y install System-config-kickstart

2, mkdir/kickstart/

3, run system-config-kickstart(here is the graphical generate answer file ks.cfg) as follows

After the command, the box pops up.

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/82/B0/wKioL1degg3T7uvVAAFRA09_ic4791.jpg "title=" 5.jpg " alt= "Wkiol1degg3t7uvvaafra09_ic4791.jpg"/>


The following is a step by step, the installation can follow this to you can also be based on your own situation to modify

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/82/B2/wKiom1degN_B883GAAFaR7IYLho890.jpg "style=" float: none; "title=" 6.jpg "alt=" Wkiom1degn_b883gaafar7iylho890.jpg "/>


650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M01/82/B0/wKioL1degfCwpcU2AADr-Rj0QUU752.jpg "style=" float: none; "title=" 7.jpg "alt=" Wkiol1degfcwpcu2aadr-rj0quu752.jpg "/>

Look at your own NFS server address, and directory, here don't understand it's okay, because we NFS not installed yet

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/82/B0/wKioL1degfGh3gC5AADt9zU6eYw888.jpg "style=" float: none; "title=" 8.jpg "alt=" Wkiol1degfgh3gc5aadt9zu6eyw888.jpg "/>

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/82/B2/wKiom1degOHx4QHNAAHIeOQfZwk465.jpg "style=" float: none; "title=" 9.jpg "alt=" Wkiom1degohx4qhnaahieoqfzwk465.jpg "/>

partition here, you choose to add a box that will appear, and then set / Boot swap and a root partition .

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/82/B0/wKioL1degfKAvWPCAAEU-euBXIM185.jpg "style=" float: none; "title=" 10.jpg "alt=" Wkiol1degfkavwpcaaeu-eubxim185.jpg "/>

network configuration, because we are DHCP , select Add Network device popup left box, device write eth0 Click OK

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/82/B2/wKiom1degOLBIHvwAAECx4Bgv2E931.jpg "style=" float: none; "title=" 11.jpg "alt=" Wkiom1degolbihvwaaecx4bgv2e931.jpg "/>

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/82/B0/wKioL1degfPjZnXSAADydXirC-4039.jpg "style=" float: none; "title=" 12.jpg "alt=" Wkiol1degfpjznxsaadydxirc-4039.jpg "/>

according to their own circumstances, the security increase version is SELinux

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/82/B2/wKiom1degOPhfoaOAACpjn9_s5A900.jpg "style=" float: none; "title=" 13.jpg "alt=" Wkiom1degophfoaoaacpjn9_s5a900.jpg "/>

We do not install the graphical environment, according to their own situation

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/82/B2/wKiom1degOTyK03eAAFxBB-2zYc068.jpg "style=" float: none; "title=" 14.jpg "alt=" Wkiom1degotyk03eaafxbb-2zyc068.jpg "/>

Package Here I chose a Chinese support, according to my own situation

The following pre-installation script and post-installation script we do not involve, so do not have to make any changes, click on the file save, save to the/kickstart/ directory

installation NFS Server

1,yum–y installnfs-utils

2, configuration files such as, according to their own circumstances set

650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/82/B0/wKioL1degfXTHsFiAAFDI7tajJw203.jpg "style=" float: none; "title=" 15.jpg "alt=" Wkiol1degfxthsfiaafdi7tajjw203.jpg "/>

3, start NFS service Servicenfs start

4, Boot chkconfig NFS on


we need to copy the files from the CD to the/media directory, we are copying the boot file, and now we are copying the entire disc image file, we can also mount

Mount/dev/cdrom/media

because before we Mount , here is actually no need to repeat, here is just a reminder, follow the steps to

Start the client, install the deployment system

all client hosts will have a BIOS, set the first boot entry to PXE network boot

Author I have encountered the problem

1,server side need to support graphical interface, if not support installation

Yum-y Groupinstall Desktop
Yum-y groupinstall "X window System"
Yum-y Groupinstall Chinese-support
vi/etc/sysconfig/i18n
change en_us to ZH_CN
Init 5

2,server side Execution umount or mount when the prompt :d eviceis busy processing method

umount/mnt/cdrom/-f// Forced unloading also not

Fuser-m/mnt/cdrom/

Kill-9 1338

If you have a better one, you can solve the problem on your own.

3, the client request DHCP when the IP address is not found , this is the DHCP configuration problem, you go to the server side to see If you restart the service on the above can not get up, You go to /ETC/INIT.D/DHCPD and look at it, change the DHCP behind the user group to Root, then restart

4, clients encounter pxe-e32 or tftp during network installation Opentimeout

This problem must be a server -side tftp configuration problem, so please be careful to compare

5, Use VMS Test this experiment, you will need to manually select the client reinitialization,

650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/82/B2/wKiom1degObS5JSGAAH0wpqp69w758.jpg "style=" float: none; "title=" 16.jpg "alt=" Wkiom1degobs5jsgaah0wpqp69w758.jpg "/>

You need to manually go to the client to select the Last button, follow-up will not need you manually.

that error is a disk initialization driver problem, VM Virtual SCSI disk, is the default system default support driver is not perfect, (normal server installation usually does not appear this error, the server will install the driver and then install the system) reinitialization should be good .

Online server does not appear this error, this is the problem of the virtual machine.

If there is a good environment (less people), work more (contact things more) Contact me oh, I'm thinking of changing environment work (Contact email [Email protected] )

------------------------------------------------ Good to end here, feel good to write a lot of comments thank you.

                                                                                                                                                                               &nbsP

----------by Joker



This article is from "Linux Operations Technology" blog, please be sure to keep this source http://jokerbj.blog.51cto.com/5167423/1788821

Unattended automatic batch installation Linux system super detailed

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.