사용한 버전 Centos7.6
그 전에 UEFI전에 레거시 편을 참고해서 봐주시면 감사하겠습니다.
참고한 링크
[CentOS] UEFI Kickstart 만들기(Hyper-V 2세대 - PXELinux)
[CentOS] UEFI Kickstart 만들기(Hyper-V2세대 - PXELinux) UEFI란? BIOS를 대체하는 펌웨어 규격입니다. 사용자가 느끼는 BIOS와 UEFI의 가장 큰 차이점은 사용자 인터페이스 GUI와 GPT 파티션 지원입니다. 그..
ossian.tistory.com
30.2.2. Configuring PXE Boot for EFI Red Hat Enterprise Linux 6 | Red Hat Customer Portal
The Red Hat Customer Portal delivers the knowledge, expertise, and guidance available through your Red Hat subscription.
access.redhat.com
1. mkdir /var/lib/tftpboot/pxelinux
cp /boot/efi/EFI/redhat/grub.efi /var/lib/tftpboot/pxelinux/bootx64.efi
레드헷에서는 위를 따라해야하지만 centos7 에선 grub.efi가 없기 때문에 grubx64.efi로 대신 합니다.
2. cp /centos7.6(mount path)/EFI/BOOT/grubx64.efi /var/lib/tftpboot/pxelinux/ 또는
cp /boot/efi/EFI/centos/grubx64.efi /var/lib/tftpboot/pxelinux/bootx64.efi
3. cp /centos7.6(mount path)/isolinux/grub.conf /var/lib/tftpboot/pxelinux/ 또는
cp /boot/efi/EFI/centos/grub.conf
4. vim /etc/dhcp/dhcpd.conf
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option arch code 93 = unsigned integer 16; # RFC4578
subnet 10.0.0.0 netmask 255.255.255.0 {
option routers 10.0.0.254;
range 10.0.0.2 10.0.0.253; //본인의 설정에 맞는 ip 수정
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 10.0.0.1; // " "
if option arch = 00:07 {
filename "pxelinux/bootx64.efi"; //본인의 설정에 맞는 path 수정
} else {
filename "pxelinux/pxelinux.0"; // " "
}
}
}
5. vim grub.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' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /pxelinux/vmlinuz ip=dhcp inst.repo=ftp://10.0.0.2/pub/centos7 ks=ftp://10.0.0.2/ks.cfg
initrdefi /pxelinux/initrd.img // 본인에게 맞는 경로 및 아이피 수정
}
systemctl restart dhcpd
systemctl restart xinetd
systemctl restart vsftpd
systemctl restart tftp