ks.cfg ÆÄÀÏÀÌ ±¸¹® ºÐ¼®µÈ ÈÄ Áï½Ã ½Ã½ºÅÛ¿¡¼ ½ÇÇàµÉ ¸í·ÉÀ» Ãß°¡ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. ÀÌ ºÎºÐÀº ¹Ýµå½Ã ű½ºÅ¸Æ® ÆÄÀÏÀÇ (¸í·É¾î ºÎºÐ ´ÙÀ½) ¸¶Áö¸· ºÎºÐ¿¡ À§Ä¡ÇØ¾ß Çϸç, %pre ¸í·É¾î·Î ½ÃÀÛÇØ¾ß ÇÕ´Ï´Ù. %pre ¼½¼Ç¿¡¼ ³×Æ®¿öÅ©¿¡ Á¢¼ÓÇÏ½Ç ¼ö ÀÖÁö¸¸ ÀÌ ½ÃÁ¡¿¡¼ ³×ÀÓ ¼ºñ½º (name service)°¡ ¼³Á¤µÇÁö ¾Ê¾Ò±â ¶§¹®¿¡ ¿ÀÁ÷ IP ÁÖ¼Ò¸¸ ÀÛµ¿ÇÒ °ÍÀÔ´Ï´Ù.
¾Ë¸² | |
---|---|
¼³Ä¡Àü ½ºÅ©¸³Æ®´Â chroot (change root) ȯ°æ¿¡¼ ½ÇÇàµÇÁö ¾Ê½À´Ï´Ù. |
´Ù¸¥ ½ºÅ©¸³Æà ¾ð¾î (¿¹, Python)¸¦ ÁöÁ¤ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. /usr/bin/python ºÎºÐÀ» ¿øÇϽô ½ºÅ©¸³Æà ¾ð¾î·Î ±³Ã¼ÇØ ÁֽʽÿÀ.
´ÙÀ½Àº %pre ¼½¼ÇÀÇ ¿¹ÀÔ´Ï´Ù:
%pre #!/bin/sh hds="" mymedia="" for file in /proc/ide/h* do mymedia=`cat $file/media` if [ $mymedia == "disk" ] ; then hds="$hds `basename $file`" fi done set $hds numhd=`echo $#` drive1=`echo $hds | cut -d' ' -f1` drive2=`echo $hds | cut -d' ' -f2` #Write out partition scheme based on whether there are 1 or 2 hard drives if [ $numhd == "2" ] ; then #2 drives echo "#partitioning scheme generated in %pre for 2 drives" > /tmp/part-include echo "clearpart --all" >> /tmp/part-include echo "part /boot --fstype ext3 --size 75 --ondisk hda" >> /tmp/part-include echo "part / --fstype ext3 --size 1 --grow --ondisk hda" >> /tmp/part-include echo "part swap --recommended --ondisk $drive1" >> /tmp/part-include echo "part /home --fstype ext3 --size 1 --grow --ondisk hdb" >> /tmp/part-include else #1 drive echo "#partitioning scheme generated in %pre for 1 drive" > /tmp/part-include echo "clearpart --all" >> /tmp/part-include echo "part /boot --fstype ext3 --size 75" >> /tmp/part-includ echo "part swap --recommended" >> /tmp/part-include echo "part / --fstype ext3 --size 2048" >> /tmp/part-include echo "part /home --fstype ext3 --size 2048 --grow" >> /tmp/part-include fi |
ÀÌ ½ºÅ©¸³Æ®´Â ½Ã½ºÅÛ¿¡ ¼ÓÇÑ ÇÏµå µå¶óÀ̺êÀÇ ¼ýÀÚ¸¦ ¾Ë¾Æ³½ ÈÄ µå¶óÀ̺갡 ÇÑ °³ÀÎÁö µÎ °³ÀÎÁö ¿©ºÎ¿¡ µû¶ó¼ ´Ù¸¥ ÆÄƼ¼Ç ºÐÇÒ ½ºÅ°¸¶¸¦ »ç¿ëÇÏ¿© ÅؽºÆ® ÆÄÀÏÀ» ±â·ÏÇÕ´Ï´Ù. ű½ºÅ¸Æ® ÆÄÀÏ¿¡ ÆÄƼ¼Ç ¸í·ÉÀ» ÇÔ²² ÀÔ·ÂÇÏ´Â ´ë½Å, ´ÙÀ½°ú °°Àº ÁÙÀ» Æ÷ÇÔÇϽñ⠹ٶø´Ï´Ù:
%include /tmp/part-include |
½ºÅ©¸³Æ®¿¡¼ ¼±ÅÃµÈ ÆÄƼ¼Ç ¸í·ÉÀÌ »ç¿ëµÉ °ÍÀÔ´Ï´Ù.