SlideShare une entreprise Scribd logo
1  sur  18
PXE 부팅
TechDay 발표자료
김주한(jhkim@ymtech.kr)
2017-07-13
목차
• PXE 부팅이란?
• PXE 부팅의 현재
• PXE의 구성
• PXE 부팅의 흐름
• DHCP 설정
• TFTP 설정
• PXE 관련 설정
• 시연
• 응용
• Q & A
2
PXE 부팅이란?
• 명칭
– 사전 부팅 실행 환경 또는 Pre-boot eXecution Enviroment
• 설명
– 클라이언트/서버 인터페이스의 산업계 표준
– 네트워크에 접속된 컴퓨터들을 구성하고, 부팅할 수 있게 해줌
– PXE 코드는 대체로 컴퓨터의 롬, 또는 클라이언트가 네트워크 서버와 통신할 수 있게 해
주는 부트 디스크 상에 넣어 전달됨
• 사용시 이점
– 운영체제, 하드디스크가 반드시 있어야 할 필요가 없음.
– 새로운 형태의 컴퓨터도 손쉽게 네트워크에 추가 할 수 있음.
3
PXE 부팅의 현재 1
• 구글 트렌드로 보는 PXE
• 유사 기술
– Microsotf의 BINL(Boot Information Negotiation Layer)
PXE의 하위기술로 중복되지 않는 확장판(non-overlapping extension)
– apple 의 Boot Server Discovery Protocol(BSDP) (v0.1 1999 발표)
4
PXE 부팅의 현재 2
• 한국 시장
5
PXE의 구성
• PXE Client
– 네트워크 인터페이스에서 PXE 부팅을 지원 해야함.
• PXE Server
– DHCP Server
• 최초 클라이언트가 DHCP 요청시 TFTP 서버의 주소와 pxe 부팅에 필요한 파일 이름을 전달.
– TFTP Server
• pxe 부팅에 필요한 파일 및 OS 이미지등을 사용할 수 있게함.
6
PXE 부팅의 흐름
• DHCP 요청
• TFTP 요청
7
NBP : Network Boot Program
DHCP 설정
• apt-get install isc-dhcp-server
• vi /etc/dhcp/dhcpd.conf (아래 내용 추가.)
• /etc/init.d/isc-dhcp-server restart
8
ddns-update-style none;
allow booting;
allow bootp;
class "pxeclients" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 192.168.79.138;
filename = "pxelinux.0";
}
TFTP 설정
• apt-get install tftp tftpd
• vi /etc/xinetd.d/ftfp (새로 생성)
• mkdir –p /tftpboot
• service xinetd restart
9
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
}
PXE 관련 설정 1
• mkdir /mnt/ubuntu-server
• mount -o loop /home/ymtech/Downloads/ubuntu-14.04.5-server-amd64.iso /mnt/ubuntu-server/
• mkdir - p /tftpboot/ubuntu-installer/amd64
• cd /mnt/ubuntu-server/install/netboot/ubuntu-installer/amd64
• cp -R boot-screens /tftpboot/ubuntu-installer/amd64
• cp initrd.gz linux /tftpboot/ubuntu-installer/amd64
• chmod 777 -R /tftpboot/
10
PXE 관련 설정 2
• apt-get install nfs-kernel-server
• vi /etc/exports
• exportsfs –a (설정 적용)
11
# Ubuntu Live CD files for PXE booting
/home/ymtech/ubuntu-server/amd64 *(ro,insecure,no_root_squash,async,no_subtree_check)
PXE 관련 설정 3
• apt-get install syslinux
• cp /usr/share/syslinux/pxelinux.0 /tftpboot
• cp /usr/share/syslinux/mboot.c32 /tftpboot
• mkdir /tftpboot/pxelinux.cfg
• vi /tftpboot/pxelinx.cfg/default
12
include mybootmenu.cfg
default ubuntu-installer/amd64/boot-screens/vesamenu.c32
prompt 0
timeout 100
PXE 관련 설정 4
• vi /tftpboot/mybootmenu.cfg
13
menu hshift 12
menu width 49
menu margin 8
menu title My Customised Network Boot Menu
include ubuntu-installer/amd64/boot-screens/stdmenu.cfg
label Boot from the first HDD
localboot 0
label Memory Tester
kernel mt86plus
label install ubuntu14.04(64-bit)
kernel ubuntu-installer/amd64/linux
append boot=casper netboot=nfs nfsroot=192.168.79.138:/home/ymtech/ubuntu-
server/amd64 initrd=ubuntu-installer/amd64/initrd.gz
시연
• 원격 데스크탑을 이용한 시연
– pxe client에서 DHCP Server에 요청하는 로그 확인
– pxe client에서 TFTP Server에 pxelinux.0 파일 요청하는 로그 확인
– custom menu 표시 확인
– 설치 화면 확인
14
응용
• Live CD
OS를 하드디스크에 설치하지 않고 원격의 OS 이미지를 직접 구동함.
일종의 diskless (하드디스크 없이 OS 구동 가능)
• Automated Install
– kickstart
OS install 시 선택해야 하는 항목,
OS 설치뒤 실행할 명령등을 미리
작성하여 설정파일로 만들어 놓으면
설치시 해당 설정파일을 참고하여
자동으로 설치가 가능하도록 하는 방법.
preseed.cfg 파일의 일부 ->
15
# Language setting 언어 설정
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8
d-i localechooser/supported-locales en_US.UTF-8
# Keyboard setting 키보드 설정
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/charmap select UTF-8
d-i keymap select jp106
d-i keyboard-configuration/xkb-keymap select jp106
d-i keyboard-configuration/layoutcode string jp
d-i keyboard-configuration/modelcode jp106
# Network setting 네트워크 설정
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string preseedexample
d-i netcfg/get_domain string example.org
# mirror 이미지 미러 설정
d-i mirror/country string manual
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu/
… … …
응용 설정 Live CD
• mkdir /mnt/ubuntu10
• mount -o loop /home/ymtech/Downloads/ubuntu-10.04.4-desktop-amd64.iso
/mnt/ubuntu10/
• mkdir -p /tftpboot/ubuntu-livecd-boot-10/amd64
• mkdir -p /home/ymtech/ubuntu-livecd-10/amd64
• cp -av /mnt/ubuntu10/* /home/ymtech/ubuntu-livecd-10/amd64/
• cp -av /mnt/ubuntu10/.disk /home/ymtech/ubuntu-livecd-10/amd64/
• cp -av /mnt/ubuntu10/casper/initrd.lz /tftpboot/ubuntu-livecd-boot-10/amd64/
• cp -av /mnt/ubuntu10/casper/vmlinuz /tftpboot/ubuntu-livecd-boot-10/amd64/
• chmod 777 -R /tftpboot/
• vi /etc/exports/ (아래 내용 추가)
• exportsfs –a (설정 적용)
16
/home/ymtech/ubuntu-livecd-10/amd64 *(ro,insecure,no_root_squash,async,no_subtree_check)
응용 설정 mybootmenu.cfg
• vi /tftpboot/mybootmenu.cfg
17
menu hshift 12
menu width 49
menu margin 8
menu title My Customised Network Boot Menu
include ubuntu-installer/amd64/boot-screens/stdmenu.cfg
label Boot from the first HDD
localboot 0
label Memory Tester
kernel mt86plus
label Live CD 64-bit(10.04) – 라이브 시디
kernel ubuntu-livecd-boot-10/amd64/vmlinuz
append boot=casper netboot=nfs nfsroot=192.168.79.138:/home/ymtech/ubuntu-livecd-10/amd64
initrd=ubuntu-livecd-boot-10/amd64/initrd.lz -- splash quiet
label Autoinstall ubuntu14.04(64-bit) – Automated Install
kernel ubuntu-installer/amd64/linux
append boot=casper netboot=nfs nfsroot=192.168.79.138:/home/ymtech/ubuntu-server/amd64
initrd=ubuntu-installer/amd64/initrd.gz auto=true url=http://192.168.79.138/preseed.cfg --
응용 설정 kickstart
• apt-get install apache
• vi /var/www/html/preseed.cfg
18
# Language setting 언어 설정
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8
d-i localechooser/supported-locales en_US.UTF-8
# Keyboard setting 키보드 설정
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/charmap select UTF-8
d-i keymap select jp106
d-i keyboard-configuration/xkb-keymap select jp106
d-i keyboard-configuration/layoutcode string jp
d-i keyboard-configuration/modelcode jp106
# Network setting 네트워크 설정
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string preseedexample
d-i netcfg/get_domain string example.org
# mirror 이미지 미러 설정
d-i mirror/country string manual
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu/
…
…
…

Contenu connexe

Tendances

1주차 리눅스의 이해 및 설치, 파티션과 파일 시스템, 부팅매니져
1주차   리눅스의 이해 및 설치, 파티션과 파일 시스템, 부팅매니져1주차   리눅스의 이해 및 설치, 파티션과 파일 시스템, 부팅매니져
1주차 리눅스의 이해 및 설치, 파티션과 파일 시스템, 부팅매니져
Chulgyu Shin
 
ITs 2주차_기본명령어(발표)
ITs 2주차_기본명령어(발표)ITs 2주차_기본명령어(발표)
ITs 2주차_기본명령어(발표)
Chulgyu Shin
 
라즈베리파이 환경설정
라즈베리파이 환경설정라즈베리파이 환경설정
라즈베리파이 환경설정
InHee Kim
 

Tendances (20)

1주차 리눅스의 이해 및 설치, 파티션과 파일 시스템, 부팅매니져
1주차   리눅스의 이해 및 설치, 파티션과 파일 시스템, 부팅매니져1주차   리눅스의 이해 및 설치, 파티션과 파일 시스템, 부팅매니져
1주차 리눅스의 이해 및 설치, 파티션과 파일 시스템, 부팅매니져
 
도커 없이 컨테이너 만들기 3편
도커 없이 컨테이너 만들기 3편도커 없이 컨테이너 만들기 3편
도커 없이 컨테이너 만들기 3편
 
Raspberry pi 개발환경 구축
Raspberry pi 개발환경 구축Raspberry pi 개발환경 구축
Raspberry pi 개발환경 구축
 
IoT with Raspberry Pi + Node JS - Chapter 1
IoT with Raspberry Pi + Node JS - Chapter 1IoT with Raspberry Pi + Node JS - Chapter 1
IoT with Raspberry Pi + Node JS - Chapter 1
 
MarsBoard RK3066 Linux 설치
MarsBoard RK3066 Linux 설치MarsBoard RK3066 Linux 설치
MarsBoard RK3066 Linux 설치
 
Linux tutorial
Linux tutorialLinux tutorial
Linux tutorial
 
리눅스 스터디 1회차
리눅스 스터디 1회차리눅스 스터디 1회차
리눅스 스터디 1회차
 
이것이 리눅스다 - 김종욱
이것이 리눅스다 - 김종욱이것이 리눅스다 - 김종욱
이것이 리눅스다 - 김종욱
 
Raspberry pi 2 설치 및 연결
Raspberry pi 2 설치 및 연결Raspberry pi 2 설치 및 연결
Raspberry pi 2 설치 및 연결
 
노태상 - 리눅스 커널 개요 및 이슈 아이엠 (2010Y01M30D)
노태상 - 리눅스 커널 개요 및 이슈 아이엠 (2010Y01M30D)노태상 - 리눅스 커널 개요 및 이슈 아이엠 (2010Y01M30D)
노태상 - 리눅스 커널 개요 및 이슈 아이엠 (2010Y01M30D)
 
Why OpenStack is Operating System?
Why OpenStack is Operating System?Why OpenStack is Operating System?
Why OpenStack is Operating System?
 
Apache Tomcat ( 아파치 톰캣 ) 설치 가이드
Apache Tomcat ( 아파치 톰캣 ) 설치 가이드Apache Tomcat ( 아파치 톰캣 ) 설치 가이드
Apache Tomcat ( 아파치 톰캣 ) 설치 가이드
 
Maker 오해와 진실
Maker 오해와 진실Maker 오해와 진실
Maker 오해와 진실
 
Linux 강의자료 ed10
Linux 강의자료 ed10Linux 강의자료 ed10
Linux 강의자료 ed10
 
도커없이 컨테이너 만들기 1편
도커없이 컨테이너 만들기 1편도커없이 컨테이너 만들기 1편
도커없이 컨테이너 만들기 1편
 
리눅스에 대하여
리눅스에 대하여리눅스에 대하여
리눅스에 대하여
 
Docker설치
Docker설치Docker설치
Docker설치
 
ITs 2주차_기본명령어(발표)
ITs 2주차_기본명령어(발표)ITs 2주차_기본명령어(발표)
ITs 2주차_기본명령어(발표)
 
Mikrotic CCR1036 라우팅 설정
Mikrotic CCR1036 라우팅 설정Mikrotic CCR1036 라우팅 설정
Mikrotic CCR1036 라우팅 설정
 
라즈베리파이 환경설정
라즈베리파이 환경설정라즈베리파이 환경설정
라즈베리파이 환경설정
 

Similaire à 20170713 tech day_7th_pxe 부팅-김주한

Linux Performan tuning Part I
Linux Performan tuning Part ILinux Performan tuning Part I
Linux Performan tuning Part I
sprdd
 
게임 개발에 도움을 주는 CruiseControl.NET과 Windows Terminal
게임 개발에 도움을 주는 CruiseControl.NET과 Windows Terminal게임 개발에 도움을 주는 CruiseControl.NET과 Windows Terminal
게임 개발에 도움을 주는 CruiseControl.NET과 Windows Terminal
OnGameServer
 

Similaire à 20170713 tech day_7th_pxe 부팅-김주한 (20)

망고100 보드로 놀아보자 4
망고100 보드로 놀아보자 4망고100 보드로 놀아보자 4
망고100 보드로 놀아보자 4
 
안드로이드 플랫폼 설명
안드로이드 플랫폼 설명안드로이드 플랫폼 설명
안드로이드 플랫폼 설명
 
강분도 - 나만의 우분투 배포판 만들기 (2011Y06M25D)
강분도 - 나만의 우분투 배포판 만들기 (2011Y06M25D)강분도 - 나만의 우분투 배포판 만들기 (2011Y06M25D)
강분도 - 나만의 우분투 배포판 만들기 (2011Y06M25D)
 
Relationship between firmware and module(drvier)
Relationship between firmware and module(drvier)Relationship between firmware and module(drvier)
Relationship between firmware and module(drvier)
 
3.ubuntu custom
3.ubuntu custom3.ubuntu custom
3.ubuntu custom
 
CoreOS를 이용한 Docker 관리툴 소개
CoreOS를 이용한 Docker 관리툴 소개CoreOS를 이용한 Docker 관리툴 소개
CoreOS를 이용한 Docker 관리툴 소개
 
Rhel7 beta information
Rhel7 beta informationRhel7 beta information
Rhel7 beta information
 
Kafka slideshare
Kafka   slideshareKafka   slideshare
Kafka slideshare
 
Hyperledger fabric practice(pdf)
Hyperledger fabric practice(pdf)Hyperledger fabric practice(pdf)
Hyperledger fabric practice(pdf)
 
Linux Performan tuning Part I
Linux Performan tuning Part ILinux Performan tuning Part I
Linux Performan tuning Part I
 
JBoss Web Server ( JBoss 웹서버 ) 설치 가이드
JBoss Web Server ( JBoss 웹서버 ) 설치 가이드JBoss Web Server ( JBoss 웹서버 ) 설치 가이드
JBoss Web Server ( JBoss 웹서버 ) 설치 가이드
 
게임 개발에 도움을 주는 CruiseControl.NET과 Windows Terminal
게임 개발에 도움을 주는 CruiseControl.NET과 Windows Terminal게임 개발에 도움을 주는 CruiseControl.NET과 Windows Terminal
게임 개발에 도움을 주는 CruiseControl.NET과 Windows Terminal
 
리눅스 드라이버 실습 #1
리눅스 드라이버 실습 #1리눅스 드라이버 실습 #1
리눅스 드라이버 실습 #1
 
Openstack live migration
Openstack live migrationOpenstack live migration
Openstack live migration
 
[Tizen Talk 2016 in Seoul] 바닥서부터 만들어보는 타이젠
[Tizen Talk 2016 in Seoul] 바닥서부터 만들어보는 타이젠[Tizen Talk 2016 in Seoul] 바닥서부터 만들어보는 타이젠
[Tizen Talk 2016 in Seoul] 바닥서부터 만들어보는 타이젠
 
Nginx basic configurations
Nginx basic configurationsNginx basic configurations
Nginx basic configurations
 
Build the OpenStack Cloud with Neutron Networing, IceHouse
Build the OpenStack Cloud with Neutron Networing, IceHouseBuild the OpenStack Cloud with Neutron Networing, IceHouse
Build the OpenStack Cloud with Neutron Networing, IceHouse
 
Mininet
MininetMininet
Mininet
 
20141029 하둡2.5와 hive설치 및 예제
20141029 하둡2.5와 hive설치 및 예제20141029 하둡2.5와 hive설치 및 예제
20141029 하둡2.5와 hive설치 및 예제
 
Actual PoC guide for Virtual Desktop Infrastructure (Korean)
Actual PoC guide for Virtual Desktop Infrastructure (Korean)Actual PoC guide for Virtual Desktop Infrastructure (Korean)
Actual PoC guide for Virtual Desktop Infrastructure (Korean)
 

Plus de ymtech

TR-069 클라이언트 검토자료5편
TR-069 클라이언트 검토자료5편TR-069 클라이언트 검토자료5편
TR-069 클라이언트 검토자료5편
ymtech
 

Plus de ymtech (20)

20171120 tech day-11th-소프트웨어 테스팅2-서현용
20171120 tech day-11th-소프트웨어 테스팅2-서현용20171120 tech day-11th-소프트웨어 테스팅2-서현용
20171120 tech day-11th-소프트웨어 테스팅2-서현용
 
20170908 tech day-9th-재미없는 java runtime process 디버그-김성중
20170908 tech day-9th-재미없는 java runtime process 디버그-김성중20170908 tech day-9th-재미없는 java runtime process 디버그-김성중
20170908 tech day-9th-재미없는 java runtime process 디버그-김성중
 
20170609 tech day_4th-nginx(lb)-이재훈
20170609 tech day_4th-nginx(lb)-이재훈20170609 tech day_4th-nginx(lb)-이재훈
20170609 tech day_4th-nginx(lb)-이재훈
 
20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석
20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석
20170519 tech day-3rd-highcharts를 이용한 차트 구현-김영석
 
20170414 techday 2nd_uiux디자인-최민희
20170414 techday 2nd_uiux디자인-최민희20170414 techday 2nd_uiux디자인-최민희
20170414 techday 2nd_uiux디자인-최민희
 
20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍
20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍
20170310 tech day-1st-maven을 이용한 프로그램 빌드-박준홍
 
Installation Openstack Swift
Installation Openstack SwiftInstallation Openstack Swift
Installation Openstack Swift
 
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
 
Intel Galileo Linux Setting
Intel Galileo Linux SettingIntel Galileo Linux Setting
Intel Galileo Linux Setting
 
HP 3800-24G-2SFP OpenFlow Setting
HP 3800-24G-2SFP OpenFlow SettingHP 3800-24G-2SFP OpenFlow Setting
HP 3800-24G-2SFP OpenFlow Setting
 
Openstack Instance Resize
Openstack Instance ResizeOpenstack Instance Resize
Openstack Instance Resize
 
SDN OpenFlow Load Balancer 시나리오
SDN OpenFlow Load Balancer 시나리오SDN OpenFlow Load Balancer 시나리오
SDN OpenFlow Load Balancer 시나리오
 
TR-069 클라이언트 검토자료8편
TR-069 클라이언트 검토자료8편TR-069 클라이언트 검토자료8편
TR-069 클라이언트 검토자료8편
 
TR-069 클라이언트 검토자료7편
TR-069 클라이언트 검토자료7편TR-069 클라이언트 검토자료7편
TR-069 클라이언트 검토자료7편
 
TR-069 클라이언트-검토자료6편
TR-069 클라이언트-검토자료6편TR-069 클라이언트-검토자료6편
TR-069 클라이언트-검토자료6편
 
TR-069 클라이언트 검토자료5편
TR-069 클라이언트 검토자료5편TR-069 클라이언트 검토자료5편
TR-069 클라이언트 검토자료5편
 
TR 069 클라이언트 검토 자료 4편
TR 069 클라이언트 검토 자료 4편TR 069 클라이언트 검토 자료 4편
TR 069 클라이언트 검토 자료 4편
 
TR 069 클라이언트 검토자료 3편
TR 069 클라이언트 검토자료 3편TR 069 클라이언트 검토자료 3편
TR 069 클라이언트 검토자료 3편
 
DHCP Spoofing
DHCP SpoofingDHCP Spoofing
DHCP Spoofing
 
OSGI(Open Service Gateway initiative)
OSGI(Open Service Gateway initiative)OSGI(Open Service Gateway initiative)
OSGI(Open Service Gateway initiative)
 

20170713 tech day_7th_pxe 부팅-김주한

  • 2. 목차 • PXE 부팅이란? • PXE 부팅의 현재 • PXE의 구성 • PXE 부팅의 흐름 • DHCP 설정 • TFTP 설정 • PXE 관련 설정 • 시연 • 응용 • Q & A 2
  • 3. PXE 부팅이란? • 명칭 – 사전 부팅 실행 환경 또는 Pre-boot eXecution Enviroment • 설명 – 클라이언트/서버 인터페이스의 산업계 표준 – 네트워크에 접속된 컴퓨터들을 구성하고, 부팅할 수 있게 해줌 – PXE 코드는 대체로 컴퓨터의 롬, 또는 클라이언트가 네트워크 서버와 통신할 수 있게 해 주는 부트 디스크 상에 넣어 전달됨 • 사용시 이점 – 운영체제, 하드디스크가 반드시 있어야 할 필요가 없음. – 새로운 형태의 컴퓨터도 손쉽게 네트워크에 추가 할 수 있음. 3
  • 4. PXE 부팅의 현재 1 • 구글 트렌드로 보는 PXE • 유사 기술 – Microsotf의 BINL(Boot Information Negotiation Layer) PXE의 하위기술로 중복되지 않는 확장판(non-overlapping extension) – apple 의 Boot Server Discovery Protocol(BSDP) (v0.1 1999 발표) 4
  • 5. PXE 부팅의 현재 2 • 한국 시장 5
  • 6. PXE의 구성 • PXE Client – 네트워크 인터페이스에서 PXE 부팅을 지원 해야함. • PXE Server – DHCP Server • 최초 클라이언트가 DHCP 요청시 TFTP 서버의 주소와 pxe 부팅에 필요한 파일 이름을 전달. – TFTP Server • pxe 부팅에 필요한 파일 및 OS 이미지등을 사용할 수 있게함. 6
  • 7. PXE 부팅의 흐름 • DHCP 요청 • TFTP 요청 7 NBP : Network Boot Program
  • 8. DHCP 설정 • apt-get install isc-dhcp-server • vi /etc/dhcp/dhcpd.conf (아래 내용 추가.) • /etc/init.d/isc-dhcp-server restart 8 ddns-update-style none; allow booting; allow bootp; class "pxeclients" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; next-server 192.168.79.138; filename = "pxelinux.0"; }
  • 9. TFTP 설정 • apt-get install tftp tftpd • vi /etc/xinetd.d/ftfp (새로 생성) • mkdir –p /tftpboot • service xinetd restart 9 service tftp { disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot }
  • 10. PXE 관련 설정 1 • mkdir /mnt/ubuntu-server • mount -o loop /home/ymtech/Downloads/ubuntu-14.04.5-server-amd64.iso /mnt/ubuntu-server/ • mkdir - p /tftpboot/ubuntu-installer/amd64 • cd /mnt/ubuntu-server/install/netboot/ubuntu-installer/amd64 • cp -R boot-screens /tftpboot/ubuntu-installer/amd64 • cp initrd.gz linux /tftpboot/ubuntu-installer/amd64 • chmod 777 -R /tftpboot/ 10
  • 11. PXE 관련 설정 2 • apt-get install nfs-kernel-server • vi /etc/exports • exportsfs –a (설정 적용) 11 # Ubuntu Live CD files for PXE booting /home/ymtech/ubuntu-server/amd64 *(ro,insecure,no_root_squash,async,no_subtree_check)
  • 12. PXE 관련 설정 3 • apt-get install syslinux • cp /usr/share/syslinux/pxelinux.0 /tftpboot • cp /usr/share/syslinux/mboot.c32 /tftpboot • mkdir /tftpboot/pxelinux.cfg • vi /tftpboot/pxelinx.cfg/default 12 include mybootmenu.cfg default ubuntu-installer/amd64/boot-screens/vesamenu.c32 prompt 0 timeout 100
  • 13. PXE 관련 설정 4 • vi /tftpboot/mybootmenu.cfg 13 menu hshift 12 menu width 49 menu margin 8 menu title My Customised Network Boot Menu include ubuntu-installer/amd64/boot-screens/stdmenu.cfg label Boot from the first HDD localboot 0 label Memory Tester kernel mt86plus label install ubuntu14.04(64-bit) kernel ubuntu-installer/amd64/linux append boot=casper netboot=nfs nfsroot=192.168.79.138:/home/ymtech/ubuntu- server/amd64 initrd=ubuntu-installer/amd64/initrd.gz
  • 14. 시연 • 원격 데스크탑을 이용한 시연 – pxe client에서 DHCP Server에 요청하는 로그 확인 – pxe client에서 TFTP Server에 pxelinux.0 파일 요청하는 로그 확인 – custom menu 표시 확인 – 설치 화면 확인 14
  • 15. 응용 • Live CD OS를 하드디스크에 설치하지 않고 원격의 OS 이미지를 직접 구동함. 일종의 diskless (하드디스크 없이 OS 구동 가능) • Automated Install – kickstart OS install 시 선택해야 하는 항목, OS 설치뒤 실행할 명령등을 미리 작성하여 설정파일로 만들어 놓으면 설치시 해당 설정파일을 참고하여 자동으로 설치가 가능하도록 하는 방법. preseed.cfg 파일의 일부 -> 15 # Language setting 언어 설정 d-i debian-installer/language string en d-i debian-installer/country string US d-i debian-installer/locale string en_US.UTF-8 d-i localechooser/supported-locales en_US.UTF-8 # Keyboard setting 키보드 설정 d-i console-setup/ask_detect boolean false d-i console-setup/layoutcode string us d-i console-setup/charmap select UTF-8 d-i keymap select jp106 d-i keyboard-configuration/xkb-keymap select jp106 d-i keyboard-configuration/layoutcode string jp d-i keyboard-configuration/modelcode jp106 # Network setting 네트워크 설정 d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string preseedexample d-i netcfg/get_domain string example.org # mirror 이미지 미러 설정 d-i mirror/country string manual d-i mirror/http/hostname string archive.ubuntu.com d-i mirror/http/directory string /ubuntu/ … … …
  • 16. 응용 설정 Live CD • mkdir /mnt/ubuntu10 • mount -o loop /home/ymtech/Downloads/ubuntu-10.04.4-desktop-amd64.iso /mnt/ubuntu10/ • mkdir -p /tftpboot/ubuntu-livecd-boot-10/amd64 • mkdir -p /home/ymtech/ubuntu-livecd-10/amd64 • cp -av /mnt/ubuntu10/* /home/ymtech/ubuntu-livecd-10/amd64/ • cp -av /mnt/ubuntu10/.disk /home/ymtech/ubuntu-livecd-10/amd64/ • cp -av /mnt/ubuntu10/casper/initrd.lz /tftpboot/ubuntu-livecd-boot-10/amd64/ • cp -av /mnt/ubuntu10/casper/vmlinuz /tftpboot/ubuntu-livecd-boot-10/amd64/ • chmod 777 -R /tftpboot/ • vi /etc/exports/ (아래 내용 추가) • exportsfs –a (설정 적용) 16 /home/ymtech/ubuntu-livecd-10/amd64 *(ro,insecure,no_root_squash,async,no_subtree_check)
  • 17. 응용 설정 mybootmenu.cfg • vi /tftpboot/mybootmenu.cfg 17 menu hshift 12 menu width 49 menu margin 8 menu title My Customised Network Boot Menu include ubuntu-installer/amd64/boot-screens/stdmenu.cfg label Boot from the first HDD localboot 0 label Memory Tester kernel mt86plus label Live CD 64-bit(10.04) – 라이브 시디 kernel ubuntu-livecd-boot-10/amd64/vmlinuz append boot=casper netboot=nfs nfsroot=192.168.79.138:/home/ymtech/ubuntu-livecd-10/amd64 initrd=ubuntu-livecd-boot-10/amd64/initrd.lz -- splash quiet label Autoinstall ubuntu14.04(64-bit) – Automated Install kernel ubuntu-installer/amd64/linux append boot=casper netboot=nfs nfsroot=192.168.79.138:/home/ymtech/ubuntu-server/amd64 initrd=ubuntu-installer/amd64/initrd.gz auto=true url=http://192.168.79.138/preseed.cfg --
  • 18. 응용 설정 kickstart • apt-get install apache • vi /var/www/html/preseed.cfg 18 # Language setting 언어 설정 d-i debian-installer/language string en d-i debian-installer/country string US d-i debian-installer/locale string en_US.UTF-8 d-i localechooser/supported-locales en_US.UTF-8 # Keyboard setting 키보드 설정 d-i console-setup/ask_detect boolean false d-i console-setup/layoutcode string us d-i console-setup/charmap select UTF-8 d-i keymap select jp106 d-i keyboard-configuration/xkb-keymap select jp106 d-i keyboard-configuration/layoutcode string jp d-i keyboard-configuration/modelcode jp106 # Network setting 네트워크 설정 d-i netcfg/choose_interface select auto d-i netcfg/get_hostname string preseedexample d-i netcfg/get_domain string example.org # mirror 이미지 미러 설정 d-i mirror/country string manual d-i mirror/http/hostname string archive.ubuntu.com d-i mirror/http/directory string /ubuntu/ … … …

Notes de l'éditeur

  1. 안녕하세요 7월달 TechDay 발표를 맡게된 김주한 입니다. 이번 발표 주제는 원래는 SSH를 활용하여 장비 제어 및 정보 가져오기 였으나 이번에 X86 프로젝트를 진행하면서 좀더 알아두면 좋을거 같다고 생각한 주제를 발표하겠습니다. 이번 발표할 주제는 바로 PXE 부팅입니다.
  2. 일단 발표할 순서를 말씀 드리겠습니다. PXE 부팅에 대한 간단한 설명 구성, PXE 부팅의 흐름 각 설정 방법, 시연 그리고 간단한 응용까지 하고 질문을 받고 마무리 하는 것으로 하겠습니다.
  3. 이제 PXE에 대해서 이야기 해드리겠습니다. PXE는 사전 부팅 실행 환경으로서 즉 Pre-boot execution enviroment의 약자 입니다. PXE는 클라이언트/ 서버 인터페이스의 산업계 표준 입니다. 원격지에서 네트워크에 접속된 컴퓨터들을 구성하고 부팅 할 수 있게 도와줄 수 있습니다. PXE 코드는 대체로 컴퓨터의 롬 또는 클라이언트가 네트워트 서버와 통신 할 수 있게 해주는 부트 디스크 상에 넣어 전달 됨으로써 원격지에서 클라이언트 PC를 구성하거나 부팅 시킬 수 있습니다. 이 PXE 기술을 사용한다면 클라이언트 PC에 하드디스크나 운영체제가 없더라고 구동이 가능하고 또한 공급자에 독립적이기 때문에 새로운 컴퓨터를 손쉽게 네트워크에 추가 할 수 있습니다.
  4. 일단 보시다시피 구글 트렌트로 관심도를 살펴 보아도 PXE는 앞으로 성장하거나 계속 활황기를 맞이하는 기술은 아닙니다. 엄밀히 말하자면 클라우드 컴퓨팅같은 기술이 더 중요한 주제일수도 있습니다. 하지만 PXE는 분명히 활용이 있었던 기술이고 클라우드 PC와는 활용법이 다른점이 있기 때문에 알아두어서 나쁠것은 없다고 생각합니다. 이어서 유사 기술에 대해서 알아보도록 하겠습니다. 다음의 BINL과 BSDP는 각각 마이크로소프트사와 애플사의 PXE 와 같은 기술입니다. 다만 마이크로소프트사는 아예 새로히 만들지는 않았고 PXE를 확장해서 만들었다고 보시면 됩니다.
  5. 이 PXE 기술을 사용하는 좋은 예를 한국 시장에서 찾아 보자면 대표적으로 피시방이 있습니다. 예전에 일일히 손으로 시간을 재며 손님을 받다가 매니지먼트 프로그램으로 바뀌었고 지금은 아예 디스크를 각 피시에 놓지 않고 중앙에서 관리하는 방식으로 바뀌었습니다. 이 기술은 이 사업소개 페이지에서 보이듯이 PXE 기술을 사용했다고 합니다.
  6. 다음으로 PXE를 구성하는 요소들에 대해서 이야기 하겠습니다. 먼저 클라이언트가 있는데요 이 클라이언트에서 중요한것은 네트워크 인터페이스에서 PXE 부팅을 지원해야 한다는것 입니다. 요즘 웬만한 장비들은 지원 하는것으로 알려져 있습니다. 다음은 서버인데 DHCP 서버와 TFTP 입니다. DHCP에서는 클라이언트가 DHCP 요청시 TFTP 서버의 주소와 pxe 부팅에 필요한 파일 이름을 전달합니다. 그 다음 전달받은 주소와 파일이름을 통해 TFTP 서버에서 파일을 요청하고 해당 파일을 통해 부팅을 시작하게 됩니다.
  7. 여기에 그 흐름을 정리한 플로우 차트가 있습니다. 보시다 시피 PXE 클라이언트에서 DHCP 요청을 하면 보통의 DHCP에서는 IP 정보등만을 주지만 PXE가 설정된 DHCP에서는 TFTP 서버의 주소와 부팅에 필요한 file name을 요청하게 됩니다. 그렇게 전달받은 TFTP 서버의 주소로 클라이언트는 접속을 해서 파일을 요청하게 되고 NBP 즉 네트워크 붓 프로그램을 가동해 필요한 설정들을 로딩하고 이미지를 다운로드하기 시작합니다.
  8. 여기에 DHCP 설정을 간략히 정리해 보았습니다. 설치후 설정에 다음의 내용을 추가하고 재시작을하면 됩니다. 추가할 내용을 자세히 보시면 next-server와 filename을 보실수 있습니다. pxe 클라이언트에게 다음의 내용을 전달 하게 됩니다.
  9. TFTP는 많이들 사용하시니까 자세한 내용없이 넘어가도록 하겠습니다. 여기서 중요한건 TFTP의 경로를 설정하는 내용입니다.
  10. 다음은 ubuntu 이미지를 마운트하여 TFTP 서버의 경로에 필요 파일들을 복사하는 내용 입니다.
  11. 이미지를 받게 하기 위한 NFS 서버를 설치하고 아까 복사한 필요파일들의 경로를 지정하는 내용 입니다.
  12. syslinux를 설치하고 네트워크 부팅에 필요한 파일을 복사하는 내용입니다. (pxelinux.0) pxelinux.cfg/default 파일에 기본 부팅 설정을 넣고 그 안의 내용입니다.
  13. 부팅 메뉴 화면 입니다. 현재 설정을 통해서 보면 제목 메뉴별 라벨 메뉴별 실행 내용등을 담고 있는 것을 볼 수 있습니다.
  14. 이제부터 원격테스크톱을 통해서 제 컴퓨터에서 직접 시연을 진행하도록 하겠습니다. 미리 설정해놓은 PXE Server를 통해서 pxe client를 구동해 설치를 진행할 수 있는지 확인하겠습니다.
  15. 시연보인것 이외에도 설치뿐만 아니라 운영체제를 바로 가동 시키거나 설치시 설치 설정을 미리 작성하여 자동 설치를 진행할 수도 있습니다.
  16. 라이브 씨디용 설정