PXE Boot : Diskless Clients2020/02/12 |
Start a client computer which has no local drives from booting OS image from PXE server.
|
|
[1] | |
[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/centos8/root [root@dlp ~]# dnf group -y install "Server with GUI" --releasever=8 --installroot=/var/lib/tftpboot/centos8/root/ # generate root password [root@dlp ~]# python3 -c 'import crypt,getpass; \
Password:print(crypt.crypt(getpass.getpass(), \ crypt.mksalt(crypt.METHOD_SHA512)))' $6$EC1T.oKN5f3seb20$y1WlMQ7Ih424OwOn.....
[root@dlp ~]#
vi /var/lib/tftpboot/centos8/root/etc/shadow # set root password generated above root: $6$EC1T.oKN5f3seb20$y1WlMQ7Ih424OwOn..... :16372:0:99999:7:::
LANG="en_US.UTF-8"
localhost.localdomain
|
[4] | Configure and Start NFS Server for diskless clients. |
[root@dlp ~]#
vi /etc/exports
/var/lib/tftpboot/centos8/root 10.0.0.0/24(rw,no_root_squash)
[root@dlp ~]#
systemctl enable --now nfs-server
# if Firewalld is running, allow service [root@dlp ~]# firewall-cmd --add-service=nfs --permanent [root@dlp ~]# firewall-cmd --reload |
[5] | Configure for BIOS based clients. |
[root@dlp ~]#
wget -P /var/lib/tftpboot/centos8/ \
http://mirror.centos.org/centos/8/BaseOS/x86_64/os/images/pxeboot/vmlinuz \ http://mirror.centos.org/centos/8/BaseOS/x86_64/os/images/pxeboot/initrd.img
[root@dlp ~]#
vi /var/lib/tftpboot/pxelinux.cfg/default # create new default centos8 label centos8 kernel centos8/vmlinuz append initrd=centos8/initrd.img root=nfs:10.0.0.30:/var/lib/tftpboot/centos8/root 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. |
Sponsored Link |
|