redhat:other-redhat:pxe-installation-server-redhat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
redhat:other-redhat:pxe-installation-server-redhat [2017/07/05 13:41] – [Step 4 - Mount ISO file and copy its contents to local ftp server] michaelredhat:other-redhat:pxe-installation-server-redhat [2017/09/26 21:19] (current) – [Configure PXE (Network Boot) installation Server on CentOS 7] michael
Line 3: Line 3:
  
 Once the PXE server is configured we can install hundreds of System at the same time over the network.As it works on Client-Server architecture, to get the OS installation on clients, boot the clients via PXE option. Once the PXE server is configured we can install hundreds of System at the same time over the network.As it works on Client-Server architecture, to get the OS installation on clients, boot the clients via PXE option.
 +
 +FIXME
 +
 +  * **https://www.linuxtechi.com/configure-pxe-installation-server-centos-7/**
 +  * https://dokuwiki.nausch.org/doku.php/centos:pxe_c7:pxe_1#clienttest
  
  
Line 12: Line 17:
 Below are details of my Setup: Below are details of my Setup:
  
-  * OS(Operating System)  = CentOS 7.x+  * OS (Operating System) = CentOS 7.x
   * IP  Address = 192.168.1.11   * IP  Address = 192.168.1.11
   * Hostname = pxe.example.com   * Hostname = pxe.example.com
Line 98: Line 103:
 # mkdir /var/lib/tftpboot/networkboot # mkdir /var/lib/tftpboot/networkboot
 </code> </code>
 +
 +
 +
  
 ==== Step 4 - Mount ISO file and copy its contents to local ftp server ==== ==== Step 4 - Mount ISO file and copy its contents to local ftp server ====
Line 127: Line 135:
 <WRAP center round box 100%> <WRAP center round box 100%>
 <code> <code>
-# openssl passwd -1 Pxe@123#+# openssl passwd -1 MY-STR0NGpW123!
 </code> </code>
-$1$e2wrcGGX$tZPQKPsXVhNmbiGg53MN41+$6$bDp6BGDIUOTz487Q$Kw3w/B7Pb/T8bj/qOI1yXeHU.zdNPZbMo2N8GSKzHUxxdcTskfPkFx6SMkA5pAj/kFmUPpIRvC8DhKBievJUM/
 </WRAP> </WRAP>
  
-System default kickstart file is placed under **/root** with name **anaconda-ks.cfg**. We will be creating a new kickstart under the folder ''/var/ftp/pub'' with the name **centos7.cfg**+System default kickstart file is placed under **/root** with name **anaconda-ks.cfg**. We will now creating our own kickstart-file under the folder ''/var/ftp/pub'' with the name **centos7.cfg**
  
-Copy the following content into the new kickstart file. Please modify the kickstart file as per your needs.+Copy the following content into the new kickstart file. Please modify the file as per your needs.
  
 +<code>
 +# vim /var/ftp/pub/centos7.cfg
 +</code>
  
 +<sxh bash; first-line: 1>
 +#version=CentOS 7
  
 +# Action - Install OS instead of upgrade
 +install
  
