´ÙÀ½ ÀÌÀü Â÷·Ê

7. ±âº»ÀûÀÎ ½Ã½ºÅÛ ¼ÒÇÁÆ®¿þ¾îÀÇ ¼³Ä¡

ÀÌ Àå¿¡¼­ ¿ì¸®´Â ±âº»ÀûÀÎ ¸®´ª½º ½Ã½ºÅÛ¿¡ ÇÊ¿äÇÑ ¸ðµç ¼ÒÇÁÆ®¿þ¾î¸¦ ¼³Ä¡ÇÒ °ÍÀÌ´Ù. ÀÌ ÀåÀÌ ³¡³ª¸é ¿©·¯ºÐÀº ¿ÏÀüÇÏ°Ô µ¿ÀÛÇÏ´Â ¸®´ª½º ½Ã½ºÅÛÀ» °®°Ô µÈ´Ù. ³ª¸ÓÁö ÀåµéÀº ³×Æ®¿öÅ· ¼³Á¤À̳ª ÀÎÅÍ³Ý ¼­¹ö + Ŭ¶óÀ̾ðÆ® (telnet, ftp, http, email), ÀÎÅÍ³Ý ¼³Á¤, X À©µµ¿ì ½Ã½ºÅÛ °°Àº ¼±ÅÃÀûÀÎ ÁÖÁ¦µé¿¡ ´ëÇØ ´Ù·ê °ÍÀÌ´Ù. ¿©·¯ºÐÀº Àç·®²¯ ±× ÀåµéÀ» ¶Ù¾î³Ñ¾îµµ µÈ´Ù. ¿¹¸¦ µé¾î LFS ½Ã½ºÅÛÀ» ³×Æ®¿÷¿¡ ¿¬°áÇÒ °èȹÀÌ ¾ø´Ù¸é ÀÎÅͳÝÀ» ¼³Á¤ÇÏ´Â °ÍÀº °ÅÀÇ ÇÊ¿äÄ¡ ¾ÊÀ» °ÍÀÌ´Ù.

¸ðµç ±âº»ÀûÀÎ ½Ã½ºÅÛ ¼ÒÇÁÆ®¿þ¾î¸¦ ¼³Ä¡Çϱâ Àü¿¡ ¹Ì¸® ¼³Ä¡µÇ¾î ÀÖ¾î¾ß ÇÒ ¸¹Àº ÆÐÅ°ÁöµéÀÌ ÀÖ´Ù. ÀüÇüÀûÀÎ ¼³Á¤ ½ºÅ©¸³Æ®µéÀº rm À̳ª grep, sed, mv, cat, cp, diff °°Àº ÇÁ·Î±×·¥µéÀ» ÇÊ¿ä·Î ÇÑ´Ù. ¿©·¯ºÐÀº ¾ÐÃà ÆÄÀÏÀ» tar ¿Í gzip À¸·Î ¹­ÀÎ ÆÄÀÏÀ» Ç®¾î¾ß ÇÏ¸ç ¿ÀºêÁ§Æ® ÆÄÀÏ·Î ÄÄÆÄÀÏÇÑ ÈÄ ÇÁ·Î±×·¥À» ¸µÅ©½Ã¸ç¾ß ÇÑ´Ù. ÀÌ ¸ðµç (¸î°³¸¦ ´õ Æ÷ÇÔÇؼ­) ÇÁ°í¸£¸ÅµéÀº ´Ù¸¥ ¾î¶² °ÍÀ» ¼³Ä¡ÇÒ ¼ö ÀÖ±â Àü¿¡ »ç¿ëÇÒ ¼ö ÀÖ¾î¾ß ÇÑ´Ù. ÀÌ ÇÁ·Î±×·¥µéÀº Á¤ÀûÀ¸·Î ¸µÅ©µÉ °ÍÀÌ´Ù. ±× ÀÌÀ¯´Â ¿©·¯ºÐÀÇ ±âÁ¸ÀÇ ¸®´ª½º ½Ã½ºÅÛÀÌ LFS ½Ã½ºÅÛ¿¡ ¼³Ä¡ÇÏ·Á´Â °Í°ú ´Ù¸¥ ¹öÀüÀÇ C ¶óÀ̺귯¸®¸¦ °¡Áö°í ÀÖÀ» ¼ö Àֱ⠶§¹®ÀÌ´Ù. ÀÌ Àå¿¡¼­ ¼³Ä¡ÇÏ´Â ÇÁ·Î±×·¥µéÀº ±âÁ¸ÀÇ ¸®´ª½º ½Ã½ºÅÛÀÇ C ¶óÀ̺귯¸®¿¡ ¸µÅ©µÉ °ÍÀÌ´Ù. ÀÌ°ÍÀº ÀÌ ÇÁ·Î±×·¥µéÀ» LFS ½Ã½ºÅÛ¿¡¼­ ½ÇÇàÇÏ´Â °æ¿ì ¶óÀ̺귯¸® Ãæµ¹À» ÀÏÀ¸Å³ ¼ö ÀÖ´Ù. µû¶ó¼­ ¿ì¸®´Â ÀÌ ÇÁ·Î±×·¥µéÀ» Á¤ÀûÀ¸·Î ¸µÅ©ÇØ¾ß ÇÑ´Ù. ±âº»ÀûÀÎ ½Ã½ºÅÛ ¼ÒÇÁÆ®¿þ¾îµéÀ» ¼³Ä¡ÇÏ´Â µ¿¾È ¿ì¸®´Â Á¤ÀûÀ¸·Î ¸µÅ©µÈ ¼ÒÇÁÆ®¿þ¾îµéÀ» ´Ù½Ã ¼³Ä¡ÇÏ¿© LFS ½Ã½ºÅÛÀÇ C ¶óÀ̺귯¸®¿¡ µ¿ÀûÀ¸·Î ¸µÅ©µÇµµ·Ï ÇÒ °ÍÀÌ´Ù.

7.1 µð¹ö±ë ½Éº¼¿¡ ´ëÇÏ¿©

