CentOS Stream 9
Sponsored Link

PXE Boot : Diskless Clients2022/07/13

Start a client computer which has no local drives from booting OS image from PXE server.
[2] Install required packages on PXE server.
[root@dlp ~]#
dnf -y install dracut-network nfs-utils
[3] Build a System for diskless clients on PXE server.
[root@dlp ~]#
mkdir -p /var/lib/tftpboot/centos-st9/root

[root@dlp ~]#
dnf group -y install "Server with GUI" --installroot=/var/lib/tftpboot/centos-st9/root/
# generate root password

[root@dlp ~]#
/usr/libexec/platform-python -c 'import crypt,getpass; \
print(crypt.crypt(getpass.getpass(), \
[root@dlp ~]#
vi /var/lib/tftpboot/centos-st9/root/etc/shadow
# set root password generated above

# set locale for clients system

[root@dlp ~]#
vi /var/lib/tftpboot/centos-st9/root/etc/locale.conf
# set hostname for clients system

[root@dlp ~]#
vi /var/lib/tftpboot/centos-st9/root/etc/hostname
[4] Configure and Start NFS Server for diskless clients.
[root@dlp ~]#
vi /etc/exports
[root@dlp ~]#
systemctl enable --now nfs-server
# if Firewalld is running, allow service

[root@dlp ~]#
firewall-cmd --add-service=nfs

[root@dlp ~]#
firewall-cmd --runtime-to-permanent

[5] Configure for BIOS based clients.
[root@dlp ~]#
wget -P /var/lib/tftpboot/centos-st9/ \
http://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/images/pxeboot/vmlinuz \
[root@dlp ~]#
vi /var/lib/tftpboot/pxelinux.cfg/default
# create new

default centos-st9

label centos-st9
    kernel centos-st9/vmlinuz
    append initrd=centos-st9/initrd.img root=nfs: rw selinux=0 
[6] That's OK.
Power on a computer which is enabled network booting on BIOS settings, then, System starts from shared OS image on PXE server.
Matched Content