Use Kickstart to implement unattended RHEL6.0 system installation

Source: Internet
Author: User
The so-called unattended installation does not require the Administrator to easily Insert the system disc or start the USB flash drive, but to install it from the network. PXE is a network boot technology developed by Intel. It works in Client/Server mode and allows clients to download boot images from remote servers over the network, load the installation file or the entire operating system. In addition, a tool is required for automatic installation, that is, kickstart. Conclusion: The following conditions are required for unattended installation. The client Nic supports PXE.

The so-called unattended installation does not require the Administrator to easily Insert the system disc or start the USB flash drive, but to install it from the network. PXE is a network boot technology developed by Intel. It works in Client/Server mode and allows clients to download boot images from remote servers over the network, load the installation file or the entire operating system. In addition, a tool is required for automatic installation, that is, kickstart.

Conclusion: The following conditions are required for unattended installation.

The client Nic supports the PXE protocol and the motherboard supports network boot. (currently, all servers support this protocol.

There is a DHCP server in the network to automatically assign an address to the client and specify the location of the boot file.

The server needs to configure the TFTP service to provide download of image files.

Build a PXE Remote Installation server

1. Prepare the RHEL 6 installation Source

First configure the yum source, and then install the ftp service, because we need to use the ftp service to publish the system.


[Root @ localhost/] # yum-y install vsftpd

[Root @ localhost/] # cp-rf/media/*/var/ftp/rhel6

[Root @ localhost/] # service vsftpd start

2. Install and enable the TFTP service

The TFTP service is provided by the tftp-server package and is managed by the xinetd super service by default. Therefore, the configuration file is located in/etc/xinetd. d/tftp. modify the configuration as follows: and start the xinetd service.

[Root @ localhost/] # yum-y install tftp-server

[Root @ localhost/] # vim/etc/xinetd. d/tftp

[Root @ localhost/] # service xinetd start

3. Prepare the Linux kernel and initialize the image file.

Linux Kernel for PXE network installation. The initialization image file can be obtained from the RHEL6 system CD, vmlinuz and initrd. img, respectively, in the images/pxeboot folder. Find the two files and copy them to the root directory of the tftp service.

[Root @ localhost/] # cd/media/images/pxeboot/

[Root @ localhost pxeboot] # cp vmlinuz initrd. img/var/lib/tftpboot/

4. Prepare the PXE boot program and start the menu file.

The boot program for PXE network installation is pxelinux.0, which is provided by the software package syslinux. Install the software package syslinux and copy the file pxelinux.0 to the root directory of the tftp service.

[Root @ localhost/] # yum-y install syslinux

[Root @ localhost/] # cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot

The boot menu is used to guide the client's boot process, including calling the kernel and loading the initialization image. The default boot menu file is default and should be placed in the pxelinux. cfg subdirectory of the tftp root directory. For typical Boot menu configuration, refer to the following operations for manual creation.

[Root @ localhost/] # mkdir/var/lib/tftpboot/pxelinux. cfg

[Root @ localhost/] # vim/var/lib/tftpboot/pxelinux. cfg/default

Default auto // specify the default entry name

Prompt 1 // 1 indicates waiting for user control, and 0 indicates not waiting for the user.

Label auto

Kernel vmlinuz

Append initrd = initrd. img devfs = nomount ramdisk_size = 8192

Label linux text

Kernel vmlinuz

Append text initrd = initrd. img devfs = nomount ramdisk_size = 8192

Label linux rescue

Kernel vmlinuz

Append rescue initrd = initrd. img devfs = nomount ramdisk_size = 8192

The preceding configuration records define three boot entries: Graphical installation (default), text installation, and rescue mode. Among them, prompt is used to set whether to wait for the user to select, label is used to define and separate startup items, and kernel and append are used to define boot parameters.

The number and content of the pilot portal can be customized as needed. For example, to implement unattended installation, you only need one portal, but you need to specify the path of the kickstart configuration file.

 

[Root @ localhost/] # vim/var/lib/tftpboot/pxelinux. cfg/default

Default auto

Prompt 0

Label auto

Kernel vmlinuz

Append ks = ftp: // 192.168.1.1/rhel6/ks. cfg initrd = initrd. img devfs = nomount ramdisk_size = 8192

5. Install and enable the DHCP service

The PXE client is usually a bare metal that has not yet installed the system, so in order to get in touch with the server and download the relevant boot file correctly, you need to configure the DHCP service in advance to automatically allocate the address and inform the guide file location.

[Root @ localhost/] # yum-y install dhcp

[Root @ localhost/] # vim/etc/dhcp. conf

Ddns-update-style none;

Default-lease-time 21600;

Max-lease-time 43200;

Option domain-name "benet.com ";

Option domain-name-service 202.106.0.20 202.106.148.1;

Subnet 192.168.1.0 netmask 255.255.255.0 {

Option routers 192.168.1.1;

Option subnet-mask limit 255.0;

Range 192.168.1.100 192.168.1.200;

Next-server 192.168.1.1; // specify the address of the TFTP server

Filename "pxelinux.0"; // specify the file name of the PXE boot program

}

[Root @ localhost/] # service dhcpd start

Related reading:

Kickstart Unattended Installation-make a CD file http://www.linuxidc.com/Linux/2013-08/88575.htm

Operating System http://www.linuxidc.com/Linux/2013-06/85480.htm with Kickstart + Apache + Dhcp + Pxe Unattended Installation

Kickstart unattended installation CentOS (minimal installation) http://www.linuxidc.com/Linux/2013-04/83587.htm

Configure Kickstart unattended installation CentOS 5.9 http://www.linuxidc.com/Linux/2013-03/80334.htm

RHEL6.3 + PXE + DHCP + Apache + NFS + Kickstart unattended installation of RHEL6.3 http://www.linuxidc.com/Linux/2013-02/79863.htm

 

Next please continue to read the wonderful 2nd page content: http://www.linuxidc.com/Linux/2013-09/89765p2.htm

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.