Preboot Execution Environment의 줄임말로 네트워크 인터페이스를 이용해서 운영체제를 설치하기 위해서 사용한다.
PXE를 사용하기 위해서는 DHCP와 TFTP가 필요하다. DHCP는 부팅 서버에 네트워크 정보를 자동으로 설정하기 위해서 사용하는 프로토콜이다. TFTP는 bootstrap 프로그램과 몇가지 부가 파일을 다운로드하기 위해서 사용한다.
DHCP 서버 설치
dhcp server를 이용해서 네트워크 환경을 자동으로 설정하기로 했습니다. isc dhcp server를 설치했습니다.
# sudo apt-get install isc-dhcp-server
vi /etc/dhcp/dhcpd.conf
ddns-update-style none;
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers 8.8.8.8, 8.8.4.4;
option routers 172.30.1.254;
option subnet-mask 255.255.255.0;
default-lease-time 60;
max-lease-time 72;
log-facility local7;
subnet 172.30.1.0 netmask 255.255.255.0 {
range 172.30.1.100 172.30.1.200;
}
# sudo /etc/init.d/isc-dhcp-server restart
* Stopping ISC DHCP server dhcpd [fail]
* Starting ISC DHCP server dhcpd [ OK ]
TFTP 서버 설치
서버 패키지 설치
# apt-get install tftp tftpd
tftp 설정 파일. xinetd 기반이다. /etc/xinetd.d/tftp 파일을 만든다.
# cat /etc/xinetd.d/tftp
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
tftp 작업디렉토리 생성
mkdir /tftpboot
xinet 데몬을 재시작 한다.
# /etc/init.d/xinetd restart
syslinux 설치
syslinux는 IBM PC를 부팅하기 위한 bootloaders를 포함하는 리눅스 커널을 제공한다.
# cat /tftpboot/pxelinux.cfg/default
default menu.c32
timeout 100
menu background splash.jpg
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu color cmdline 0 #ffffffff #00000000
menu tabmsg Press ENTER to Install or TAB to edit a menu entry
menu title #### OS Installer Boot Menu ####
label 1
menu label CentOS5.7(32bit) on R210
kernel centos/x86/vmlinuz
append ksdevice=eth0 initrd=centos/x86/initrd.img network ks=nfs:192.168.0.10:/tftpboot/ks/ks32.cfg text
소개
환경
PXE boot
DHCP 서버 설치
TFTP 서버 설치
참고
Recent Posts
Archive Posts
Tags