Professional Documents
Culture Documents
System Specification:
We use the same CentOS 7 server that we have configured as PXE
Boot Server in our previous article. The specifications have been re-
mentioned below for convenience of the readers.
CPU: 2 Core (2.4 Mhz)
Memory: 2 GB
Storage: 50 GB
Hostname: pxe-server.itlab.com
IP Address: 192.168.116.41/24
Our PXELINUX menu does not work for UEFI systems, therefore we
have to create another menu for the UEFI clients.
The menu filename is grub.cfg and it is located
at /var/lib/tftpboot . Therefore, we will define RHEL 7.5
installation option in this file as follows:
#cat >> /var/lib/tftpboot/grub.cfg << EOF
> set timeout=60
>
> menuentry 'Install RHEL 7.5' {
> linuxefi /networkboot/rhel7/vmlinuz
inst.repo=ftp://192.168.116.41/pub/rhel7/
> initrdefi /networkboot/rhel7/initrd.img
> }
> EOF
System Specification:
We use the same Linux server that we have configured as PXE Boot Server in our
previous article. These specifications have been re-mentioned below for convenience
of the readers.
CPU: 2 Core (2.4 Mhz)
Memory: 2 GB
Storage: 50 GB
Operating System: RHEL 7.5
Hostname: pxe-server.itlab.com
IP Address: 192.168.116.41/24
Attach RHEL 6 ISO/DVD and mount it at /mnt/iso (you can use any mountpoint,
according to your choice).
# mount -t iso9660 /dev/cdrom /mnt/iso
mount: /dev/sr0 is write-protected, mounting read-only
Now, connect a BIOS based PXE client to network and boot it. It will display the
following PXE boot menu.
Similarly, connect a UEFI based PXE client to network and boot it. It will display the
following PXE boot menu.
We have successfully added the RHEL 6 installation option to our PXE boot server.
You can add other versions of RHEL or CentOS in similar manner.
System Specification:
We use the same Linux server that we have configured as PXE Boot Server in our
previous article. These specifications have been re-mentioned below for convenience
of the readers.
Memory: 2 GB
Storage: 50 GB
Hostname: pxe-server.itlab.com
IP Address: 192.168.116.41/24
Furthermore, we need a client system to create Windows PE iso file. Here, we are
using a MS Windows 8.1 machine for this purpose, however, you can use other
versions of MS Windows as well (be noted that configurations are slightly different in
MS Windows versions prior to 8.1).
#firewall-cmd --reload
success
Success
c:\WinPE_x86>
Mounting image
[==========================100.0%==========================]
The operation completed successfully.
c:\WinPE_x86>
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.
c:\WinPE_x86>
Success
c:\WinPE_x86>
Connect a new client to your network and turn it on. It should get the IP address from
DHCP server and display our PXE boot Menu as follows:
We will also create a Kickstart file for automated installation of Ubuntu 18.10 operating system, and ensure that it will
support both BIOS and UEFI based clients.
Note: In this article, we are performing everything from CLI, therefore, it is highly recommended that, you should
have Linux Pocket Guide: Essential Commands for quick reference.
System Specification:
We use the same CentOS 7 machine that we have configured as PXE Boot Server in our previous article. These
specifications have been re-mentioned below for convenience of the readers.
Memory: 2 GB
Storage: 50 GB
Hostname: pxe-server.itlab.com
IP Address: 192.168.116.41/24
Share Ubuntu 18.10 ISO/DVD contents via NFS Server:
Connect to pxe-server.itlab.com using ssh as root user.
This system is not registered with an entitlement server. You can use subscription-
manager to register.
Resolving Dependencies
Dependencies Resolved
================================================================================
================================================================================
Installing:
Transaction Summary
================================================================================
Install 1 Package
Downloading packages:
Running transaction
nfs-utils.x86_64 1:1.3.0-0.54.el7
Complete!
success
success
Attach Ubuntu 18.10 Server ISO/DVD and mount it at /mnt/iso (you can use any mountpoint, according to your
choice).
#mount -t iso9660 /dev/cdrom /mnt/iso
A sample kickstart file is given below, you can modify it according to your requirements.
# Enable extras.ubuntu.com.
# have the space to include them on the DVD, they're useful and we might as
#System language
lang en_US
langsupport en_US
#System keyboard
keyboard us
#System mouse
mouse
#System timezone
timezone Asia/Karachi
#Root password
rootpw --disabled
reboot
text
install
#Installation media
bootloader --location=mbr
zerombr yes
#Network information
#Firewall configuration
./
./ldlinux.c32
./pxelinux.cfg
./ubuntu-installer/
./ubuntu-installer/amd64/
./ubuntu-installer/amd64/linux
./ubuntu-installer/amd64/boot-screens/
./ubuntu-installer/amd64/boot-screens/txt.cfg
./ubuntu-installer/amd64/boot-screens/f2.txt
./ubuntu-installer/amd64/boot-screens/ldlinux.c32
./ubuntu-installer/amd64/boot-screens/f8.txt
./ubuntu-installer/amd64/boot-screens/libcom32.c32
./ubuntu-installer/amd64/boot-screens/f10.txt
./ubuntu-installer/amd64/boot-screens/prompt.cfg
./ubuntu-installer/amd64/boot-screens/f3.txt
./ubuntu-installer/amd64/boot-screens/rqtxt.cfg
./ubuntu-installer/amd64/boot-screens/syslinux.cfg
./ubuntu-installer/amd64/boot-screens/f1.txt
./ubuntu-installer/amd64/boot-screens/f5.txt
./ubuntu-installer/amd64/boot-screens/f4.txt
./ubuntu-installer/amd64/boot-screens/menu.cfg
./ubuntu-installer/amd64/boot-screens/adtxt.cfg
./ubuntu-installer/amd64/boot-screens/f7.txt
./ubuntu-installer/amd64/boot-screens/stdmenu.cfg
./ubuntu-installer/amd64/boot-screens/libutil.c32
./ubuntu-installer/amd64/boot-screens/splash.png
./ubuntu-installer/amd64/boot-screens/exithelp.cfg
./ubuntu-installer/amd64/boot-screens/f9.txt
./ubuntu-installer/amd64/boot-screens/vesamenu.c32
./ubuntu-installer/amd64/boot-screens/f6.txt
./ubuntu-installer/amd64/pxelinux.cfg/
./ubuntu-installer/amd64/pxelinux.cfg/default
./ubuntu-installer/amd64/initrd.gz
./ubuntu-installer/amd64/pxelinux.0
./version.info
./pxelinux.0
We need to copy initrd.gz and linux files from netboot directory ~/netboot/ubuntu-
installer/amd64/ to /var/lib/tftpboot/networkboot/ubuntu18 directory. These files will be
referenced in the menu entry of PXE boot menu.
#mkdir /var/lib/tftpboot/networkboot/ubuntu18
#cp ~/netboot/ubuntu-installer/amd64/{linux,initrd.gz}
/var/lib/tftpboot/networkboot/ubuntu18/
prompt 0
timeout 30
kernel /networkboot/rhel7/vmlinuz
kernel /networkboot/rhel6/vmlinuz
kernel networkboot/ubuntu18/linux
Edit PXE boot menu for UEFI based clients. For more information on UEFI, please refer to Add UEFI Support to PXE
Server in CentOS 7.
#vi /var/lib/tftpboot/grub.cfg
initrdefi /networkboot/rhel7/initrd.img
initrdefi /networkboot/rhel6/initrd.img
set gfxpayload=keep
linuxefi /networkboot/ubuntu18/linux
inst.repo=nfs:192.168.116.41:/nfsshare/ubuntu18
inst.ks=nfs:192.168.116.41:/nfsshare/ubuntu18/preseed/ubuntu.seed
initrdefi /networkboot/ubuntu18/initrd.gz
Now, connect a BIOS based PXE client to network and boot it. It will display the following PXE boot menu.
Similarly, connect a UEFI based PXE client to network and boot it. It will display the following PXE boot menu.
We have successfully configured our CentOS 7 PXE boot server to install Ubuntu 18.10. You can also add other versions
of Ubuntu in similar manner.