°Ô½Ã¹° 1,372°Ç
pxe ¿Í kickstart ÀÌ¿ëÇÏ¿© OS ÀÚµ¿¼³Ä¡
±Û¾´ÀÌ :
ÃÖ°í°ü¸®ÀÚ
³¯Â¥ : 2011-04-06 (¼ö) 13:58
Á¶È¸ : 11857
±ÛÁÖ¼Ò :
pxe ¿Í kickstart ÀÌ¿ëÇÏ¿© OS ÀÚµ¿¼³Ä¡Çϱâ
PXE ºÎÆÃÀ» ÀÌ¿ëÇÏ¿© CDµî ¾øÀÌ ¿ø°Ý¿¡¼ ÀÚµ¿À¸·Î ºÎÆÃÇÏ°í ¼³Ä¡´Â kickstart ¿Í ³×Æ®¿öÅ© ¼³Ä¡¸¦ ÀÌ¿ëÇÏ¿© ÀÚµ¿ÈÇÑ´Ù. kickstart ¸¦ ÀÌ¿ëÇÏ¿© ¼³Ä¡ÈÄ ÇÊ¿äÇÑ ÀÛ¾÷±îÁö ³Ö¾îµÎ¸é(post Ç׸ñ ÀÌ¿ë) Á»´õ Æí¸®ÇÑ ¼¹öÀÛ¾÷ÀÌ °¡´ÉÇÏ´Ù.
¿©±â¼´Â pxe, kickstart, nfs, dhcp, tftp ¼¹öµî¿¡ ´ëÇؼ´Â ¼³¸íÀ» ÇÏÁö ¾Ê°Ú´Ù.
2 »ç¿ë OS
RHEL ES 3.0 (RHEL 4.0 µµ µ¿ÀÏÇÔ) Cent OS 4.x
3 Âü°íÀÚ·á
Red Hat Enterprise Linux 3: System Administration Guide Chapter 14. PXE Network Installations de/ch-pxe.html...
4 Àüü¼¼Æüø¼
³×Æ®¿öÅ© ¼³Ä¡ÇÒ ¼¹ö¸¦ ¼¼ÆÃÇÕ´Ï´Ù. ÇѴ븸 ÀÖÀ¸¸é µË´Ï´Ù. ÀÌ ÇÑ´ëÀÇ ¼¹ö¿¡ nfs, dhcp, tftp ¼¹ö¸¦ ¿Ã·Á¼ ÀÌ¿ëÇÏ°Ú½À´Ï´Ù. nfs ´Â /export/centos µð·ºÅ丮¸¦ ÀÌ¿ëÇÏ´Â °ÍÀ¸·Î ¿¹Á¦»ïÀ½
³×Æ®¿öÅ© ¼³Ä¡ Áغñ : ³×Æ®¿öÅ© ¼³Ä¡¿ë nfs ¼¹ö ¼¼ÆÃÇÏ°í µ¥ÀÌŸ ¿Ã¸²
ÀÚµ¿¼³Ä¡ À§ÇÑ kickstart Áغñ : ¼³Á¤ÆÄÀÏÀ» kickstart¿¡ ³Ö¾îµÎ°í ³×Æ®¿öÅ©¸¦ ÅëÇÏ¿©(nfs, http µî) ÀÚµ¿¼³Ä¡Çϱâ À§ÇÔ
dhcp Áغñ : ip¸¦ ÀÚµ¿À¸·Î ÇÒ´çÇÏ°í ¿ø°ÝºÎÆýà ºÎÆ®À̹ÌÁö¸¦ ã¾ÆÁÖ´Â ¿ªÇÒÀ» ÇÔ
tftp ¼¹ö ¼¼Æà : pxe ¿ø°ÝºÎÆÃÀ» À§ÇÑ ÇÁ·Î±×·¥ÀÓ. dhcp¿¡¼ ip¸¦ ¹Þ°í tftp¿¡¼ ºÎÆÃÀ̹ÌÁö¸¦ ¹Þ¾Æ¿È.
pxe ÀÚµ¿¼³Ä¡ ¼¼Æà : tftp ¿¡¼ ÀÚµ¿À¸·Î ºÎÆÃÇÒ ¼ö ÀÖµµ·Ï ÁغñÇÏ°í ȸ鿡 Ãâ·ÂÇÏ´Â ¸Þ½ÃÁö¸¦ Á¶Á¤ÇÔ.
5 ³×Æ®¿öÅ© ¼³Ä¡Áغñ
rhel 4ÀåÀÇ cd ¿¡¼ ¸¶¿îÆ®ÇÏ¿© º¹»ç
mount /mnt/cdrom
cp -arv /mnt/cdrom/Redhat /export/centos
(
C entOSÀÏ °æ¿ì´Â µð·ºÅ丮°¡ redhatÀÌ ¾Æ´Ñ
C entOs)
cp /mnt/cdrom/RELEASE-NOTES*.html /export/centos
pxe ºÎÆÃÀ» ÀÌ¿ëÇÒ °æ¿ì¿¡´Â ù¹ø° CDÀÇ images µð·ºÅ丮°¡ ÇÊ¿äÇϹǷΠÃß°¡·Î ÀÌ µð·ºÅ丮µµ º¹»çÇØÁÖ¾î¾ßÇÑ´Ù.
cp -arv /mnt/cdrom/images /export/centos
iso À̹ÌÁö¸¦ ÀÌ¿ëÇÏ¸é ´õ °£ÆíÇÏ´Ù. ¾Æ·¡¿Í °°Àº ÇüŸ¦ ÀÌ¿ëÇÏ¸é µÈ´Ù.
mount -o loop CD1.iso /location/of/disk/space/disc1/
cd /root/iso
mount -o loop CentOS-4.3-i386-bin1of4.iso /export/centos/disc1
mount -o loop CentOS-4.3-i386-bin2of4.iso /export/centos/disc2
mount -o loop CentOS-4.3-i386-bin3of4.iso /export/centos/disc3
mount -o loop CentOS-4.3-i386-bin4of4.iso /export/centos/disc4
±×·±µ¥ NFS¸¦ ÀÌ¿ëÇÏ´Â °æ¿ì ISO À̹ÌÁö¸¦ NFS ¼³Ä¡µð·ºÅ丮¿¡ º¹»çÇصθé ÈξÀ ´õ °£ÆíÇÏ´Ù. À§¿¡¼ /export/centos/ ¿¡ iso À̹ÌÁö ³×ÀåÀ» ³Ö¾îµÎ°í ¼³Ä¡½Ã ÀÌ µð·ºÅ丮¸¦ ÁöÁ¤ÇÏ¸é µÈ´Ù. ±×·¸Áö¸¸ ¾Æ·¡¿¡¼ pxe ºÎÆÃÀ» ¼¼ÆÃÇÒ¶§ À̹ÌÁöÆÄÀÏ, Ä¿³ÎµîÀ» º¹»çÇؾßÇϱ⶧¹®¿¡ ƯÁ¤ µð·ºÅ丮·Î ¸ô¾Æ³Ö´Â °ÍÀÌ ÁÁ´Ù. loop ·Î mount ÇÑ °ÍÀÌ nfs¿¡¼´Â º¸ÀÌÁö ¾Ê´Â ¹®Á¦µµ ÀÖ´Ù. ÀÌÀ¯´Â???
³×Æ®¿öÅ©¼³Ä¡¸¦ ÇÏ·Á¸é ¼³Ä¡½Ã askmethod ¿É¼ÇÀ» ÀÌ¿ëÇÏ¸é µÈ´Ù.
linux askmethod
¼³Ä¡¿¡ ÁöÁ¤ÇÏ´Â µð·ºÅ丮´Â
RedHat / (¶Ç´Â
C entOS) ¹èÆ÷ µð·ºÅ丮¸¦ Æ÷ÇÔÇÏÁö ¾Ê°í ÀÌ µð·ºÅ丮±îÁö¿¡ À̸£´Â ÇϺΠµð·ºÅ丮µéÀ» ÀǹÌÇÕ´Ï´Ù. ¿¹¸¦ µé¾î Red Hat Enterprise Linux 4 ¼³Ä¡ ÆÄÀÏÀÌ ¼³Ä¡ ¼¹ö¿¡¼ /export/rhel/¿¡ À§Ä¡ÇÑ´Ù¸é, /location/of/disk/space/´Â /export/rhel/ÀÌ µË´Ï´Ù. ¹Ì·¯ÇÑ »çÀÌÆ®ÀÇ °æ¿ì centos/4.4/os/i386/ °¡ µÉ °ÍÀÔ´Ï´Ù. centos ¾ÕÀÇ µð·ºÅ丮´Â ¹Ì·¯ÇÑ µð·ºÅ丮¿¡ µû¶ó ´Ù¸£°ÚÁö¿ä.
6 kickstart Áغñ°úÁ¤
¼³Ä¡´Â nfs¸¦ ÀÌ¿ë. ¾Æ·¡¿¡¼ ¼³Ä¡¹æ¹ýÀº nfs ¸¦ ÀÌ¿ëÇÏ°í ÀÖÀ¸¸ç server, dir¸¸ ¼³Á¤¿¡ µû¶ó Á¶Á¤ÇÏ¸é µÈ´Ù. X-windows ¼³Á¤Àº Á¦¿ÜÇÏ¿´´Ù. network´Â dhcp ÀÌ¿ë. °íÁ¤ ip¸¦ µî·ÏÇسõ°í ºÎÆÃÈÄ ¹Ù²Ù¾îµµ µÈ´Ù. root ºñ¹Ð¹øÈ£´Â ¾ÏÈ£ÈÇؼ ÀúÀåÇÔ. ÆÄƼ¼ÇºÎºÐÀº ½Ã½ºÅÛ¸¶´Ù ´Ù¸¦ ¼ö ÀÖÀ¸¹Ç·Î ÁÖ¼®Ã³¸®ÇÏ¸é ¼³Ä¡½Ã ¹°¾îº½. ¾Æ·¡´Â sda ¿¡¼ ext3 ·Î /boot 100M¸¦ ¸¸µé°í ³ª¸ÓÁö °ø°£À» ¹°¸®Àû º¼·ý, º¼·ý ±×·ìÀ¸·Î ÇÒ´çÇÑÈÄ ·ÎÁöÄà º¼·ýÀ¸·Î swap 256M , ³ª¸ÓÁö °ø°£ / ·Î ÇÒ´çÇÑ´Ù. ÆÐÅ°Áö ¸ñ·ÏÀº admin-tools, editors(vi¶§¹®¿¡ ÇÊ¿ä), x À©µµ¿ì °ü·ÃÇÏ¿© base-x ¿Í gnone-desktop (¼¹ö¿î¿µÇÒ ¸ñÀûÀ̶ó¸é x´Â »©µµ µÊ), legacy-software-development (ÀÌÀü ¹öÀü°úÀÇ È£È¯¼ºÀ» À§ÇØ ÇÊ¿ä), development-tools (°³¹ßÀ» À§ÇØ ÇÊ¿ä. gcc µî) µîÀ» ¼±ÅÃÇÏ¿´´Ù.
¼¹ö¿ëÀ̶ó¸é ¾Æ·¡ÀÇ ±×·ì°ú ÆÐÅ°Áö¸¸ ¼±ÅÃÇصµ µÉ °ÍÀÌ´Ù.
¼³Ä¡ÆÐÅ°Áö±×·ì admin-tools editors development-tools
Ãß°¡ ÆÐÅ°Áö vsftpd (mysql-server) (httpd) (php) (php-mysql) sysstat mc
post´Â ¼³Ä¡ÈÄ ÀÛ¾÷ÇÏ´Â ½ºÅ©¸³Æ®ÀÌ¸ç ºÒÇÊ¿äÇÑ ¼ºñ½º¸¦ ÀÚµ¿À¸·Î ³»¸®´Â ¿ªÇÒÀ» ÇÑ´Ù. nameser¸¦ ÁöÁ¤ÇÏ°í ssh Å°¸¦ °¡Á®¿À´Â ºÎºÐÀÌ ÀÖ´Ù. psot´Â chroot ȯ°æ¿¡¼ ÀÛµ¿À» Çϸç ÀÌ »óÅ¿¡¼´Â ¾ÆÁ÷ dnsÁ¤º¸¸¦ °¡Áö°í ÀÖÁö ¾Ê´Ù. ±×·¡¼ ÄÚ³ÝÀÇ dns¸¦ ÁöÁ¤ÇÏ°í /root/.ssh µð·ºÅ丮¸¦ ¸¸µçÈÄ cent.tunelinux.pe.kr ¼¹öÀÇ root °èÁ¤ÀÇ °ø°³Å°¸¦ º¹»çÇÏ¿© cent.tunelinux.pe.kr ¼¹ö¿¡¼ root·Î ÀÚµ¿·Î±×ÀÎÇϵµ·Ï ÇÑ °ÍÀÌ´Ù. Ãʱâ ÀÛ¾÷Àº root ±ÇÇÑÀÌ ¸¹ÀÌ ÇÊ¿äÇѵ¥ Á»´õ Æí¾ÈÇÏ°Ô ÀÛ¾÷À» ÇÒ ¼ö ÀÖµµ·Ï ÇØ ³õÀº °ÍÀÌ´Ù.
# Kickstart file automatically generated by anaconda.
install
nfs --server=192.168.202.100 --dir=/home/taejun/iso
lang ko_KR.UTF-8
langsupport --default=en_US.UTF-8 en_US.UTF-8 ko_KR.UTF-8
keyboard us
#xconfig --card "VMWare" --videoram 16384 --hsync 31.5-37.9 --vsync 50-70 --resolution 800x600 --depth 16 --startxonboot --defaultdesktop gnome
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$Q.jKpF0a$lxii4oW6QbxBRdIGZhxty1
firewall --disabled
selinux --disabled
authconfig --enableshadow --enablemd5
timezone Asia/Seoul
bootloader --location=mbr --append="rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --all --drives=sda
part /boot --fstype ext3 --size=100 --ondisk=sda
part pv.2 --size=0 --grow --ondisk=sda
volgroup VolGroup00 --pesize=32768 pv.2
logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=256 --grow --maxsize=512
logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
%packages
@ admin-tools
@ editors
@ gnome-desktop
@ ftp-server
@ network-server
@ legacy-software-development
@ base-x
@ development-tools
%post
#!/bin/bash
for target in `ls /etc/init.d/ /etc/xinetd.d/ | egrep -v "/etc/init.d|/etc/xinetd.d" | egrep -v "rpmsave|rpmnew" | egrep -v 'auth|functions|halt|killall|single'`
do
/sbin/chkconfig --level 345 $target off
done
SERVICE="crond irqbalance network sshd syslog sysstat vsftpd xinetd"
/sbin/chkconfig --level 345 auth off
for service_target in $SERVICE
do
/sbin/chkconfig --level 345 $service_target on
done
echo "nameserver 168.126.63.1" > /etc/resolv.conf
cd /root
mkdir .ssh
cd .ssh
wget http://cent.tunelinux.pe.kr/authorized_keys
chmod 600 authorized_keys
# yum -y install system-config-kickstart
# system-config-kickstart
¼³Ä¡½Ã ¾Æ·¡¿Í °°ÀÌ ½ÇÇàÀ» ÇÏ¸é µÈ´Ù.
linux ks=nfs:192.168.202.100:/home/taejun/iso/ks.cfg
Âü°í·Î Çϵå¿þ¾îÀÇ Æ¯¼ºÀ¸·Î ƯÁ¤ µå¶óÀ̹ö°¡ ÇÊ¿äÇÒ °æ¿ì¿¡´Â µå¶óÀ̹öµµ ³×Æ®¿öÅ©¸¦ ÅëÇÏ¿© ¹ÞÀ» ¼ö ÀÖ´Ù. ÀÌ °æ¿ì´Â ¼³Ä¡¸Å´º¾ó¿¡¼ ºÎÆÿɼÇÀ» Âü°íÇϱ⠹ٶõ´Ù.
Intel Server Board S 5000VSA ÀÇ SAS RAID(megasr) ¸ðµâ Ãß°¡Çϱâ (20080716-À̵·Çö »ðÀÔ)
µå¶óÀ̹ö ´Ù¿î·Îµå
À̹ÌÁö ÆÄÀÏ(megasr-09.32.0207.2008-1-rhel40-u6-all.img)À» À¥¼¹ö¿¡ ¾÷·Îµå
/tftpboot/linux-install/pxelinux.cfg/default ÆÄÀÏ¿¡ dd=http://my .... ºÎºÐ Ãß°¡ label c64ss144
kernel centos64/vmlinuz
append initrd=centos64/initrd.img ramdisk_size=9216 text ks=http://mydomain.com/ks/c64ss144.cfg dd=http://mydomain.com/module/megasr-09.32.0207.2008-1-
rhel40-u6-all.img
¼³Á¤¿¡¼ ³×ÀÓ¼¹ö¸¦ Æ÷ÇÔÇÏ¿© °íÁ¤ip·Î ÇÏ¿´´Ù¸é %post ¼½¼Ç¿¡¼ ip ÁÖ¼Ò¸¦ ÁúÀÇÇÒ ¼ö ÀÖÁö¸¸ dhcp·Î ¼³Á¤À» ÇÑ °æ¿ì¿¡´Â /etc/resole.conf ÆÄÀÏÀÌ »ý¼ºµÇÁö ¾ÊÀº »óÅÂÀ̹ǷΠ½ºÅ©¸³Æ®¿¡¼ ´Ù¸¥ ¼¹ö¿¡ Á¢¼ÓÇÒ ÀÏÀÌ ÀÖ´Ù¸é ip·Î ÁúÀǸ¦ ÇؾßÇÑ´Ù.
7 nfs ¼¼ÆÃ
# cat /etc/exports
/export/centos 192.168.202.0/24(ro,insecure)
º¸¾ÈÀ» À§Çؼ´Â Á¢±ÙÇÒ ip, host¸¦ Á¦ÇÑÇÏ´Â °ÍÀÌ ÁÁ´Ù.
/etc/init.d/portmap start
/etc/init.d/nfs start
¾Æ·¡¿Í °°Àº ½ÄÀ¸·Î Å×½ºÆÃÀ» Çغ»´Ù.
mount -t nfs 192.168.202.100:/export/centos /tmp/test
8 dhcp
¼¹öÇÁ·Î±×·¥¼³Ä¡
# yum -y install dhcp
# /etc/init.d/dhpcd start
dhcp ¼³Á¤ÆÄÀÏÀº /etc/dhcpd.conf ÀÌ´Ù. Ãʱ⿡´Â ÁÖ¼®°ú ÇÔ²² ³»¿ëÀÌ ºñ¾îÀÖ´Ù. /usr/share/doc/dhcp*/dhcpd.conf.sample ÀÇ ³»¿ëÀ» º¹»çÇÏ¿© ÀûÀýÈ÷ ¼öÁ¤ÇÏ¸é µÈ´Ù.
# cp /usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcpd.conf
[root@mytest etc]# diff /usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcpd.conf
4c4
< subnet 192.168.0.0 netmask 255.255.255.0 {
---
> subnet 192.168.202.0 netmask 255.255.255.0 {
7c7
< option routers 192.168.0.1;
---
> option routers 192.168.202.2;
12c12
< option domain-name-servers 192.168.1.1;
---
> option domain-name-servers 192.168.202.2;
21c21
< range dynamic-bootp 192.168.0.128 192.168.0.254;
---
> range dynamic-bootp 192.168.202.200 192.168.202.210;
subnet, netmask, routers, domain-name-servers, ip ´ë¿ª Á¤µµ¸¸ ¼öÁ¤Çصµ Àß µ¿ÀÛÇÑ´Ù.
dhcp ¼¹ö¸¦ ¼³Ä¡Çϸé /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample ÀÇ ÆÄÀÏÀ» Âü°í·Î Çؼ /etc/dhcpd.conf ¸¦ ¸¸µé¾îÁÖ¸é µÈ´Ù.
¿©±â¼ ¼öÁ¤ÇØÁÙ Ç׸ñÀº subnet, netmask, routers (±âº» °ÔÀÌÆ®¿þÀÌ), range dynamic-bootp (dhcp·Î ¾µ ip ´ë¿ªÀ» ¼¼ºÎÀûÀ¸·Î ³ª´®) ÀÌ ÆÄÀÏ¿¡¼ ¾Æ·¡ ºÎºÐÀ» Ãß°¡ÇØÁÖ¸é µÈ´Ù.
allow booting;
allow bootp;
class "pxeclients" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
next-server <server-ip>;
filename "linux-install/pxelinux.0";
}
server-ip ´Â tftp ¼¹öÀÇ ip¸¦ ¸»ÇÏ¸ç º°µµÀÇ ¼¹ö¸¦ ¾²Áö ¾Ê´Â´Ù¸é ÇöÀç ¼¼ÆÃÇÏ´Â ¼¹öÀÏ °ÍÀÌ´Ù.
9 ÀÚµ¿¼³Ä¡ ¼¼ÆÃ
system-config-netboot ¸¦ ÀÌ¿ëÇÏ¿© ¼¼ÆÃÇÏ°ÚÀ½ »ó¼¼ ³»¿ëÀº Âü°íÀڷḦ ÀÌ¿ëÇÔ. ÀÌ ÇÁ·Î±×·¥À» ½ÇÇàÇÏ°í ³×Æ®¿öÅ© ¼³Ä¡¸¦ °ñ¶ó¼ 1Â÷ ÁøÇàÇÔ.
ÀÌ È¸é¿¡¼ Operating system identifier ¿¡ Àû´çÇÑ À̸§À» ÀÔ·ÂÇÏ°í ÇÊ¿ä¿¡ µû¶ó ű½ºÅ¸Æ® ÆÄÀÏÀ̸§À» Àû°í ÇÁ·ÎÅäÄÝ, ¼¹ö ip ÁÖ¼Ò¿Í À§Ä¡¸¦ ÁöÁ¤Çϸé ÇØ´ç ip¿Í À§Ä¡¿¡¼ ºÎÆÿ¡ ÇÊ¿äÇÑ ÆÄÀÏÀ» °¡Á®¿Í /tftpboo/linux-install/Operating system identifier ¿¡ initrd.img vmlinuz ¸¦ º¹»çÇÑ´Ù. ¿©±â¼ Operating system identifier ¿¡´Â cent ¸¦ ³Ö¾ú´Ù°í ÇÏ°í ÁøÇà. (ÇѱÛȸéÀÏ °æ¿ì¿¡´Â ¼³Á¤-³×Æ®¿öÅ© ¼³Ä¡)
PXE Boot Configuration
Adding PXE Hosts
ÀÌ·¸°Ô ÁøÇàÇÏ¸é ¿©·¯°¡Áö µð·ºÅ丮¿Í ÆÄÀÏÀ» ¼Õ´í´Ù.
/tftpboot/linux-install/centos µð·ºÅ丮¸¦ »ý¼ºÇÏ°í ºÎÆðü·ÃÇÑ ÆÄÀÏÀ» º¹»çÇÔ. /tftpboot/linux-install/pxelinux.cfg µð·ºÅ丮¿¡ default, pxeos.xml ÆÄÀÏ »ý¼ºÇÏ¸ç ¿©±â¼ pxeos.xmlÀº ¼³Á¤³»¿ëÀ» ÀúÀåÇÏ°í ÀÖ°í default °¡ ºÎÆÃµÇ°í³ª¼ÀÇ ¿É¼ÇÀ» Á¤ÇÔ. /tftpboot/linux-install/msgs ÆÄÀÏ¿¡ ÇØ´ç OS Ãß°¡
msgs:
ÇÕ°è 24
--rw-r--r-- 1 root root 507 12¿ù 18 22:18 boot.msg
+-rw-r--r-- 1 root root 531 12¿ù 18 22:19 boot.msg
-rw-r--r-- 1 root root 668 9¿ù 1 03:35 expert.msg
-rw-r--r-- 1 root root 871 9¿ù 1 03:35 general.msg
-rw-r--r-- 1 root root 860 9¿ù 1 03:35 param.msg
@@ -11,4 +11,12 @@
-rw-r--r-- 1 root root 545 9¿ù 1 03:35 snake.msg
pxelinux.cfg:
-ÇÕ°è 0
+ÇÕ°è 8
+-rw-r--r-- 1 root root 356 12¿ù 18 22:19 default
+-rw-r--r-- 1 root root 247 12¿ù 18 22:19 pxeos.xml
+
+centos:
+ÇÕ°è 3368
+-rw-r--r-- 1 root root 2535139 12¿ù 18 22:19 initrd.img
+-rw-r--r-- 1 root root 77 12¿ù 18 22:19 ks.cfg
+-rw-r--r-- 1 root root 900120 12¿ù 18 22:19 vmlinuz
# cat pxelinux.cfg/default
....
label 1
kernel centos/vmlinuz
append initrd=centos/initrd.img ramdisk_size=7000 ks=nfs:192.168.40.11:/export/centos/ks222.cfg
[root@localhost pxelinux.cfg]# cat pxeos.xml
<?xml version="1.0" ?>
<OperatingSystems>
<OS Anonymous="1" Description="rhel3 es " Diskless="0" Kernel="" Kickstart="nfs:192.168.40.11:/export/centos/ks222.cfg" Location="/export/centos"
Name="centos" Password="" Protocol="NFS" Server="192.168.40.11" User=""/>
¿©±â¼ ¼³Á¤ÇÏ´Â kickstart ÆÄÀϵµ ¿ø°Ý¿¡¼ ÀÌ¿ëÇÒ ¼ö ÀÖÀ¸¹Ç·Î nfs:192.168.40.11:/export/centos/ks222.cfg ¿Í °°ÀÌ ÁöÁ¤Çϸé Æí¸®ÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ´Ù.
ÀÌÁ¦ ƯÁ¤ ³×Æ®¿öÅ© ¶Ç´Â ip¿Í ¾Õ¿¡¼ Á¤ÀÇÇÑ os¸¦ ¿¬°á½ÃÄÑÁÖ´Â ÀÛ¾÷À» ÇØ¾ß ÇÑ´Ù.
¿©±â¼ È£½ºÆ®¸í¿¡ 192.168.40.0 À̶ó°í ³ÖÀ¸¸é ÇØ´ç ³×Æ®¿öÅ© ´ë¿ªÀ» ¸ðµÎ Æ÷ÇÔÇÏ´Â °ÍÀÌ´Ù. (c Ŭ·¡½º)
¿©±â¼µµ ű½ºÅ¸Æ®ÆÄÀÏÀ» ³Ö¾îÁÖ´Â °ÍÀÌ ÀÖ´Ù. ±×·¯³ª ¿©±â ³Ö¾îÁØ´Ù°í ¹Ù·Î ÀÛµ¿ÇÏÁö ¾Ê´Â´Ù. /tftp/linux-install/pxelinux.cfg/ µð·ºÅ丮¿¡ ¾Æ·¡¿Í °°Àº ³»¿ëÀÌ »ý±â´Âµ¥ ÀÌ°ÍÀ» Âü°í·Î Çؼ À§ÀÇ default ÆÄÀÏÀ» ¼öÁ¤ÇØÁÖµçÁö ÇÏ¸é µÈ´Ù. pxelinux.0 ÇÁ·Î±×·¥¿¡¼ ¼³Á¤ÆÄÀÏÀ» ÀÐÀ»¶§ °¡Àå ¸ÕÀú ã´Â°ÍÀ» ÀÌ¿ëÇÑ´Ù. Ŭ¶óÀ̾ðÆ®ÀÇ ip¸¦ °¡Áö°í 10Áø¼ö¸¦ 16Áø¼ö·Î ¹Ù²Ù¾î ÀÌ¿¡ ÇØ´çÇÏ´Â ÆÄÀϸíÀ» ã´Â´Ù. ¿¹¸¦ µé¾î 192.168.0.11 Àº
C 0A8000B ÀÌ´Ù. ÇØ´çÆÄÀÏÀÌ ¾øÀ¸¸é default ÆÄÀÏÀ» Àд´Ù. ÀϹÝÀûÀ¸·Î ¿©·¯´ëÀÇ ¼¹ö¿¡ ¼³Ä¡¸¦ ÇÒ °æ¿ì¿¡´Â ÀÌ ¹æ½ÄÀ» ¾µ ÇÊ¿ä´Â ¾ø°í default ÆÄÀÏÀ» Á¶Á¤ÇÏ¿© °°Àº ¹öÀüÀ̶ó°í ÇÏ´õ¶óµµ kickstart ÆÄÀϸ¸ ¿©·¯°³ ÁöÁ¤ÇÏ¿© ÀÌ¿ëÇϵµ·Ï ÇÏ¸é µÉ °ÍÀÌ´Ù.
# cat C0A82800
default centos
label centos
kernel centos/vmlinuz
append initrd=centos/initrd.img ramdisk_size=7000 ks=http://lx03.tunelinux.pe.kr/ks.cfg
¸í·ÉÇà¿¡¼´Â pxeboot ¶ó´Â ¸í·ÉÀ» ÀÌ¿ëÇÒ ¼ö Àִµ¥ ·¹µåÇÞ¿¡¼ Æí¸®ÇÏ°Ô ¸¸µé¾î³õÀº µí ÇÏ´Ù.
/tftp/linux-install/msgs µð·ºÅ丮´Â ºÎÆÃÈÄ È¸é¿¡ »Ñ·ÁÁִ ȸéÀ̸ç ÇØ´ç ÆÄÀÏÀ» ¸¶À½´ë·Î ¼öÁ¤Çصµ µÈ´Ù. ´ÜÁö »Ñ·ÁÁÖ´Â ºÎºÐÀ̹ǷÎ. ±×·¸Áö¸¸ labelÀº default ÆÄÀÏ¿¡¼ Á¶Á¤ÇÏ´Â °ÍÀ̹ǷΠÇÔ²² ¸ÂÃß¾îÁÖ¾î¾ß ÇÑ´Ù.
±»ÀÌ À§ÀÇ ÅøÀ» ¾²Áö ¾Ê´Â´Ù¸é /tftpboot/linux-install ¿¡ ÇØ´ç os¸í µð·ºÅ丮¸¦ ¸¸µé¾î initrd ¿Í ºÎÆÿë Ä¿³ÎÀ» º¹»çÇÏ°í default ÆÄÀÏÀ» ¼öÁ¤ÇÑÈÄ (ks ÆÄÀÏ ÁöÁ¤µî) ºÎÆÃÇÒ ¶§ °í¸£±â ÆíÇϵµ·Ï msgs ÆÄÀÏ¿¡ ³»¿ëÀ» ³Ö¾îÁÖ¸é µÈ´Ù.
10 ÀÚµ¿¼³Ä¡ÀÇ ÀÌ·ÐÀû ³»¿ë
pxe °¡ È°¼ºÈ°¡ µÇ¸é dhcp¸¦ ÅëÇÏ¿© óÀ½ ip¸¦ ºÎ¿©¹Þ°í next-server ¿¡¼ ÁöÁ¤ÇÑ tftp ¼¹ö¿¡¼ filename ¿¡ ÁöÁ¤ÇÑ ÇÁ·Î±×·¥À¸·Î ºÎÆÃÀ» ÇÑ´Ù.
pxelinux.0 ÇÁ·Î±×·¥À» ÀÌ¿ëÇÏ¿© default ÆÄÀÏÀ» Àоî ÇÊ¿äÇÑ Ä¿³Î·Î ºÎÆÃÀ» ÇÑ´Ù.
pxe, dhcp, tftp ¸¦ ÀÌ¿ëÇÏ´Â ¹æ½ÄÀº À©µµ¿ìÁîµµ µ¿ÀÏÇÏ´Ù.
11 tftp ¼¹ö ½ÃÀÛ
/sbin/chkconfig --level 345 xinetd on
/sbin/chkconfig --level 345 tftp on
ÀÌ·¸°ÔÇÏ°í xinetd ¸¦ ½ÃÀÛÇØÁØ´Ù.
service xinetd restart
¼³Ä¡ÇÏ¿© Å×½ºÆÃÀ» Çغ»´Ù.
12 Âü°í
À§¿Í °°ÀÌ ÇÏ¿© ¸ðµç Å×½ºÆÃÀ» ¸¶ÃÆ´Ù¸é Àڱ⠻óȲ¿¡ ¸Â°Ô Á¶ÀýÇÏ¿© »ç¿ëÇÏÀÚ. À§¿¡¼ OS¹öÀüº°·Î ±¸ºÐÇÒ ¼öµµ ÀÖ°í À¥, ¸ÞÀÏ µî ¼¹öÀÇ ±â´É¿¡ µû¶ó ºÐ¸®ÇÒ ¼öµµ ÀÖ´Ù. OS¹öÀü¿¡ µû¶ó¼ Á¶Á¤À» ÇÏ°í kickstart ÆÄÀÏÀ» Á¶Á¤ÇÏ¿© ¼¼ºÎ ¼¼ÆÃÀ» Çϸé Æí¸®ÇÏ°Ô ÀÌ¿ëÀÌ °¡´ÉÇÏ´Ù.
¿©±â¼ Á» ´õ ³ª°£´Ù¸é »õ·Î¿î ¼¹ö¸¦ Ãß°¡Çϰųª »èÁ¦ÇÏ´Â °æ¿ì ¼¹öµî·Ï, dns µî·Ï, ip ºÎ¿©µîÀ» ÀÚµ¿À¸·Î ÇÏ´Â ½ºÅ©¸³Æ®µîÀ» ¸¸µé¾î¼ ÀÌ¿ëÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
¼³Ä¡´Â ÀÌ·¸°Ô ÀÚµ¿È¸¦ ÇÏ°í ÀÌÈÄ ½Ã½ºÅÛ¼³Á¤Àº cfengine À» ÀÌ¿ëÇÏ¿©º¸ÀÚ.
13 Âü°í : system rescue cd Å×½ºÆÃ
http://www.systemrescuecd.org/ http://tunelinux.pe.kr/zboard/view.php?id=tip&no=42 systemrescuecd ´Â °£´ÜÈ÷ ¸»ÇØ ¸®´ª½º¿ë °í½ºÆ®ÇÁ·Î±×·¥À¸·Î »ý°¢ÇÏ¸é µÇ¸ç ½Ã½ºÅÛ¿¡ ¹®Á¦°¡ ¹ß»ýÇÏ¿´À» °æ¿ì cd¿¡¼ ºÎÆÃÇØ ÀÛ¾÷ÇÒ ¼ö ÀÖ´Â ÇÁ·Î±×·¥ÀÌ°í partimage ¸¦ ÀÌ¿ëÇÏ¿© ÆÄƼ¼ÇÀ» ´Ù¸¥ °÷À¸·Î ¿Å±â°Å³ª º¹±¸ÇÒ ¼ö ÀÖ´Ù. ÀÌ cd¸¦ ´Ù¿î·Îµå¹Þ¾Æ pxe·Î ºÎÆõǴ °ÍÀ» È®ÀÎÇغ¸¾Ò´Ù. systemrescuecd ´Â Á¨Åõ±â¹ÝÀÌ¸ç ¶óÀ̺êcd°°Àº°ÍÀ» »ý°¢ÇÏ¸é µÈ´Ù. Knoppix µî ´Ù¸¥ ¹èÆ÷Æǵµ µ¿ÀÏÇÏ°Ô ÀÛ¾÷À» ÇÒ ¼ö ÀÖÀ¸¸®¶ó ¿¹»óÀÌ µÈ´Ù.
# mount -o loop ~test/systemrescuecd-x86-0.2.15.iso /mnt/floppy/
# cp /mnt/floppy/isolinux/vmlinuz1 /mnt/floppy/isolinux/initrd1 /tftpboot/linux-install/rescue/
Ä¿³Î°ú initrd ÆÄÀÏÀ» º¹»çÇØÁØ°ÍÀÌ´Ù.
# cat /tftpboot/linux-install/pxelinux.cfg/default
label 3
kernel rescue/vmlinuz1
append initrd=/rescue/initrd1 acpi=off root=/dev/ram0 init=/linuxrc dokeymap vga=785
À§¿Í °°ÀÌ Ãß°¡ÇØÁÖ¾ú´Ù.
À§ÀÇ ³»¿ëÀº ¾Æ·¡ isolinux ¿¡¼ ºÎÆÿ¡ °ü·ÃµÈ ÆÄÀÏ¿¡¼ Á¤º¸¸¦ È®ÀÎÇÑ °ÍÀÌ´Ù. ´Þ¶óÁø°ÍÀÌ ÀÖ´Ù¸é ¿ì¸®°¡ rescue µð·ºÅ丮¸¦ ±âÁØÀ¸·Î Çϱ⠶§¹®¿¡ ÀÌ ºÎºÐ¸¸ ´Þ¶óÁ³´Ù.
# cat /mnt/floppy/isolinux/isolinux.cfg
ÀÌ·¸°Ô Çؼ ºÎÆÃÀ» Çϸé systemrescuecd ¿¡¼ ºÎÆÃÀ» ÇÒ ¼ö ÀÖ´Ù.
ºÎÆýô 3¹øÀ» °ñ¶ó¾ßÇϸç msg ÆÄÀϵµ ¼öÁ¤À» ÇØ¾ß ÆíÇÒ °ÍÀÌ´Ù.