PXE network-based linux installation --- principles + steps

Source: Internet
Author: User
Article title: PXE network-based linux installation-principles + steps. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

There are a lot of online configuration methods. For more details, you can find them on the internet. I won't write them very detailed here, but I won't talk about step by step, the most important thing is to know the implementation principle! I believe that reading the principles below will help you read the relevant documents, because many people do not know what they are doing when they are facing the document!

Principle of process-based implementation:

Allows you to start a PXE-enabled computer (enable the PXE function of the network adapter in advance, and enable network boot) ---> DHCP provides an IP address for the computer, specify the next-hop tftp file server ---> go to the tftp server (under the/tftpboot folder) to download a file named pxelinux.0 and get pxelinux. the default configuration file in the cfg folder ---> loads the kernel based on the configuration file, and specifies ks in the configuration file. cfg file address!

Basic steps:

1. DHCP server configuration

 

[Root @ localhost ~] # Cat/etc/dhcpd. conf
Ddns-update-style interim;
Ignore client-updates;
Allow booting;
Allow bootp;
Subnet 192.168.1.0 netmask 255.255.255.0 {# --- default gateway
Option routers 192.168.1.1;
Option subnet-mask limit 255.0; # option nis-domain "domain.org ";
# Option domain-name "domain.org ";
Option domain-name-servers 192.168.1.1; option time-offset-18000; # Eastern Standard Time
# Option ntp-servers 192.168.1.1;
# Option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- You understand Netbios very well
# Option netbios-node-type 2; range dynamic-bootp 192.168.1.2 192.168.1.10;
Default-lease-time 21600;
Max-lease-time 43200;
Next-server 192.168.1.112;
Filename "pxelinux.0 ";
# We want the nameserver to appear at a fixed address
# Host ns {
# Next-server marvin.redhat.com;
# Hardware ethernet 12: 34: 56: 78: AB: CD;
# Fixed-address 207.175.42.254;
#}
}

2. tftp server configuration

[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
CPIs = 100 2
Flags = IPv4
}

3. prepare relevant files

Install directory tree, ks. cfg, initrd. img, pxelinux.0, pxelinux. cfg, vmlinuzA -- Copy the installation directory tree to a shared directory. for example, use ftp to share B -- ks under/var/ftp/pub. cfg is also copied to C -- cp/usr/lib/syslinux/pxelinux.0/tftpbootcp/media/cdrom/images/pxeboot/{initrd under/var/ftp/pub. img, vmlinuz}/tftpbootmkdir/tftpboot/pxelinux. touch/tftpboot/pxelinux. cfg/defaultdefault file content: (change the ftp address by yourself) [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

 

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.