CENTOS7 Network installation process

Source: Internet
Author: User

I have always wanted to install my favorite Linux system through the network, always confused, yesterday spent a whole day to ponder the research, Kung Fu is not a conscientious, done! Highing (sister's, afraid to use the wrong word to check the next, Sister's dictionary also deceive) I will highing ^-^

Afraid later forget, special remember to do this, nonsense less say, start it!

First, the principle: first boot from the network boot, it needs to find a DHCP server from the network, the DHCP server will assign it IP address, gateway, DNS, and TFTP service, and then in the TFTP server to find the boot file and boot configuration file, The boot file is the so-called bootloader, which loads the Linux kernel (vmlinuz) and the virtual file system (INITRD.IMG) on the TFTP server according to the bootloader configuration file, and the configuration parameters of the kernel In the bootloader configuration file has been specified, here I do not understand why the kernel configuration parameters are provided by the bootloader configuration file, the original kernel is loaded by the bootloader, so the parameters are provided to the kernel, so that a look is not difficult to understand. Kernel parameters, will contain a system installation source, I choose the NFS installation source, the kernel load, will load the installation source files and run, (in fact, the files on the installation source is a Linux installation CD file) This is actually equivalent to the system to run a system installation CD-ROM, Below you will be able to install your system on your machine.

All right, tell me exactly what to do.

First, install the configuration DHCP server it can provide IP, gateway, DNS, TFTP server address and bootloader name on the TFTP server.

1. Install the DHCP server sudo apt-get install isc-dhcp-server-y

2, configure the DHCP service: The configuration file is/etc/dhcp/dhcpd.conf, the content is as follows

option Space Pxelinux;
Option Pxelinux.magic Code 208 = string;
Option Pxelinux.configfile Code 209 = text;
Option Pxelinux.pathprefix code = text;
Option Pxelinux.reboottime Code 211 = unsigned integer 32;
Option Architecture-type code = unsigned integer 16;
Option Domain-name-servers 202.100.64.68; \\dns
Subnet 192.168.1.0 netmask 255.255.255.0 {
Option routers 192.168.1.1; \ \ Gateway
Range 192.168.1.100 192.168.1.110; \ \ Assign Address pool

Class "Pxeclients" {
Match if substring (option vendor-class-identifier, 0, 9) = "Pxeclient";
Next-server 192.168.1.53; \\nfs server Address

FileName "pxelinux/pxelinux.0"; bootloader file path on \\NFS server

}
}
Note: \ \ (note) is after I add to, the real configuration file does not have the content behind \ \ (afraid some friends do not understand \ \ is the meaning of the comments, wordy), the following configuration files are such comments.


Second, the installation configuration TFTP server It can provide bootloader files and configuration files of the Linux kernel, Linux virtual file system files.

1. Install the TFTP server sudo apt-get install tftpd tftp-y
In fact, I've loaded the TFTP client in this step.

2. Configuring the TFTP server

Configuration file is/etc/xinetd.d/tftp

The contents are as follows:

Service TFTP
{
protocol = UDP
Port = 69
Socket_type = Dgram
Wait = yes
user = Nobody
Server =/USR/SBIN/IN.TFTPD
Server_args =/tftpboot\\tftp root directory
Disable = Whether the TFTP service is turned off in the No \\xinet service no is open
}

3. Place the appropriate files in the/tftpboot directory

Files and directories in the 3.1/tftpboot/pxelinux directory

Initrd.img pxelinux.0 pxelinux.cfg (directory here) Vesamenu.c32 Vmlinuz

Each document is described separately

Initrd.img (Linux virtual file system files, Linux installation CD Isolinux directory)

pxelinux.0 (bootloader file, downloaded on the Internet, not found everywhere, cloud disk inside search)

VESAMENU.C32 (bootloader called a file, I was installing the syslinux, and then (dpkg-l syslinux| grep vesamenu.c32) searched for the installation location of this file, copy it over. )

Vmlinuz (Linux kernel file, Linux installation CD Isolinux directory)

3.2 Adding a pxelinux.0 configuration file

mkdir pxelinux.cfg

CD pxelinux.cfg

sudo vim default

The default file contents are as follows:

Default Vesamenu.c32
Prompt 1
Timeout 600

Label Linux
Menu Label Install System
Menu default
Kernel Vmlinuz
Append initrd=initrd.img ip=dhcp inst.repo=nfs:192.168.1.53:/nfs \ \ Specifies the IP address of the NFS server

Save exit

Third, configure NFS server to provide NFS services, share an installation CD

1. Install the NFS service program and client program sudo apt-get install Nfs-kernel-server nfs-common-y

2. Configure the NFS service configuration file to/etc/exports

The contents are as follows:

/nfs * (Rw,sync,no_root_squash)

3. Create the/nfs directory and hang it in the Centos.iso file

sudo CD/;mkdir NFS

sudo mount Centos.iso/nfs

Iv. launch of three services

sudo service isc-dhcp-server restart;sudo service nfs-kernel-server restart;sudo service xinetd restart

^-^ the merit, go test it!


This article is from the "Houdesaifort" blog, make sure to keep this source http://jerrywilson.blog.51cto.com/8326089/1631638

CENTOS7 Network installation process

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.