¸ðµç ÇÁ·Î±×·¥À̳ª ¹ÙÀ̳ʸ®´Â ±âº»ÀûÀ¸·Î µð¹ö±ë ½Éº¼À» Æ÷ÇÔÇÏ¿© ÄÄÆÄÀϵȴÙ. ÀÌ´Â ¿©·¯ºÐÀÌ ÇÁ·Î±×·¥À̳ª ¶óÀ̺귯¸®¸¦ µð¹ö°Å¸¦ ÅëÇØ ½ÇÇàÇÒ ¼ö ÀÖÀ¸¸ç µð¹ö°ÅÀÇ Ãâ·Â¹°ÀÌ Á» ´õ »ç¿ëÀÚ¿¡°Ô ÆíÇÏ°Ô µÈ´Ù´Â °ÍÀ» ¶æÇÑ´Ù. ÀÌ µð¹ö±ë ½Éº¼µéÀº ¶ÇÇÑ ÇÁ·Î±×·¥À̳ª ¶óÀ̺귯¸®ÀÇ Å©±â¸¦ ¸Å¿ì Å©°Ô ÇÑ´Ù. ÀÌ ¹®¼­´Â µð¹ö±ë ½Éº¼ ¾øÀÌ ¼ÒÇÁÆ®¿þ¾î¸¦ ¼³Ä¡ÇÏÁø ¾Ê´Â´Ù (¸¹Àº µ¶ÀÚµéÀÌ µð¹ö±ë ¼ÒÇÁÆ®¿þ¾î¸¦ »ç¿ëÇÏ´ÂÁö ¾ÊÇÏ´ÂÁö¸¦ ³»°¡ ¾ËÁö ¸øÇϱ⠶§¹®¿¡). ´ë½Å¿¡ ¿©·¯ºÐÀº ¿øÇÒ°æ¿ì strip ÇÁ·Î±×·¥À¸·Î ±× ½Éº¼µéÀ» Á÷Á¢ Á¦°ÅÇÒ ¼ö ÀÖ´Ù.

