后续如果修改该文件,需要重启dhcp服务。
制作efi引导文件
cd /var/lib/tftpboot/ grub2-mkstandalone -d /usr/lib/grub/x86_64-efi/ -O x86_64-efi –modules=”tftp net efinet linux part_gpt efifwsetup” -o bootx64.efi
修改kickstart模板文件如下: 如果有如下行,删除它:
# Use CDROM installation media cdrom # Use graphical install graphical # X Window System configuration information xconfig --startxonboot下面是模版ks.conf 模版
#platform=x86, AMD64, or Intel EM64T #version=DEVEL # Install OS instead of upgrade install # Keyboard layouts keyboard 'us' # System timezone timezone Africa/Abidjan # Use network installation url --url="ftp://10.214.128.49/pub" # Root password rootpw --plaintext 123456 # System language lang en_US # Firewall configuration firewall --disabled # System authorization information auth --useshadow --passalgo=sha512 firstboot --disable # SELinux configuration selinux --disabled # Network information 选择需要启动的网卡 network --bootproto=dhcp --device=eno49 --onboot=on --ipv6=auto network --hostname=localhost.localdomain # 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 / --fstype="ext4" --size=204800 #/boot/efi必须是efi 格式,用户根据自己的需要定制分区。 part /boot/efi --fstype=efi --size=200 --fsoptions="defaults,uid=0,gid=0,umask=0077,shortname=winnt" part /boot --fstype=ext4 --size=500 part swap --recommended part pv.01 --grow --size=200 volgroup wdvg pv.01 logvol / --fstype=ext4 --vgname=wdvg --grow --size=20480 --name=root %packages @base %end将该文件拷贝到/var/ftp
cp ks.conf /var/ftp/88.ksgrub.cfg模版
set default="1" function load_video { insmod efi_gop insmod efi_uga insmod video_bochs insmod video_cirrus insmod all_video } load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod ext2 set timeout=60 ### END /etc/grub.d/00_header ### search --no-floppy --set=root -l 'CentOS 7 x86_64' ### BEGIN /etc/grub.d/10_linux ### menuentry 'Install CentOS 7.2 wanda' --class fedora --class gnu-linux --class gnu --class os { linuxefi (tftp)/vmlinuz bootdev=bootif inst.lang=en_US inst.text inst.ks=ftp://10.214.128.49/88.ks inst.repo=ftp://10.214.128.49/pub ip=dhcp initrdefi (tftp)/initrd.img }进入ilo -> 发送F12 进入 网络安装模式 -> 选择需要安装的系统。
参看:
https://github.com/openSUSE/kiwi/wiki/Setup-PXE-boot-with-EFI-using-grub2 https://www.ibm.com/developerworks/community/blogs/a2674a1d-a968-4f17-998f-b8b38497c9f7?sortby=0&maxresults=10&lang=zh CentOS7 kickstart安装官方文档:https://access.redhat.com/documentation/zh-CN/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html#sect-kickstart-commands GRUB2配置文件: http://www.jinbuguo.com/linux/grub.cfg.html 通过UEFI启动pxe安装CentOS 7 : http://blog.chinaunix.net/uid-22621471-id-4980582.html