pxe_멀티부팅-수정중

firewalld, selinux disable

yum -y install *dhcp* *tftp* *httpd* *syslinux*

mkdir /var/www/html/rhel8.4
mkdir /var/www/html/rhel7.8
mkdir /var/www/html/centos8stream

cp -avr /run/media/root/RHEL-8-4-0-BaseOS-x86_64/* /var/www/html/rhel8.4/
cp -avr /run/media/root/RHEL-7.8\ Server.x86_64/* /var/www/html/rhel7.8/
cp -avr /run/media/root/CentOS-Stream-8-x86_64-dvd/* /var/www/html/centos8stream/

cp /run/media/root/RHEL-8-4-0-BaseOS-x86_64/.discinfo /var/www/html/rhel8.4/
cp /run/media/root/RHEL-8-4-0-BaseOS-x86_64/.treeinfo /var/www/html/rhel8.4/
cp /run/media/root/RHEL-7.8\ Server.x86_64/.discinfo /var/www/html/rhel7.8/
cp /run/media/root/RHEL-7.8\ Server.x86_64/.treeinfo /var/www/html/rhel7.8/
cp /run/media/root/CentOS-Stream-8-x86_64-dvd/.discinfo /var/www/html/centos8stream/
cp /run/media/root/CentOS-Stream-8-x86_64-dvd/.treeinfo /var/www/html/centos8stream/

chmod -R 755 /var/www/html/*

cp -a /usr/share/syslinux/* /var/lib/tftpboot/

mkdir /var/lib/tftpboot/rhel8.4
mkdir /var/lib/tftpboot/rhel7.8
mkdir /var/lib/tftpboot/centos8stream

cp /run/media/root/RHEL-8-4-0-BaseOS-x86_64/images/pxeboot/initrd.img /var/lib/tftpboot/rhel8.4/
cp /run/media/root/RHEL-8-4-0-BaseOS-x86_64/images/pxeboot/vmlinuz /var/lib/tftpboot/rhel8.4/
cp /run/media/root/RHEL-7.8\ Server.x86_64/images/pxeboot/vmlinuz /var/lib/tftpboot/rhel7.8/
cp /run/media/root/RHEL-7.8\ Server.x86_64/images/pxeboot/initrd.img /var/lib/tftpboot/rhel7.8/
cp /run/media/root/CentOS-Stream-8-x86_64-dvd/images/pxeboot/initrd.img /var/lib/tftpboot/centos8stream/
cp /run/media/root/CentOS-Stream-8-x86_64-dvd/images/pxeboot/vmlinuz /var/lib/tftpboot/centos8stream/

mkdir /var/lib/tftpboot/pxelinux.cfg

vim /var/lib/tftpboot/pxelinux.cfg/default


default menu.c32
prompt 0
timeout 100
ONTIMEOUT local

menu title ############ PXE BOOT MENU ###############

label 1
menu label ^1) Install RHEL 8.4
kernel rhel8.4/vmlinuz
append initrd=rhel8/initrd.img repo=http://192.168.100.10/rhel8.4

label 2
menu label ^2) Install RHEL 7.8
kernel rhel7.8/vmlinuz
append initrd=rhel7.8/initrd.img repo=http://192.168.100.10/rhel7.8

label 3
menu label ^3) Install CentOS 8 Stream
kernel centos8stream/vmlinuz
append initrd=centos8stream/initrd.img repo=http://192.168.100.10/centos8stream

label 4
menu label ^4) Install RHEL 8.4 Kickstart
kernel rhel8.4/vmlinuz
append initrd=rhel8.4/initrd.img inst.ks=http://192.168.100.10/rhel8.4/anaconda-ks.cfg

label 5
menu label ^5) Install RHEL 7.8 Kickstart
kernel rhel7.8/vmlinuz
append initrd=rhel7.8/initrd.img inst.ks=http://192.168.100.10/rhel7.8/anaconda-ks.cfg

label 6
menu label ^6) Install CentOS 8 Stream Kickstart
kernel centos8stream/vmlinuz
append initrd=centos8stream/initrd.img inst.ks=http://192.168.100.10/centos8stream/anaconda-ks.cfg

label 7
menu label ^7) Boot from local drive


vim /etc/dhcp/dhcpd.conf


# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

default-lease-time 600;
max-lease-time 7200;

allow booting;
allow bootp;
authoritative;

subnet 192.168.21.0 netmask 255.255.255.0 {

      range 192.168.21.100 192.168.21.200;
      option routers 192.168.21.2;
      default-lease-time 21600;
      max-lease-time 43200;
      filename "pxelinux.0";
      next-server 192.168.21.10;

}


vim /var/www/html/rhel8.4/anaconda-ks.cfg


#version=DEVEL
# System authorization information
auth –enableshadow –passalgo=sha512
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot –enable
#ignoredisk –only-use=sda
# Keyboard layouts
keyboard –vckeymap=us –xlayouts='us'
# System language
lang en_US.UTF-8 –addsupport=ko_KR.UTF-8

# Network information
network –bootproto=dhcp –ipv6=auto –activate
network –hostname=pxe

# Use network installation
url –url=“http://192.168.21.10/rhel8.4
# Root password
rootpw –iscrypted $6$CtanAVNgDJImvZi3$Xez6UWf49xVJNZt5qQcadcoYRgq6pfWSx0JvDLDRVzC27ZE.nmi0AfsgkmlSmk/kUyaMo2UqkWYKkbG3pMtUW0

# System services
services –enabled=“chronyd”
# System timezone
timezone Asia/Seoul –isUtc
# X Window System configuration information
xconfig –startxonboot
# System bootloader configuration
bootloader –append=“ crashkernel=auto” –location=mbr
# Partition clearing information
clearpart –none –initlabel
# Disk partitioning information
part /boot –fstype=“xfs” –size=1024
part pv.145 –fstype=“lvmpv” –grow
volgroup rhel –pesize=4096 pv.145
logvol / –fstype=“xfs” –size=102400 –name=root –vgname=rhel
logvol swap –fstype=“swap” –size=16380 –name=swap –vgname=rhel

selinux –disabled
firewall –disabled

%packages
@^graphical-server-environment
@base
@core

chrony
kexec-tools

%end
#최소설치패키지###################
%packages
@^minimal rhel7
@^minimal-environment rhel8
@core
chrony
kexec-tools
%end
################################

%addon com_redhat_kdump –enable –reserve-mb='auto'

%end

%anaconda
pwpolicy root –minlen=6 –minquality=1 –notstrict –nochanges –notempty
pwpolicy user –minlen=6 –minquality=1 –notstrict –nochanges –emptyok
pwpolicy luks –minlen=6 –minquality=1 –notstrict –nochanges –notempty
%end

reboot


vim /var/www/html/rhel7.8/anaconda-ks.cfg
vim /var/www/html/centos8stream/anaconda-ks.cfg

동일 내용

chmod 755 /var/www/html/rhel8.4/anaconda-ks.cfg
chmod 755 /var/www/html/rhel7.8/anaconda-ks.cfg
chmod 755 /var/www/html/centos8stream/anaconda-ks.cfg

systemctl start dhcpd
systemctl start httpd
systemctl start tftp
systemctl enable dhcpd
systemctl enable httpd
systemctl enable tftp

로그인하면 댓글을 남길 수 있습니다.
  • pxe_멀티부팅-수정중.txt
  • 마지막으로 수정됨: 2022/03/16 01:00
  • 저자 fatp11th