¹ÙÀ̳ʸ® (a.out À̳ª ELF ¹ÙÀ̳ʸ®¿©¾ß ÇÑ´Ù) ·ÎºÎÅÍ µð¹ö±ë ½Éº¼À» Á¦°ÅÇϱâ À§Çؼ± strip --strip-debug filename À» ½ÇÇàÇÑ´Ù. ¿©·¯ ÆÄÀϵ鿡¼­ µð¹ö±ë ½Éº¼À» Á¦°ÅÇÏ°í ½Í´Ù¸é ¿ÍÀϵå Ä«µå ¹®ÀÚ¸¦ ¾²¸é µÈ´Ù (strip --strip-debug $LFS/usr/bin/* ¿Í °°ÀÌ).

¿©·¯ºÐÀÌ µð¹ö±ë ½Éº¼ÀÌ Å« Â÷À̸¦ ¸¸µå´ÂÁö ¾Ë°í ½Í´Ù¸é ¾Æ·¡¿¡ Åë°è°¡ ÀÖ´Ù:

»ç¿ëÇÏ´Â ÄÄÆÄÀÏ·¯¿Í µ¿ÀûÀ¸·Î ÇÁ·Î±×·¥À» ¸µÅ©½ÃÅ°±â À§ÇØ ¾²ÀÌ´Â C ¶óÀ̺귯¸®ÀÇ ¹öÀü¿¡ µû¶ó Å©±â°¡ ´Ù¸¦ ¼ö ÀÖÀ¸³ª µð¹ö±ë ½Éº¼À» Æ÷ÇÔÇÑ °Í°ú ±×·¸Áö ¾ÊÀº °ÍÀ» ºñ±³ÇÑ´Ù¸é ¿©·¯ºÐÀÇ °á°ú´Â ºñ½ÁÇÒ °ÍÀÌ´Ù. ÀÌ ÀåÀ» ³¡³»°í ¸ðµç LFS ¹ÙÀ̳ʸ®µé°ú ¶óÀ̺귯¸®µé¿¡¼­ µð¹ö±ë ½Éº¼À» Á¦°ÅÇÑ ÈÄ ³ª´Â 102MB ¸¦ ¾à°£ ³ÑÀº µð½ºÅ© °ø°£À» ´Ù½Ã ¾ò¾ú´Ù. ¸Å¿ì Â÷ÀÌ°¡ Å©´Ù. ±× Â÷ÀÌ´Â ¸ðµç °ÍÀ» ¼³Ä¡ÇÏ°Ô µÇ´Â ÀÌ ¹®¼­ÀÇ ¸¶Áö¸·¿¡ °°Àº ÀÏÀ» ÇßÀ» ¶§ ´õ¿í Ä¿Áú °ÍÀÌ´Ù.

7.2 ±âº»ÀûÀÎ ½Ã½ºÅÛ ¼ÒÇÁÆ®¿þ¾î ¼³Ä¡¸¦ À§ÇÑ LFS ½Ã½ºÅÛÀÇ Áغñ

BinutilsÀÇ ¼³Ä¡

./configure
make -e LDFLAGS=-all-static
make -e prefix=$LFS/usr install
 

Bzip2ÀÇ ¼³Ä¡

make -e LDFLAGS=-static
make -e PREFIX=$LFS/usr install
cd $LFS/usr/bin
mv bunzip2 bzip2 $LFS/bin
 

DiffutilsÀÇ ¼³Ä¡

./configure
make -e LDFLAGS=-static
make -e prefix=$LFS/usr install
 

ÀÌ ÆÐÅ°Áö´Â ƯÁ¤ Ç÷§Æû¿¡¼­ Á¤Àû ¸µÅ©¿¡ ¹®Á¦¸¦ ÀÏÀ¸Å²´Ù°í ¾Ë·ÁÁ® ÀÖ´Ù. ¿©·¯ºÐÀÌ ÀÌ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇϴµ¥ ¹®Á¦¸¦ °Þ´Â´Ù¸é ¼öÁ¤µÈ ÆÐÅ°Áö¸¦ http://www.linuxfromscratch.org/download/diffutils-2.7-fixed.tar.gz ¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù.

FileutilsÀÇ ¼³Ä¡

./configure --disable-nls
make -e LDFLAGS=-static
make -e prefix=$LFS/usr install
cd $LFS/usr/bin
mv chgrp chmod chown cp dd df ln ls mkdir mknod mv rm rmdir sync $LFS/bin
 

ÇÊ¿äÇÑ °æ¿ì ±âÁ¸ÀÇ ½Ã½ºÅÛ¿¡ GCC ¼³Ä¡Çϱâ

Glibc-2.1.3À» ÄÄÆÄÀÏÇϱâ À§Çؼ­´Â gcc-2.95.2°¡ ¼³Ä¡µÇ¾î ÀÖ¾î¾ß ÇÑ´Ù. 2.8 ÀÌÈÄÀÇ ¾î¶² ¹öÀüÀÌ¶óµµ °¡´ÉÇÏÁö¸¸ 2.95.2¸¦ ÃßõÇÑ´Ù. ¸¹Àº glibc-2.1 ±â¹ÝÀÇ ½Ã½ºÅÛÀº gcc-2.7.2.3ÀÌ ¼³Ä¡µÇ¾î ÀÖÀ¸¸ç ÀÌ ÄÄÆÄÀÏ·¯·Î´Â glibc-2.1À» ÄÄÆÄÀÏÇÒ ¼ö ¾ø´Ù. µû¶ó¼­ ¿ì¸®´Â ±âÁ¸ÀÇ ½Ã½ºÅÛ¿¡µµ gcc-2.95.2¸¦ ¼³Ä¡ÇÒ °ÍÀÌ´Ù. ±×·¯³ª ±âÁ¸ÀÇ ÄÄÆÄÀÏ·¯¸¦ µ¤¾î¾º¿ìÁø ¾ÊÀ» °ÍÀÌ´Ù. gcc¸¦ ¿©·¯ºÐÀÇ ½Ã½ºÅÛ¿¡ ¼³Ä¡Çϱâ Àü¿¡ ÀÌ°ÍÀÌ ÇÊ¿äÇÑÁö È®½ÇÈ÷ °áÁ¤ÇØ¾ß ÇÑ´Ù. ±âÁ¸ÀÇ °ÍÀÇ ¹öÀü ¹øÈ£°¡ 2.8 ÀÌ»óÀÎÁö º¸±â À§Çؼ­ gcc --version ¸¦ ½ÇÇàÇÑ´Ù. ¸¸¾à ±×·¸Áö ¾Ê´Ù¸é ¿©·¯ºÐÀº gcc-2.95.2¸¦ ¼³Ä¡ÇØ¾ß ÇÑ´Ù. ÈÄ¿¡ glibc¸¦ ÄÄÆÄÀÏÇϴµ¥ ¾î·Á¿òÀ» °Þ´Â´Ù¸é ¾î¶µç gcc-2.95.2¸¦ ¼³Ä¡ÇÏ±æ ¿øÇÏ°Ô µÉ °ÍÀÌ´Ù.

mkdir $LFS/usr/src/gcc-build; cd $LFS/usr/src/gcc-build
../gcc-2.95.2/configure --prefix=/usr/gcc2952 \ 
--with-local-prefix=/usr/gcc2952 --with-gxx-include-dir=/usr/gcc2952/include/g++ \ 
--enable-shared --enable-languages=c,c++
make bootstrap; make install
 

LFS ½Ã½ºÅÛ¿¡ GCC¸¦ ¼³Ä¡Çϱâ

mkdir $LFS/usr/src/gcc-build;cd $LFS/usr/src/gcc-build
../gcc-2.95.2/configure --enable-languages=c --disable-nls
make -e LDFLAGS=-static bootstrap
make -e prefix=$LFS/usr local_prefix=$LFS/usr install
 

ÇÊ¿äÇÑ ½Éº¼¸¯ ¸µÅ©µéÀÇ »ý¼º

¸ðµç ÇÁ·Î±×·¥µéÀÌ ÄÄÆÄÀÏ·¯¿Í ÇÁ¸®-ÇÁ·Î¼¼¼­¸¦ ãÀ» ¼ö ÀÖµµ·Ï Çϱâ À§Çؼ­ ¸î°¡Áö ½Éº¼¸¯ ¸µÅ©°¡ ÇÊ¿äÇÏ´Ù. ¸î¸î ÇÁ·Î±×·¥Àº cc ÇÁ·Î±×·¥À» ½ÇÇàÇÏ°í ´Ù¸¥ °ÍµéÀº gcc ÇÁ·Î±×·¥À» ½ÇÇàÇϸç, ¸î¸î ÇÁ·Î±×·¥Àº /lib (LFS ½Ã½ºÅÛ¿¡¼­ÀÇ /usr/lib) ¿¡ cpp ÇÁ·Î±×·¥ÀÌ ÀÖ±æ ¿¹»óÇÏÁö¸¸ ´Ù¸¥ °ÍµéÀº /usr/bin ¾Æ·¡¿¡ ÀÖ±æ ¿¹»óÇÑ´Ù.

cd $LFS/lib; ln -s ../usr/lib/gcc-lib/<host>/2.95.2/cpp cpp
cd $LFS/usr/lib; ln -s gcc-lib/<host>/2.95.2/cpp cpp
cd $LFS/usr/bin; ln -s gcc cc
 

<host>¸¦ gcc-2.95.2 ÆÄÀϵéÀÌ ¼³Ä¡µÈ µð·ºÅ丮 (³» °æ¿ì¿£ i686-unknown-linux)·Î ´ëüÇÑ´Ù. ¿©·¯ºÐÀº ¾Æ¸¶ µÎ °³ÀÇ ¼­·Î ´Ù¸¥ µð·ºÅ丮¸¦ ¹ß°ßÇÒ °ÍÀÌ´Ù.

GlibcÀÇ ¼³Ä¡

glibc-crypt ÆÐÅ°Áö¿¡ ´ëÇÑ ÁÖÀÇ»çÇ×:

-*-*-*-*-*-
ÇÁ¶û½º, ·¯½Ã¾Æ ¹Ì±¹ µîÀÇ ÀϺΠ±¹°¡µéÀÌ ¾Ïȣȭ ¼ÒÇÁÆ®¿þ¾îÀÇ »ç¿ë°ú ¹èÆ÷¸¦
¸Å¿ì ¾ö°ÝÈ÷ ±ÔÁ¦ÇÏ°í Àֱ⠶§¹®¿¡ ÀÌ add-onÀº GNU C ¶óÀ̺귯¸®ÀÇ ÁÖ ¹èÆ÷ÆÇ
¾È¿¡ Æ÷ÇÔµÇÁö ¾Ê´Â´Ù. ´õ ÀÚ¼¼ÇÑ »çÇ×Àº ¸Þ´º¾óÀÇ "Legal Problems" ºÎºÐÀ»
Àб⠹ٶõ´Ù.

Ưº°È÷, ¹Ì±¹Àº ÀÌ ¼ÒÇÁÆ®¿þ¾î¸¦ ¶óÀ̼¾½º ¾øÀÌ ¹Ì±¹ ¹ÛÀ¸·Î À¯ÃâÇÏ´Â °ÍÀ» -
ÀÎÅͳÝÀ» ÅëÇÏ´Â °ÍÀ» Æ÷ÇÔÇÏ¿© - Çã°¡ÇÏÁö ¾Ê´Â´Ù. µû¶ó¼­ ¿©·¯ºÐÀÌ ¹Ì±¹ ¹Û¿¡
ÀÖ´Ù¸é ÀÌ add-onÀ» FSFÀÇ °ø½Ä FTP »çÀÌÆ®ÀÎ ftp.gnu.org·ÎºÎÅÍ ¹ÞÁö ¸»±æ
¹Ù¶õ´Ù. ÀÌ ¼ÒÇÁÆ®¿þ¾î´Â ¿ÏÀüÈ÷ ¹Ì±¹ ¹Û¿¡¼­ °³¹ßµÇ¾ú´Ù.
-*-*-*-*-*-
 

"ÀÌ ¼ÒÇÁÆ®¿þ¾î"´Â ftp://ftp.gwdg.de/pub/linux/glibc/¿¡ ÀÖ´Â glibc-crypt ÆÐÅ°Áö¸¦ °¡¸®Å²´Ù. ÀÌ ¹ý±Ô´Â ´ÜÁö ¹Ì±¹¿¡ »ìÁö ¾Ê´Â »ç¶÷µé¿¡°Ô¸¸ Àû¿ëµÈ´Ù. DES ¼ÒÇÁÆ®¿þ¾î¸¦ °¡Áö°í µé¾î¿À´Â °ÍÀÌ ±ÔÁ¦µÇÁö´Â ¾ÊÀ¸¹Ç·Î ¿©·¯ºÐÀÌ ¹Ì±¹ ³»¿¡ »ì°í ÀÖ´Ù¸é À§ÀÇ µ¶ÀÏ »çÀÌÆ®·ÎºÎÅÍ ÀÌ ¼ÒÇÁÆ®¿þ¾î¸¦ ±¸ÇÒ ¼ö ÀÖ´Ù.

# Begin configparms
slibdir=/lib
sysconfdir=/etc
# End configparms
 

mkdir $LFS/usr/src/glibc-build;cd $LFS/usr/src/glibc-build
../glibc-2.1.3/configure --enable-add-ons
make; make install_root=$LFS install
 

mkdir $LFS/usr/src/glibc-build; cd $LFS/usr/src/glibc-build
CC=/usr/gcc2952/bin/gcc ../glibc-2.1.3/configure --enable-add-ons
make; make install_root=$LFS install
 

ÀÌÀüÀÇ NSS ¶óÀ̺귯¸® ÆÄÀϵéÀÇ º¹»ç

¿©·¯ºÐÀÇ ±âÁ¸ ¸®´ª½º ½Ã½ºÅÛÀÌ libc-2.0.x¸¦ »ç¿ëÇÑ´Ù¸é NSS ¶óÀ̺귯¸® ÆÄÀϵéÀ» LFS ÆÄƼ¼ÇÀ¸·Î º¹»çÇØ¾ß ÇÑ´Ù. Á¤ÀûÀ¸·Î ¸µÅ©µÈ ÇÁ·Î±×·¥µé Áß ÀϺδ ¿©ÀüÈ÷ NSS ¶óÀ̺귯¸®¿¡ ÀÇÁ¸Çϸç username, userid ±×¸®°í groupid¸¦ ã´Â ÇÁ·Î±×·¥µéÀÌ Æ¯È÷ ±×·¸´Ù. ls -l libc.so.*¸¦ ½ÇÇàÇÏ¿© ±âÁ¸ÀÇ ¸®´ª½º ½Ã½ºÅÛÀÌ ¾î¶² ¹öÀüÀÇ C ¶óÀ̺귯¸®¸¦ »ç¿ëÇÏ´ÂÁö º¼ ¼ö ÀÖ´Ù.

°á°ú°¡ /lib/libc.so.6 -> libc-2.0.7.so °°Àº °ÍÀ̶ó¸é ½Ã½ºÅÛÀº glibc-2.0À» »ç¿ëÇÏ´Â °ÍÀÌ´Ù.

°á°ú°¡ /lib/libc.so.6 -> libc-2.1.2.so °°Àº °ÍÀ̶ó¸é ½Ã½ºÅÛÀº glibc-2.1À» »ç¿ëÇÏ´Â °ÍÀÌ´Ù.

¿©·¯ºÐÀÇ ½Ã½ºÅÛÀÌ libc-2.0.x.so ÆÄÀÏ (x´Â 7 °°Àº ¸¶ÀÌÅ©·Î ¹öÀü ¹øÈ£) À» °¡Áö°í ÀÖ´Ù¸é cp -av /lib/*nss* $LFS/lib ¸¦ ½ÇÇàÇÏ¿© NSS ¶óÀ̺귯¸® ÆÄÀϵéÀ» º¹»çÇÑ´Ù.

grepÀÇ ¼³Ä¡

./configure --disable-nls
make -e LDFLAGS=-static
make -e prefix=$LFS/usr install
 

ÀÌ ÆÐÅ°Áö´Â ƯÁ¤ Ç÷§Æû¿¡¼­ Á¤Àû ¸µÅ© ¿¡·¯¸¦ ³½´Ù°í ¾Ë·ÁÁ® ÀÖ´Ù. ¿©·¯ºÐÀÌ ÀÌ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÒ ¶§ ¹®Á¦¸¦ °Þ´Â´Ù¸é ¼öÁ¤µÈ ÆÐÅ°Áö¸¦ http://www.linuxfromscratch.org/download/grep-2.4-fixed.tar.gz¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù.

gzipÀÇ ¼³Ä¡

./configure
make -e LDFLAGS=-static
make -e prefix=$LFS/usr install
cd $LFS/usr/bin
mv gunzip gzip $LFS/bin
 

ÀÌ ÆÐÅ°Áö´Â ƯÁ¤ Ç÷§Æû¿¡¼­ ÄÄÆÄÀÏ ¹®Á¦¸¦ ÀÏÀ¸Å²´Ù°í ¾Ë·ÁÁ® ÀÖ´Ù. ¿©·¯ºÐÀÌ ÀÌ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÒ ¶§ ¹®Á¦¸¦ °Þ´Â´Ù¸é ¼öÁ¤µÈ ÆÐÅ°Áö¸¦ http://www.linuxfromscratch.org/download/gzip-1.2.4-fixed.tar.gz¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù.

MakeÀÇ ¼³Ä¡

./configure
make -e LDFLAGS=-static
make -e prefix=$LFS/usr install
 

SedÀÇ ¼³Ä¡

./configure
make -e LDFLAGS=-static
make -e prefix=$LFS/usr install
mv $LFS/usr/bin/sed $LFS/bin
 

ÀÌ ÆÐÅ°Áö´Â ƯÁ¤ Ç÷§Æû¿¡¼­ Á¤Àû ¸µÅ© ¹®Á¦¸¦ ÀÏÀ¸Å²´Ù°í ¾Ë·ÁÁ® ÀÖ´Ù. ¿©·¯ºÐÀÌ ÀÌ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÒ ¶§ ¹®Á¦¸¦ °Þ´Â´Ù¸é ¼öÁ¤µÈ ÆÐÅ°Áö¸¦ http://www.linuxfromscratch.org/download/sed-3.02-fixed.tar.gz¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù.

Sh-utilsÀÇ ¼³Ä¡

./configure --disable-nls
make -e LDFLAGS=-static
make -e prefix=$LFS/usr install
cd $LFS/usr/bin
mv date echo false pwd stty su true uname hostname $LFS/bin
 

TarÀÇ ¼³Ä¡

./configure --disable-nls
make -e LDFLAGS=-static
make -e prefix=$LFS/usr install
mv $LFS/usr/bin/tar $LFS/bin
 

TextutilsÀÇ ¼³Ä¡

./configure --disable-nls
make -e LDFLAGS=-static
make -e prefix=$LFS/usr install
mv $LFS/usr/bin/cat $LFS/bin
 

Util-linuxÀÇ ¼³Ä¡

./configure
cd lib;make
cd ../mount;make -e LDFLAGS=-static
cp mount umount $LFS/bin
cp swapon $LFS/sbin
 

7.3 ±âº»ÀûÀÎ ½Ã½ºÅÛ ¼ÒÇÁÆ®¿þ¾îÀÇ ¼³Ä¡

¸ðµç ¼ÒÇÁÆ®¿þ¾îµéÀÇ ¼³Ä¡´Â ¸Å±¸ Á÷°üÀûÀÌ¸ç ¿©·¯ºÐÀº °¢ ÆÐÅ°Áö¿¡ ´ëÇÑ ÀϹÝÀûÀÎ ¼³Ä¡ ¹æ¹ýÀ» ¼³¸íÇÏ°í ƯÁ¤ ÆÐÅ°Áö°¡ ´Ù¸¥ ¼³Ä¡ ¹æ¹ýÀ» ¾´´Ù¸é ±× ¹æ¹ýÀ» ¼³¸íÇÏ´Â °ÍÀÌ ÈξÀ ½±°í ª´Ù°í »ý°¢ÇÒ °ÍÀÌ´Ù. ÀÌ ¹®Á¦¿¡ ´ëÇØ ³ªµµ ¿©·¯ºÐÀÇ ÀÇ°ß¿¡ Âù¼ºÇÏÁö¸¸ ³ª´Â ¸ðµç ÆÐÅ°Áö¿¡ ¿Ïº®ÇÑ °úÁ¤À» ¼³¸íÇÏ´Â °ÍÀ» ¼±ÅÃÇß´Ù. ÀÌ°ÍÀº ´Ü¼øÈ÷ °¡´ÉÇÒ Áöµµ ¸ð¸¦ ¿¡·¯³ª È¥µ·À» ¸·±â À§ÇÔÀÌ´Ù. ÀÌ ¹®¼­¸¦ ´õ ÁøÇàÇØ °¡±â Àü¿¡ ¿©·¯ºÐÀº ½Ã½ºÅÛÀ» Àç½ÃÀÛÇÏ¿© LFS ½Ã½ºÅÛÀ¸·Î ºÎÆÃÇØ¾ß ÇÑ´Ù. ±×·¯³ª ±×·¯±â Àü¿¡ ¾î¶² ÆÄƼ¼ÇÀÌ ½º¿Ò ÆÄƼ¼ÇÀ¸·Î »ç¿ëµÇ´ÂÁö ¾Ë¾Æ¾ß ÇÑ´Ù. ÀÌ Á¤º¸´Â ÀϹÝÀûÀ¸·Î /etc/fstab ÆÄÀÏ¿¡¼­ ãÀ» ¼ö ÀÖ´Ù. /dev/hda6 none swap sw 0 0 °ú ºñ½ÁÇÑ ÁÙÀ» ÀÌ ÆÄÀÏ¿¡ ÀÖ´ÂÁö ã¾Æº»´Ù.

±× ÁÙÀÇ 4¹ø° Çʵå´Â ¸¸µå½Ã 'sw'¿©¾ß ÇÑ´Ù. ±× ÁÙÀº ½º¿Ò ÆÄƼ¼ÇÀ» ³ªÅ¸³½´Ù. ¿©·¯ºÐÀÌ ±â¾ïÇؾßÇÒ °ÍÀº ±× À§Ä¡ÀÌ´Ù (³» °æ¿ì¿£ /dev/hda6ÀÌÁö¸¸ ¿©·¯ºÐÀÇ ½Ã½ºÅÛ¿¡¼± ´Ù¸¦ ¼ö ÀÖ´Ù). ¾î¶² ÆÄƼ¼ÇÀÌ ½º¿Ò ÆÄƼ¼ÇÀÎÁö ¾Ë¾ÒÀ¸¸é ÄÄÇ»Å͸¦ ¸®ºÎÆÃÇÏ¿© ¿©±âºÎÅÍ °è¼ÓÇØ ³ª°¡µµ µÈ´Ù.

ÆÄƼ¼ÇÀ» À縶¿îÆ®ÇÏ°í ½º¿Ò È°¼ºÈ­Çϱâ

¼ÒÇÁÆ®¿þ¾î¸¦ ¼³Ä¡Çϱâ Àü¿¡ ¿ì¸®´Â ÆÄƼ¼ÇÀ» ÀÐ°í¾²±â ¸ðµå·Î ´Ù½Ã ¸¶¿îÆ®ÇØ¾ß ÇÑ´Ù. ¶ÇÇÑ ±Ô¸ð°¡ Å« ÄÄÆÄÀÏ °úÁ¤ (gccÀÇ ÄÄÆÄÀÏ Ã³·³) µ¿¾È ¸Þ¸ð¸® ºÎÁ· ¹®Á¦°¡ ¹ß»ýÇÏÁö ¾Êµµ·Ï ½º¿Ò ÆÄƼ¼ÇÀ» È°¼ºÈ­ÇØ¾ß ÇÑ´Ù.

mount -o remount,rw / /
/sbin/swapon <swap device>
 

GCCÀÇ ¼³Ä¡

mkdir $LFS/usr/src/gcc-build;cd $LFS/usr/src/gcc-build
../gcc-2.95.2/configure --with-gxx-include-dir=/usr/include/g++ \ 
--enable-shared --enable-languages=c,c++
make bootstrap; make install
 

BisonÀÇ ¼³Ä¡

./configure --datadir=/usr/share/bison
make; make install
 

MawkÀÇ ¼³Ä¡

./configure
make; make install
cd /usr/bin; ln -s mawk awk
 

FindutilsÀÇ ¼³Ä¡

./configure
make; make install
 

ÀÌ ÆÐÅ°Áö´Â ÄÄÆÄÀÏ ¹®Á¦¸¦ ÀÏÀ¸Å²´Ù°í ¾Ë·ÁÁ® ÀÖ´Ù. ¿©·¯ºÐÀÌ ÀÌ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÒ ¶§ ¹®Á¦¸¦ °Þ´Â´Ù¸é ¼öÁ¤µÈ ÆÐÅ°Áö¸¦ http://www.linuxfromscratch.org/download/findutils-4.1-fixed.tar.gz¿¡¼­ ±¸ÇÒ ¼ö ÀÖ´Ù.

TermcapÀÇ ¼³Ä¡

./configure
make; make install
 

NcursesÀÇ ¼³Ä¡

./configure --with-shared
make; make install
 

LessÀÇ ¼³Ä¡

./configure
make; make install
mv /usr/bin/less /bin
 

PerlÀÇ ¼³Ä¡

./Configure
make; make install
 

¿ì¸®´Â 'make test' °úÁ¤À» »ý·«ÇÑ´Ù´Â °ÍÀ» ÁÖÀÇÇÑ´Ù. ÀÌ´Â ÀÌ ¼ø°£¿¡ ¾ÆÁ÷ ½Ã½ºÅÛÀÌ perl Å×½ºÆ®¸¦ ½ÇÇàÇÒ Áغñ°¡ µÇÁö ¾Ê¾Ò±â ¶§¹®ÀÌ´Ù. Áö±ÝÀº ¿ì¸®´Â perl ÄÄÆÄÀÏÀÌ Àß µÇ¾ú´Ù°í ¹ÏÀ» °ÍÀÌ´Ù.

M4ÀÇ ¼³Ä¡

./configure
make; make install
 

TexinfoÀÇ ¼³Ä¡

./configure
make; make install
 

AutoconfÀÇ ¼³Ä¡

./configure
make; make install
 

AutomakeÀÇ ¼³Ä¡

./configure
make install
 

Installing BashBashÀÇ ¼³Ä¡

./configure
make; make install
mv /usr/bin/bash /bin
 

Installing FlexFlexÀÇ ¼³Ä¡

./configure
make; make install
 

BinutilsÀÇ ¼³Ä¡

./configure
make; make install
 

Bzip2ÀÇ ¼³Ä¡

make; make install
cd /usr/bin; mv bunzip2 bzip2 /bin
 

DiffutilsÀÇ ¼³Ä¡

./configure
make; make install
 

E2fsprogsÀÇ ¼³Ä¡

./configure
make; make install
mv /usr/sbin/mklost+found /sbin
 

FileÀÇ ¼³Ä¡

./configure
make; make install
 

FileutilsÀÇ ¼³Ä¡

./configure
make; make install
cd /usr/bin
mv chgrp chmod chown cp dd df ln ls mkdir mknod mv rm rmdir sync /bin
 

GrepÀÇ ¼³Ä¡

./configure
make; make install
 

GroffÀÇ ¼³Ä¡

./configure
make; make install
 

GzipÀÇ ¼³Ä¡

./configure
make; make install
cd /usr/bin; mv z* gunzip gzip /bin
 

Ld.soÀÇ ¼³Ä¡

cd util; make ldd ldconfig
cp ldd /bin; cp ldconfig /sbin
rm /usr/bin/ldd
 

LibtoolÀÇ ¼³Ä¡

./configure
make; make install
 

Linux86ÀÇ ¼³Ä¡

cd as
make; make install
cd ../ld
make ld86; make install
 

LiloÀÇ ¼³Ä¡

make; make install
 

MakeÀÇ ¼³Ä¡

./configure
make; make install
 

Sh-UtilsÀÇ ¼³Ä¡

./configure
make; make install
cd /usr/bin
mv date echo false pwd stty su true uname hostname /bin
 

Shadow Password SuiteÀÇ ¼³Ä¡

./configure 
make; make install
cd etc
cp limits login.access login.defs.linux shells suauth /etc
mv /etc/login.defs.linux /etc/login.defs
cd /usr/sbin
mv chpasswd dpasswd groupadd groupdel groupmod logoutd mkpasswd \ 
newusers useradd userdel usermod grpck pwck vipw grpconv grpunconv \ 
pwconv pwunconv /sbin
 

ManÀÇ ¼³Ä¡

./configure -default
make all; make install
 

ModutilsÀÇ ¼³Ä¡

./configure
make; make install
 

ProcinfoÀÇ ¼³Ä¡

make; make install
 

ProcpsÀÇ ¼³Ä¡

gcc -O3 -Wall -Wno-unused -c watch.c
make; make -e XSCPT="" install
mv /usr/bin/kill /bin
 

PsmiscÀÇ ¼³Ä¡

make; make install
 

SedÀÇ ¼³Ä¡

./configure
make; make install
mv /usr/bin/sed /bin
 

start-stop-daemonÀÇ ¼³Ä¡

make start-stop-daemon
cp start-stop-daemon /sbin
cp start-stop-daemon.8 /usr/share/man/man8
 

SysklogdÀÇ ¼³Ä¡

make; make install
 

SysvinitÀÇ ¼³Ä¡

cd src
make; make install
 

TarÀÇ ¼³Ä¡

./configure
make; make install
mv /usr/bin/tar /bin
 

TextutilsÀÇ ¼³Ä¡

./configure
make; make install
mv /usr/bin/cat /bin
 

VimÀÇ ¼³Ä¡

./configure
make; make install
 

Util-linuxÀÇ ¼³Ä¡

HAVE_PASSWD=yes
HAVE_SLN=yes
HAVE_TSORT=yes
 

groupadd -g 5 tty
./configure
make; make install
 

7.4 ¿¹ÀüÀÇ NSS ¶óÀ̺귯¸® ÆÄÀϵéÀÇ Á¦°Å

¿©·¯ºÐÀÌ ±âÁ¸ÀÇ ¸®´ª½º ½Ã½ºÅÛ¿¡¼­ LFS ½Ã½ºÅÛÀ¸·Î NSS ¶óÀ̺귯¸® ÆÄÀϵéÀ» º¹»çÇß¾ú´Ù¸é (±âÁ¸ ½Ã½ºÅÛÀÌ glibc-2.0À» ¾²±â ¶§¹®¿¡) ÀÌÁ¦ ¾Æ·¡¸¦ ½ÇÇàÇÏ¿© ±× ÆÄÀϵéÀ» Á¦°ÅÇÑ´Ù:

rm /lib/libnss*.so.1 /lib/libnss*2.0*
 

7.5 ¼ÒÇÁÆ®¿þ¾îÀÇ ¼³Á¤

ÀÌÁ¦ ¸ðµç ¼ÒÆ®À¸¿þ¾îµéÀÌ ¼³Ä¡µÇ¾ú°í ¸î¸î ÇÁ·Î±×·¥ÀÌ Á¤»óÀûÀ¸·Î µ¹µµ·Ï Çϱâ À§ÇØ ¿ì¸®°¡ ÇؾßÇÒ °ÍÀº ¼³Á¤ ÆÄÀϵéÀ» ¸¸µå´Â °Í »ÓÀÌ´Ù.

GlibÀÇ ¼³Á¤

/etc/nsswitch.conf ÆÄÀÏÀ» ¸¸µé¾î¾ß ÇÑ´Ù. ÀÌ ÆÄÀÏÀÌ ¾ø°Å³ª À߸øµÈ °æ¿ì glibc°¡ ±âº» °ªÀ» »ç¿ëÇϱä ÇÏÁö¸¸ ÀÌ ±âº»°ªÀº ÀÌÈÄ Àå¿¡¼­ ´Ù·ê ³×Æ®¿öÅ·°ú Àß µ¿ÀÛÇÏÁö ¾Ê´Â´Ù. ¶ÇÇÑ ¿ì¸®ÀÇ Å¸ÀÓÁ¸µµ ¼³Á¤µÇ¾î¾ß ÇÑ´Ù.

# Begin /etc/nsswitch.conf
passwd: files
group: files
shadow: files
 
hosts: files dns
networks: files
 
protocols: db files
services: db files
ethers: db files
rpc: db files
 
netgroup: db files
# End /etc/nsswitch.conf
 

/etc/localtime or ln -s /usr/share/zoneinfo/Canada/Eastern /etc/localtime tzselectÀÇ °á°ú´Â "EST5EDT"³ª "Canada/Eastern" °°Àº °ÍÀÌ´Ù. ±×·± Á¤º¸·Î ¿©·¯ºÐÀÌ ¸¸µå´Â ½Éº¼¸¯ ¸µÅ©´Â ln -s /usr/share/zoneinfo/EST5EDT À̰ųª ln -s /usr/share/zoneinfo/Canada/Eastern /etc/localtime ÀÌ´Ù.

LILOÀÇ ¼³Á¤

liloÀÇ ¼³Á¤ ÆÄÀÏÀ» óÀ½ºÎÅÍ ¸¸µéÁö´Â ¾Ê°í ±âÁ¸ÀÇ ¸®´ª½º ½Ã½ºÅÛÀÇ ÆÄÀÏÀ» »ç¿ëÇÒ °ÍÀÌ´Ù. ÀÌ ÆÄÀÏÀº ¸Ó½Å¿¡ µû¶ó¼­ Ʋ¸®¸ç µû¶ó¼­ ³»°¡ ¿©±â¼­ ¸¸µé ¼ö´Â ¾ø´Ù. ¿©·¯ºÐÀº ±âÁ¸ÀÇ ¸®´ª½º ½Ã½ºÅÛ¿¡¼­ ¾²´ø °Í°ú ¶È°°Àº lilo ¿É¼ÇµéÀ» ¾²±æ ¿øÇÒ °ÍÀ̹ǷΠ±âÁ¸ ½Ã½ºÅÛÀÇ °Í°ú ¶È°°ÀÌ ÆÄÀÏÀ» ¸¸µç´Ù.

cp /mnt/original/etc/lilo.conf /etc
cp /mnt/original/boot/* /boot
 

±âÁ¸ÀÇ ¸®´ª½º ½Ã½ºÅÛÀÌ Ä¿³Î À̹ÌÁöµéÀº (¾î´À °Íµµ) /mnt/original/boot ¾È¿¡ °¡Áö°í ÀÖÁö ¾Ê´Ù¸é ±× ÆÄÀϵéÀÇ À§Ä¡¸¦ /etc/lilo.conf ÆÄÀÏ¿¡¼­ È®ÀÎÇÑ ÈÄ ±× ÆÄÀϵéÀ» /etc/lilo.conf°¡ ãÀ» ¼ö ÀÖ´Â °÷À¸·Î º¹»çÇÑ´Ù. ȤÀº ¿©·¯ºÐÀº ±× ÆÄÀϵéÀ» /boot·Î º¹»çÇÑ ÈÄ /etc/lilo.conf ÆÄÀÏÀ» ¼öÁ¤ÇÏ¿© LFS ½Ã½ºÅÛ¿¡¼­ Ä¿³Î À̹ÌÁöµéÀÌ ÀÖ´Â »õ °æ·Î¸¦ ãµµ·Ï ÇÒ ¼ö ÀÖ´Ù. ¾î¶² °Íµµ Àß µ¿ÀÛÇÏ¸ç ¾î¶»°Ô ÇÒ °ÍÀΰ¡´Â ¿©·¯ºÐ¿¡°Ô ´Þ·È´Ù.

SysklogdÀÇ ¼³Á¤

# Begin /etc/syslog.conf
 
auth,authpriv.* -/var/log/auth.log
*.*;auth,authpriv.none -/var/log/sys.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
*.emerg *
 
# End /etc/syslog.conf
 

Shadow Password SuiteÀÇ ¼³Á¤

ÀÌ ÆÐÅ°Áö´Â »ç¿ëÀÚÀÇ ¾ÏÈ£¸¦ ¹Ù²Ù°í »õ·Î¿î »ç¿ëÀÚ/±×·ìÀ» Ãß°¡ÇÏ°í »ç¿ëÀÚ/±×·ìÀ» »èÁ¦ÇÏ´Â µîÀÇ ÀÏÀ» Çϱâ À§ÇÚ À¯Æ¿¸®Æ¼µéÀ» Æ÷ÇÔÇÏ°í ÀÖ´Ù. 'password shadowing'ÀÌ ¹«¾ùÀÎÁö¸¦ ¼³¸íÇÏÁø ¾Ê°Ú´Ù. ¿©·¯ºÐÀº doc/HOWTO ÆÄÀÏ ¾È¿¡¼­ ÀÌ¿¡ ´ëÇÑ °ÍÀ» ¸ðµÎ Àо ¼ö ÀÖ´Ù. ¿©·¯ºÐÀÌ ¸í½ÉÇÒ °ÍÀÌ Çϳª Àִµ¥, shadow Áö¿ø ±â´ÉÀ» »ç¿ëÇϱâ·Î Çß´Ù¸é ¾ÏÈ£¸¦ È®ÀÎÇÒ ÇÊ¿ä°¡ ÀÖ´Â ÇÁ·Î±×·¥µé (¿¹¸¦ µé¾î xdmÀ̳ª ftp µ¥¸ó, pop3d µî) ÀÌ 'shadow-compliant(¼¨µµ¿ì È£¿Ï)'À̾î¾ß ÇÑ´Â °ÍÀÌ´Ù. ´Ù½Ã¸»ÇØ ±× ÇÁ·Î±×·¥µéÀÌ ¼¨µµ¿ì Æнº¿öµå¿Í Àß ÀÛµ¿ÇÒ ¼ö ÀÖ¾î¾ß ÇÑ´Ù.

¼¨µµ¿ì Æнº¿öµå¸¦ »ç¿ëÇÏÁö ¾Ê±â·Î °áÁ¤Çß´õ¶óµµ (doc/HOWTO ¹®¼­¸¦ ÀÐÀº ÈÄ¿¡) ¿©·¯ºÐÀº ¿©ÀüÈ÷ ÆÐÅ°Áö¸¦ »ç¿ëÇϴµ¥ ±×°ÍÀº ÀÌ ÆÐÅ°Áö ¾ÈÀÇ À¯Æ¿¸®Æ¼µéÀ¸ ¼¨µµ¿ì Æнº¿öµå¸¦ »ç¿ëÇÏÁö ¾Ê´Â ½Ã½ºÅÛ¿¡¼­µµ »ç¿ëµÇ±â ¶§¹®ÀÌ´Ù. ÀÌ¿¡ ´ëÇÑ ¸ðµç ³»¿ëÀ» HOWTO¿¡¼­ º¼ ¼ö ÀÖ´Ù. ¶ÇÇÑ ¿©·¯ºÐÀÌ ¿øÇÏ´Â ¶§¿¡ ¼¨µµ¿ì Æнº¿öµåÀÇ »ç¿ë ¿©ºÎ¸¦ º¯°æÇÒ ¼ö ÀÖ´Ù´Â °ÍÀ» ¸í½ÉÇÑ´Ù.

Áö±ÝÀÌ doc/HOWTO ÆÄÀÏÀÇ #5 ºÎºÐÀ» ÀÐÀ» ¸Å¿ì ÁÁÀº ½Ã±âÀÌ´Ù. ¿©·¯ºÐÀº ¼¨µµ¿ì ±â´ÉÀÌ ÀÛµ¿ÇÏ´ÂÁö ¿©ºÎ¸¦ °Ë»çÇÏ´Â ¹æ¹ý°ú ±â´ÉÀ» Á¤Áö½ÃÅ°´Â ¹æ¹ýÀ» ¾Ë ¼ö ÀÖ´Ù. ¸¸¾à ÀÛµ¿ÇÏÁö ¾Ê°í ÀÖÀ¸¸ç °Ë»ç¸¦ ÇÏÁö ¾Ê¾Ò¾ú´Ù¸é ¿©·¯ºÐÀÇ ¸ðµç Äֿܼ¡¼­ ·Î±×¾Æ¿ô ÇÑ ÈÄ ´õÀÌ»ó ½Ã½ºÅÛÀ» »ç¿ëÇÒ ¼ö ¾ø°Ô µÉ °ÍÀÌ´Ù. ÀÌ´Â ´õÀÌ»ó ·Î±äÀ» ÇÒ ¼ö ¾ø±â ¶§¹®ÀÌ´Ù. ÀÌ ¹®Á¦¸¦ ½±°Ô ÇØ°áÇÏ´Â ¹æ¹ýÀº Ä¿³Î¿¡ init=/sbin/sulogin À̶ó´Â ÀÎÀÚ¸¦ ³Ñ°ÜÁØ ÈÄ util-linux ¾ÐÃàÆÄÀÏÀ» Ç®°í login-utils µð·ºÅ丮·Î À̵¿ÇÏ¿© login ÇÁ·Î±×·¥À» ¸¸µç ÈÄ /bin/loginÀ» ±×°ÍÀ¸·Î ¹Ù²ã ¹ö¸®´Â °ÍÀÌ´Ù. ÀÏÀÌ Àý¸ÁÀûÀ¸·Î À߸øµÇÁø ¾Ê°ÚÁö¸¸ (Àû¾îµµ Linux »ó¿¡¼­´Â) ¾Ë¸Â°Ô Å×½ºÆ®¸¦ ÇÏ°í ¸Å´º¾óÀ» ÀÐÀ½À¸·Î½á ¾î·Á¿òÀ» ÇÇÇÒ ¼ö ÀÖ´Ù ;)

SysvinitÀÇ ¼³Á¤

/etc/inittab ÆÄÀÏÀ» ¾Æ·¡Ã³·³ ¼öÁ¤ÇÑ ÈÄ ¿©·¯ºÐÀº ÀÌÀüó·³ ·Î±äÇÒ ¼ö ÀÖ´Ù (agetty¿Í login ÇÁ·Î±×·¥À» »ç¿ëÇÏ¿©). SuloginÀº ÀϹÝÀûÀÎ ·Î±ä¿¡¼± ´õÀÌ»ó ¾²ÀÌÁö ¾ÊÀ» °ÍÀÌ´Ù.

# Begin /etc/inittab
 
id:2:initdefault:
 
si::sysinit:/etc/init.d/rcS
 
su:S:wait:/sbin/sulogin
 
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
 
ft:6:respawn:/sbin/sulogin
 
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
 
1:2345:respawn:/sbin/agetty /dev/tty1 9600
2:2345:respawn:/sbin/agetty /dev/tty2 9600
3:2345:respawn:/sbin/agetty /dev/tty3 9600
4:2345:respawn:/sbin/agetty /dev/tty4 9600
5:2345:respawn:/sbin/agetty /dev/tty5 9600
6:2345:respawn:/sbin/agetty /dev/tty6 9600
 
# End /etc/inittab
 

/var/run/utmp ÆÄÀÏÀÇ »ý¼º

loginÀ̳ª shutdown µîÀÇ ÇÁ·Î±×·¥µéÀº /var/run/utmp ÆÄÀÏ¿¡ ¹«¾ð°¡ ¾²±â¸¦ ¿øÇÑ´Ù. ÀÌ ÆÄÀÏÀº ÇöÀç ·Î±äÇØ ÀÖ´Â »ç¶÷µé¿¡ ´ëÇÑ Á¤º¸¸¦ ´ã°í ÀÖ´Ù. ¶ÇÇÑ ÄÄÇ»ÅÍ°¡ ¸¶Áö¸·À¸·Î ¼Ë´Ù¿î µÈ ¶§¿¡ ´ëÇÑ Á¤º¸µµ ´ã°í ÀÖ´Ù.


´ÙÀ½ ÀÌÀü Â÷·Ê