-https://www.linuxtechi.com/configure-pxe-installation-server-centos-7/ 
  
 +# Accept Eula
 +eula --agreed
 +
 +# Firewall configuration
 +firewall --disabled
 +
 +repo --name="EPEL" --baseurl=http://dl.fedoraproject.org/pub/epel/7/x86_64
 +
 +# Use FTP installation media
 +url --url="ftp://192.168.1.11/pub/"
 +
 +rootpw --iscrypted $6$bDp6BGDIUOTz487Q$Kw3w/B7Pb/T8bj/qOI1yXeHU.zdNPZbMo2N8GSKzHUxxdcTskfPkFx6SMkA5pAj/kFmUPpIRvC8DhKBievJUM/
 +
 +# System authorization information
 +auth useshadow passalgo=sha512
 +
 +# Use graphical install
 +graphical
 +firstboot disable
 +
 +# Keyboard layouts
 +keyboard --vckeymap=ch-de_sundeadkeys --xlayouts='ch (de_sundeadkeys)'
 +
 +# System language
 +lang en_US.UTF-8
 +
 +# SELinux State
 +selinux --enabled
 +
 +# System timezone
 +timezone Europe/Zurich --isUtc --ntpservers=0.centos.pool.ntp.org,1.centos.pool.ntp.org,2.centos.pool.ntp.org,3.centos.pool.ntp.org
 +
 +
 +# System bootloader configuration
 +bootloader --location=mbr --boot-drive=sda
 +
 +# Partition clearing information
 +clearpart --all --initlabel
 +
 +
 +# Disk partitioning information
 +part pv.01 --fstype="lvmpv" --ondisk=sda --size=1 --grow
 +part /boot --fstype="xfs" --ondisk=sda --size=1024
 +part /boot/efi --fstype="efi" --ondisk=sda --size=200 --fsoptions="umask=0077,shortname=winnt"
 +
 +volgroup root_vg01 pv.01
 +logvol swap  --fstype="swap" --size=1024 --name=swap --vgname=root_vg01
 +logvol /  --fstype="xfs" --name=root --vgname=root_vg01 --size=1 --grow
 +
 +
 +%packages
 +@base
 +@core
 +at
 +bash-completion
 +bind-utils
 +bzip2
 +curl
 +man-pages
 +nc
 +net-tools
 +ntp
 +ntpdate
 +unzip
 +vim-enhanced
 +wget
 +zip
 +
 +%end
 +
 +%addon com_redhat_kdump --disable --reserve-mb='auto'
 +
 +%end
 +</sxh>
 +
 +Now we create a default **PXE menu** file (''/var/lib/tftpboot/pxelinux.cfg/default''), by copy the following contents into the pxe default file.
 +
 +<code>
 +# vim /var/lib/tftpboot/pxelinux.cfg/default
 +</code>
 +
 +<sxh bash; first-line: 1>
 +default menu.c32
 +prompt 0
 +timeout 300
 +ONTIMEOUT 1
 +
 +menu title ########## blackGATE - PXE Boot Menu ##########
 +
 +label 1
 +menu label ^1) Install CentOS 7_x64
 +menu default
 +KERNEL /networkboot/vmlinuz
 +APPEND initrd=/networkboot/initrd.img inst.repo=ftp://192.168.1.11/pub ks=ftp://192.168.1.11/pub/centos7.cfg
 +
 +label 2
 +menu label ^2) Boot from local drive
 +localboot 0
 +</sxh>
 +
 +==== Step 6 - Start and enable xinetd, dhcp and vsftpd service ====
 +Use the beneath commands to start and enable xinetd, dhcp and vsftpd.
 +
 +<code>
 +# systemctl start xinetd
 +# systemctl enable xinetd
 +
 +# systemctl start dhcpd.service
 +# systemctl enable dhcpd.service
 +
 +# systemctl start vsftpd
 +# systemctl enable vsftpd
 +</code>
 +
 +In Case SELinux is enabled, then set the following selinux rule for ftp server.
 +
 +<code>
 +# setsebool -P allow_ftpd_full_access 1
 +</code>
 +
 +At the End, open all the needed ports in the OS firewall using following firewall-cmd commands
 +
 +<code>
 +# firewall-cmd --add-service=ftp --permanent
 +# firewall-cmd --add-service=dhcp --permanent
 +# firewall-cmd --add-port=69/tcp --permanent 
 +# firewall-cmd --add-port=69/udp --permanent 
 +# firewall-cmd --add-port=4011/udp --permanent
 +
 +# firewall-cmd --reload
 +</code>
 +
 +Up to this point, PXE server installation and configuration is completed now.
 +
 +==== Step 7 - Boot the clients with pxe boot option. ====
 +
 +FIXME
 +
 +BILDER VON VM BOOT EINFügen
 +
 +**Alte Links:**
 +https://www.linuxtechi.com/configure-pxe-installation-server-centos-7/
 https://askubuntu.com/questions/412574/pxe-boot-server-installation-steps-in-ubuntu-server-vm/414813 https://askubuntu.com/questions/412574/pxe-boot-server-installation-steps-in-ubuntu-server-vm/414813
 +
 +----
 +
 +**Neue Links, Besser erklährt:**
 +https://www.tecmint.com/multiple-centos-installations-using-kickstart/
 +https://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/
 +
 +https://fogproject.org/
 +
 +
 +----
 +
 +===== Fine-Tuneing des Kickstartfiles =====
 +  * https://dokuwiki.nausch.org/doku.php/centos:pxe_c7:pxe_2?s[]=yum
 +
 +
  • redhat/other-redhat/pxe-installation-server-redhat.1499254869.txt.gz
  • Last modified: 2017/07/05 13:41
  • by michael