当前位置:网站首页>PXE network installation
PXE network installation
2022-07-28 15:40:00 【A cat that can't modulate and demodulate】
Catalog
Install enable DHCP And configure the file
Boot file vmlinuz and initrd.img
Configure the Startup menu file
Environmental preparation
Install enable DHCP And configure the file
Check for installation dhcp, If it doesn't, it's directly yum install
yum install -y dhcp
Copy
cp -rfp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
Modify the configuration file
vim /etc/dhcp/dhcpd.conf
subnet 192.168.150.0 netmask 255.255.255.0 { # To configure IP And subnet mask
range 192.168.150.100 192.168.150.200; # Configure address pool
option domain-name-servers 114.114.114.114; # Configure domain name resolution
option routers 192.168.150.1; # configure gateway
next-server 192.168.150.1;
filename "pxelinux.0" # Configure boot file
}

Configure network card
After configuration, add a new network card

At this point we ifconfig Check the , You will find an additional network card

Then we make a copy ens33 To ens37 Inside , And enter ens37 Set in the network card

To configure TFTP
yum -y install tftp-server
yum -y install xinetd
vim /etc/xinetd.d/tftpservice tftp
{
socket_type = dgram
protocol = udp
wait = yes
//wait no Indicates that multiple clients can be connected together ,yes Indicates that the client can only be connected to one by one , Indicates whether to enable multithreading to work together , Otherwise you need to wait
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
// Appoint TFTP root directory ( The storage path of the boot file ) -c Allow upload
disable = no // modify disable no Open for indication TFTP service
per_source = 11
// By limiting the maximum number of connections to a host , So as to prevent a host from monopolizing a service , Every one here IP The number of connections to the address is 11 individual
cps = 100 2
// Indicates that the server can start up at most 100 A connection , If this number is reached, new services will stop starting 2 second . No requests will be accepted during this period
flags = IPv4
}systemctl enable tftp
systemctl start tftpBoot file vmlinuz and initrd.img
mount /dev/cdrom /mnt
cp /mnt/images/pxeboot/initrd.img vmlinuz /var/lib/tftpboot/ systemctl start xinetd
systemctl enable xinetd
systemctl start tftp
systemctl enable tftp Boot file pxelinux.0
pxelinux.0 It's a binary , The main function is equivalent to the guidance of a system installation step , Guide the client how to install the system
yum provides */pxelinux.0 Find its location and copy it to /var/lib/tftpbooot/
rpm -ql syslinux | grep pxelinux.0
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ Configure the Startup menu file
Because the pxelinux.0 This document decides to /var/lib/tftpboot/pxelinux.cfg/default file , So all we have to do is /var/lib/tftpboot/ Manually create
mkdir /var/lib/tftpboot/pxelinux.cfg
vim /var/lib/tftpboot/pxelinux.cfg/default default auto // Specify the default entry name , Corresponding to the following label auto
prompt 1
// Set whether to wait for the user to choose ,1 Wait for user control ,0 Indicates that you do not wait for user control , During installation, there will be boot: If you press enter
Express choice auto Pattern
label auto // Default graphics installation
kernel vmlinuz
append initrd=initrd.img method=ftp://192.168.150.30/centos7
//method You must specify a network path
label linux text // Text installation mode , appear boot: Time input linux text
kernel vmlinuz
append text initrd=initrd.img method=ftp://192.168.150.30/centos7
label linux rescue // Rescue mode , appear boot: Time input linux rescue
kernel vmlinuz
append rescue initrd=initrd.img method=ftp://192.168.150.30/centos7 kickstart
install system-config-kickstart
yum install -y system-config-kickstart
open Kickstart Configurator window








Save to /var/ftp/ Next , file name ks.cfg
It can be done to ks To optimize
vi /var/lib/tftpboot/pxelinux.cfg/default
default auto
prompt 1
label auto
kernel vmlinuz
append initrd=initrd.img method=ftp://192.168.150.30/centos7 ks=ftp://192.168.100.100/ks.cfg
label linux text
kernel vmlinuz
append text initrd=initrd.img method=ftp://192.168.150.30/centos7 ks=ftp://192.168.100.100/ks.cfg
label linux rescue
kernel vmlinuz
append rescue initrd=initrd.img method=ftp://192.168.150.30/centos7 ks=ftp://192.168.100.100/ks.cfg边栏推荐
猜你喜欢
随机推荐
flowable工作流所有业务概念
Opencv - closely combine multiple irregular small graphs into large graphs
9. Related data accumulation task definition
EasyExcel复杂表头导出(一对多)
4、主程序和累积中断处理例程实现代码
给你一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点。
MIT pointed out that the public pre training model should not be used indiscriminately
ECCV 2022 | ssp: a new idea of small sample tasks with self-supporting matching
根据输入target,返回数组的两个下标。
Leetcode - random set, longest multiclass subsequence
Canoe tutorial
融云实时社区解决方案
生命的感悟
关闭独立窗口对其他窗口同时关闭的问题
Pytorch - sequential and modulelist
CANoe使用教程
4.8 hd-gr GNSS navigation software source code
MIT指出公开预训练模型不能乱用
QT refresh UI interface problem
Explain the difference set, intersection set and union set of complex type set in detail.Net








