In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge of this article "how to write Linux PXE script", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to write Linux PXE script" article.
PXE, also known as the pre-execution environment, provides a mechanism for starting a computer using a network interface (Network Interface). This mechanism allows the computer to start without relying on a local data storage device (such as a hard disk) or a locally installed operating system.
#! / bin/bash # zxs read-p "Please enter IP address:" name read-p "Please enter network segment:" a read-p "Please enter address pool:" b read-p "Please enter gateway:" c iptables-F & > / dev/null systemctl stop firewalld & > / dev/null setenforce 0 & > / dev/null yum-y install vsftpd & > / dev/null echo $? " Ok "[- d / var/ftp/asd] | | mkdir / var/ftp/asd yum-y install tftp-server syslinux dhcp & > / dev/null rpm-Q tftp-server rpm-q dhcp umount / dev/sr0 mount / dev/sr0 / var/ftp/asd sed-I" s/yes/no/g "/ etc/xinetd.d/tftp cd / var/ftp/asd/isolinux cp vmlinuz initrd.img / var/lib/tftpboot/ cp / root/anaconda-ks.cfg / var/ftp/ks .cfg chmod 777 / var/ftp/ks.cfg sed-I "s/cdrom/#cdrom/" / var/ftp/ks.cfg sed-I "s/url/#url/" / var/ftp/ks.cfg sed-I "5a url-- url= ftp://${name}/asd" / var/ftp/ks.cfg cp / usr/share/syslinux/pxelinux.0 / var/lib/tftpboot/ cp / var/ftp/asd/isolinux/isolinux.cfg / var/lib/tftpboot/ Chmod 644 / var/lib/tftpboot/isolinux.cfg mkdir / var/lib/tftpboot/pxelinux.cfg mv / var/lib/tftpboot/isolinux.cfg / var/lib/tftpboot/pxelinux.cfg/default sed-I "s/default vesamenu.c32/default linux/" / var/lib/tftpboot/pxelinux.cfg/default sed-I'2a prompt 0' / var/lib/tftpboot/pxelinux.cfg/default sed-I "65a append initrd=initrd.img inst.repo= ftp://${name}/asd inst.ks=ftp: / / ${name} / ks.cfg "/ var/lib/tftpboot/pxelinux.cfg/default rm-rf / etc/dhcp/dhcpd.conf cat > / etc/dhcp/dhcpd.conf / dev/nullsystemctl start dhcpdsystemctl enable dhcpd & > / dev/nullsystemctl start vsftpdsystemctl enable vsftpd & > / dev/null above is the content of this article on" how to write Linux PXE scripts " I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.