标签:
ddns-update-style interim;
ignore client-updates;
option routers 192.168.2.1;
default-lease-time 21600;
max-lease-time 43200;
subnet 192.168.2.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.111.100 192.168.111.200;
filename "pxelinux.0"; #pxelinux 启动文件位置;
next-server 192.168.2.1; #TFTP Server 的IP地址;
}
yum -y install tftp-server
systemctl restart xinetd systemctl enable xinetd
mount /dev/sr0 /media
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
yum -y install syslinux
cp /media/images/pxeboot/{initrd.img,vmlinuz} /var/lib/tftpboot/
cp /media/isolinux/*.msg /var/lib/tftpboot/
mkdir /var/lib/tftpboot/pxelinux.cfg
cp /media/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
label linux menu label ^Install CentOS 7 kernel vmlinuz append initrd=initrd.img ks=http://192.168.1.210/os/ks.cfg inst.repo=http://192.168.1.210/os
yum -y install httpd
mkdir /var/ww/html/os cp /media/* /var/www/html/os
vim /var/www/html/os/ks.cfg
#platform=x86, AMD64, or Intel EM64T #version=DEVEL # Install OS instead of upgrade install # Keyboard layouts keyboard ‘us‘ # Root password rootpw --iscrypted $1$WJGXtHBG$SVk/yH3jp0zG3SmlgT0Lt0 # System timezone timezone Asia/Shanghai --isUtc # System language lang en_US # Firewall configuration firewall --disabled # System authorization information auth --useshadow --passalgo=sha512 # Use graphical install graphical # Run the Setup Agent on first boot firstboot --enable # SELinux configuration selinux --permissive # Use NFS installation media #nfs --server=192.168.1.210 --dir=/tmp/isoimg # Use HTTP installation media #url --url=http://192.168.1.210/os/ url --url=http://192.168.1.210/os/ # Network information network --bootproto=dhcp --device=eth0 --onboot=on --noipv6 # Reboot after installation reboot # System bootloader configuration bootloader --location=mbr # Clear the Master Boot Record zerombr # Partition clearing information #clearpart --all --initlabel # Disk partitioning information part /boot/efi --fstype="efi" --ondisk=sda --size=256 part /boot --fstype="xfs" --ondisk=sda --size=500 part / --fstype="xfs" --ondisk=sda --size=5000 part /home --fstype="xfs" --ondisk=sda --size=5000 %packages @base @core @fonts @input-methods @multimedia %end %pre #>2.0TB hard disk need to try to use gpt instead of mbr. parted -s=BOOT_DISK_DEVICE= mklabel gpt %end %post ############EFI BOOT ############# mkdir -p /boot/efi/EFI/BOOT \cp -r /boot/* /boot/efi \cp /boot/efi/EFI/redhat/grub.efi /boot/efi/EFI/BOOT/BOOTX64.efi \cp /boot/grub/grub.conf /boot/efi/EFI/BOOT/BOOTX64.conf \cp /boot/grub/splash.xpm.gz /boot/efi/EFI/BOOT/splash.xpm.gz %end



标签:
原文地址:http://www.cnblogs.com/hf9999/p/5613497.html