¹èÆ÷º»À» »ç¿ë¾Ê°í ¸¸µå´Â ¸®´ª½º ½Ã½ºÅÛ

Gerard Beekmans December 16th, 1999
æ» À±ºÀȯ, <el@linuxlab.co.kr>

 

     

    ÀÌ ±ÛÀº ¹èÆ÷ÆÇÀ» ÀüÇô »ç¿ëÇÏÁö ¾Ê°í ÇÊ¿äÇÑ ¼ÒÇÁÆ®¿þ¾î ¼Ò½º¸¦ Á÷Á¢ °¡Á®¿Í¼­, ¿©·¯ºÐ ÀڽŸ¸ÀÇ ¸®´ª½º ½Ã½ºÅÛÀ» ±¸¼ºÇÏ´Â ÀýÂ÷¸¦ ¼³¸íÇÑ´Ù.

    Â÷·Ê

    1. Introduction

        1.1 What¡¯s this all about?
        1.2 New versions
        1.3 Version history
        1.4 Contact info

    2. Software packages you need to download

    3. Preparing a new partition

        3.1 Creating a new partition
        3.2 Creating an ext2 file system on the new partition
        3.3 Adding an entry to LILO
        3.4 Creating directories
        3.5 Copying the /dev directory

    4. Installing Sysvinit

        4.1 Preparing Sysvinit
        4.2 Configuring Sysvinit
        4.3 Copying passwd & group files
        4.4 Installing a root shell
        4.5 Testing the system

    5. Installing a kernel

        5.1 Note on ftp.kernel.org
        5.2 Configuring the kernel
        5.3 Updating LILO
        5.4 Copying the new kernel source tree to $LFS
        5.5 Updating sysmlinks
        5.6 Testing the system

    6. Installing the GNU C Library

        6.1 Preparing the system for the GNU C Library installation
        6.2 Installing the GNU C Library

    7. Installing the GNU CC compilers

        7.1 Installing GCC 2.95.2
        7.2 Installing GCC 2.7.2.3

    8. Installing login utilities

        8.1 Installing agetty + login
        8.2 Modifying $LFS/etc/inittab
        8.3 Creating the UTMP record file
        8.4 Testing the system

    9. Installing Vim 

        9.1 Preparing the system for the Vim installation
        9.2 Installing Vim

    10. Creating initial boot scripts

        10.1 Preparing the directories and master files
        10.2 Creating the reboot script
        10.3 Creating the halt script
        10.4 Creating the mountfs script
        10.5 Creating the umountfs script
        10.6 Creating the sendsignals script  
        10.7 Set file permissions and create symlinks
        10.8 Creating the /etc/fstab file
        10.9 Testing the system

    11. Reinstalling statically linked software

        11.1 Installing the Termcap library
        11.2 Installing the Readline library
        11.3 Reinstalling Bash
        11.4 Reinstalling Sysvinit
        11.5 Reinstalling Make
        11.6 Reinstalling Sed
        11.7 Reinstalling Shell Utils
        11.8 Reinstalling File Utils
        11.9 Reinstalling + Installing Util Linux
        11.10 Reinstalling Text Utils
        11.11 Reinstalling Tar
        11.12 Reinstalling Gzip
        11.13 Reinstalling Bison
        11.14 Installing Flex
        11.15 Reinstalling Binutils
        11.16 Reinstalling Grep
        11.17 Reinstalling Mawk
        11.18 Reinstalling Find Utils
        11.19 Reinstalling Diff Utils
        11.20 Installing Less
        11.21 Reinstalling Perl
        11.22 Reinstalling M4
        11.23 Reinstalling Texinfo

    12. Installing the rest of the basic system software

        12.1 Installing E2fsprogs
        12.2 Installing File
        12.3 Installing Libtool
        12.4 Installing Modutils
        12.5 Installing Linux86
        12.6 Installing Lilo
        12.7 Installing DPKG
        12.8 Installing Sysklogd
        12.9 Installing Groff
        12.10 Installing Man-db
        12.11 Installing Procps
        12.12 Installing Procinfo
        12.13 Installing Procmisc
        12.14 Installing Shadow Password
        12.15 Installing GNU C++ Library

    13. Setting up basic networking

        13.1 Installing Netkit-base
        13.2 Installing Net-tools

    14. Setting up Email sub system

        14.1 Preparing system for Email sub system
        14.2 Installing Procmail
        14.3 Installing Sendmail
        14.4 Installing Mailx
        14.5 Creating /etc/init.d/sendmail bootscript
        14.6 Setting up permissions and symlinks
        14.7 Installing Mutt
        14.8 Installing Fetchmail
        14.9 Testing the Email sub system

    15. Installing Internet Servers

        15.1 Installing telnet daemon + client
        15.2 Installing Proftpd
        15.3 Installing Netkit-ftp
        15.4 Installing Apache
        15.5 Installing Slang Library
        15.6 Installing Zlib
        15.7 Installing Lynx
        15.8 Configuring the daemons
        15.9 Configuring telnetd
        15.10 Configuring proftpd
        15.11 Configuring apache
        15.12 Testing the daemons

    16. Installing X Window System

        16.1 Creating missing symlink
        16.2 Installing X
        16.3 Creating /etc/ld.so.conf
        16.4 Modifying /etc/man_db.config
        16.5 Creating the /usr/include/X11 symlink
        16.6 Creating the /usr/X11 symlink
        16.7 Adding /usr/X11/bin to the $PATH environment variable
        16.8 Configuring X
        16.9 Testing X

    17. Installing Window Maker

        17.1 Preparing the system for the Window Maker installation
        17.2 Updating dynamic loader cache
        17.3 Configuring WindowMaker
        17.4 Testing WindowMaker

    18. Configuring system for Internet

    19. Copyright & Licensing Information

     

------------------------------------------------------------------------

1. Introduction

    1.1 What¡¯s this all about?

    ³»°¡ ÀÌ ±ÛÀ» ¾²±â ½ÃÀÛÇÑ °ÍÀº ¿©¼¸ ´Þ ÀüÀÌ´Ù. ³»°¡ ±×¸® ¸¹Àº ¸®´ª½º ¹èÆ÷ÆÇÀ» »ç¿ëÇÑ °ÍÀº ¾Æ´ÏÁö¸¸, ¸¶À½¿¡ ²À µå´Â ¹èÆ÷ÆÇÀº Á»Ã³·³ ¸¸³¯ ¼ö°¡ ¾ø¾ú´Ù. ¸ðµç ¹èÆ÷ÆÇÀÌ °¢°¢ ÀåÁ¡°ú ´ÜÁ¡ÀÌ ÀÖÁö¸¸, ³ª´Â ³»°¡ »ç¿ëÇغ» ¾î¶² ¹èÆ÷ÆÇ¿¡µµ °áÄÚ ¸¸Á·ÇÒ ¼ö°¡ ¾ø¾ú´Ù.(ºñ·Ï Debianó·³ ³»°¡ ¿øÇÏ´Â °Í¿¡ ¸Å¿ì °¡±î¿î °Íµµ ÀÖÁö¸¸..)  

    °á±¹ ³ª´Â ´Ù¸¥ ¹èÆ÷ÆÇÀ» ÀüÇô »ç¿ëÇÏÁö ¾Ê°í, ÇÁ·Î±×·¥ÀÇ ¼Ò½ºÄڵ常À» ¸ð¾Æ ³» ÀڽŸ¸ÀÇ ¸®´ª½º ¹èÆ÷ÆÇÀ» ¸¸µå´Â ¹æ¹ýµéÀ» Ž±¸Çϱâ·Î ¸¶À½ ¸Ô¾ú´Ù. ³»°¡ ¹ß°ßÇÑ °ÍÀº ¸Å¿ì º¹ÀâÇÑ ÀÛ¾÷ÀÇ ÀÛÀº ÀϺο´Áö¸¸, ¹«Ã´ ½Å³ª´Â ÀÏÀÌ°í, ¿©·¯ºÐµµ ½Ã½ºÅÛÀÇ ¸ðµç ±¸¼º¿ä¼Ò¸¦ ¼³Á¤ÇÏ´Â ÀÛ¾÷À» ÅëÇØ Á¤¸» ¸¹Àº °ÍÀ» ¹è¿ì°Ô µÉ °ÍÀÌ´Ù.  ÀÌ ÀÏÀº ¿©·¯ºÐÀÌ ´Ù¾çÇÑ ¼ÒÇÁÆ®¿þ¾îµéÀ» ¼³Á¤Çϱâ À§ÇØ, ¾ÆÁÖ ¸¹Àº ¸Å´º¾óÀ» Àеµ·Ï ¸¸µç´Ù.  ±×¸®°í, ¿©·¯ºÐ ½Ã½ºÅÛÀÇ ¸ðµç °ÍÀ» ´Ù·ê ¼ö ÀÖ°Ô µÇ´Â ¸ÚÁø ¼±¹°À» ¹Þ°Ô µÉ °ÍÀÌ´Ù. (¹°·Ð, »ý°¢Àº ±×·¸´Ù) ¿©·¯ºÐ ÀÚ½ÅÀÇ ¸®´ª½º ½Ã½ºÅÛÀ» ±¸¼ºÇÏ´Â µ¿¾È ¿©·¯ºÐÀº ¼ÒÇÁÆ®¿þ¾î¸¦ ÀνºÅçÇÏ´Â °úÁ¤°ú, ±× ȯ°æÀÌ ¾î¶»°Ô ¼³Á¤µÇ¸ç ¾î¶² °÷¿¡ ¼³Á¤ÆÄÀϵéÀÌ ³õÀÌ´ÂÁö Á¤È®ÇÏ°Ô ¾Ë¾Æ¾ß Çϱ⠶§¹®ÀÌ´Ù.

     

    1.2 New versions

    ÀÌ ±ÛÀÇ ÃÖ±Ù ¹öÀüÀº Ç×»ó http://huizen.dds.nl/~glb/¿¡¼­ ãÀ» ¼ö ÀÖ´Ù.

     

    1.3 Version history

    1.0 (December 16th, 1999) - Initial release.

     

    1.4 Contact info

    ³»°Ô ¿¬¶ôÇÏ°í ½Í´Ù¸é tts-sol@dds.nl·Î ¸ÞÀÏÀ» º¸³»¸é µÈ´Ù.  Gerard Beekmans,

     

------------------------------------------------------------------------

2. Software packages you need to download

------------------------------------------------------------------------

3. Preparing a new partition

     

    3.1 Creating a new partition

    »õ·Î¿î ¸®´ª½º ½Ã½ºÅÛÀ» ±¸¼ºÇϱâ Àü¿¡, ¿ì¸®´Â ¸ÕÀú »õ·Î¿î ½Ã½ºÅÛÀ» ±¸¼ºÇÒ ¼ö ÀÖµµ·Ï ºñ¾îÀÖ´Â ¸®´ª½º ÆÄƼ¼ÇÀ» ¸¸µé¾î¾ß ÇÑ´Ù. ¿©·¯ºÐ ½Ã½ºÅÛ¿¡ ÀÌ¹Ì ¸®´ª½º ³×ÀÌƼºê ÆÄƼ¼Ç(Linux Native partition)ÀÌ ÀÖ´Ù¸é ÀÌ ¼½¼ÇÀ» °Ç³Ê¶Ù¾îµµ ÁÁ´Ù.

    ¸®´ª½º ÆÄƼ¼ÇÀ» ¼³Á¤ÇÒ Çϵåµð½ºÅ©À̸§À» ¿É¼ÇÀ¸·Î(¿©·¯ºÐÀÌ Ã¹ ¹ø° IDE Çϵåµð½ºÅ©¿¡ »õ·Î¿î ÆÄƼ¼ÇÀ» ±¸¼ºÇÒ °èȹÀ̶ó¸é /dev/hda, µÎ ¹ø° Çϵåµð½ºÅ©¶ó¸é /dev/hdb¸¦ »ç¿ëÇÑ´Ù) fdisk ÇÁ·Î±×·¥À» ½ÃÀÛÇÑ´Ù(¶Ç´Â cfdisk ÇÁ·Î±×·¥ÀÌ ÀÖ´Ù¸é ±×°ÍÀ» »ç¿ëÇÏ´Â °ÍÀÌ ³´´Ù.)

    ¸®´ª½º ³×ÀÌƼºê ÆÄƼ¼ÇÀ» ¸¸µé¾úÀ¸¸é ÆÄƼ¼Ç Å×ÀÌºí¿¡ ±× Á¤º¸¸¦ ¾²°í (c)fdisk ÇÁ·Î±×·¥À» ³¡³½´Ù.(¡®w¡¯¸í·ÉÀ» »ç¿ëÇÑ´Ù) ÆÄƼ¼Ç Å×À̺íÀÌ ¾÷µ¥ÀÌÆ®µÇ¾ú°í, ±×°ÍÀ» È®½ÇÈ÷ ½Ã½ºÅÛ¿¡ ÀνĽÃÅ°±â À§ÇØ ¿©·¯ºÐÀÇ ½Ã½ºÅÛÀ» ¸®ºÎÆ®ÇØ¾ß ÇÑ´Ù´Â ¸Þ½ÃÁö¸¦ ¸¸³­´Ù¸é, ÀÛ¾÷À» °è¼ÓÇϱâ Àü¿¡ ½ÃÅ°´Â ´ë·Î ½Ã½ºÅÛÀ» ¸®ºÎÆ®ÇÑ´Ù.

     

    3.2 Creating an ext2 file system on the new partition

    ÆÄƼ¼ÇÀÌ ¸¸µé¾îÁ³À¸¸é, ±× ÆÄƼ¼Ç¿¡ »õ·Î¿î ext2 ÆÄÀϽýºÅÛÀ» ±¸¼ºÇØ¾ß ÇÑ´Ù. ÀÌÁ¦ºÎÅÍ´Â »õ·Î ¸¸µé¾îÁø ÀÌ ÆÄƼ¼ÇÀ» $LFS¶ó ºÎ¸£°Ú´Ù. ¿©·¯ºÐÀÌ /dev/hda4¿¡ ÆÄƼ¼ÇÀ» ¸¸µé¾ú°í, /mnt/hda4 µð·ºÅ丮¿¡ ±× ÆÄƼ¼ÇÀ» ¸¶¿îÆ®Çß´Ù¸é, ÀÌ ¹®¼­¿¡¼­ $LFS/usr/bin¿¡ ÆÄÀÏÀ» º¹»çÇ϶ó°í ¸»ÇÒ ¶§ ¿©·¯ºÐÀº /mnt/hda4/usr/bin¿¡ º¹»çÇÏ¸é µÈ´Ù.

    »õ·Î¿î ext2 ÆÄÀϽýºÅÛÀ» ¸¸µé±â À§ÇØ ¿ì¸®´Â mke2fs ¸í·ÉÀ» »ç¿ëÇÑ´Ù. mke2fs ¸í·ÉÀÇ ¿É¼ÇÀ¸·Î $LFS¸¸ ÁÖ¸é ÆÄÀϽýºÅÛÀÌ ¸¸µé¾îÁú °ÍÀÌ´Ù.

     

    3.3 Adding an entry to LILO

    ´ÙÀ½¿¡ ÄÄÇ»Å͸¦ ÄÓ ¶§ ÀÌ ÆÄƼ¼ÇÀ¸·Î ºÎÆ®ÇÒ ¼ö ÀÖµµ·Ï /etc/lilo.conf ÆÄÀÏÀ» ¾÷µ¥ÀÌÆ®ÇØ¾ß ÇÑ´Ù. ´ÙÀ½°ú °°Àº ÁÙÀ» lilo.conf ÆÄÀÏ¿¡ Ãß°¡ÇÑ´Ù.
     

      image=<image>
        label=<label>
         root=$LFS
        read-only


    <image> ÀÚ¸®¿¡´Â ÀÌ¹Ì Á¸ÀçÇÏ´Â Ä¿³Î À̹ÌÁö¸¦ ½á³Ö´Â´Ù.  ´çºÐ°£(»õ·Î¿î Ä¿³ÎÀ» ¼³Ä¡ÇÒ ¶§±îÁö), Áö±Ý ¿©·¯ºÐÀÇ ¸®´ª½º ½Ã½ºÅÛ¿¡¼­ »ç¿ëÇÏ°í ÀÖ´Â Ä¿³Î À̹ÌÁö¸¦ »ç¿ëÇØ¾ß ÇÑ´Ù. <lable> ÀÚ¸®¿¡´Â ¿©·¯ºÐÀÌ ¿øÇÏ´Â ´ë·Î, ¾î¶² °ÍÀÌ¶óµµ ½á³ÖÀ» ¼ö ÀÖ´Ù. ³ª´Â ·¹À̺íÀ» ¡°lfs¡±¶ó°í ºÙ¿´´Âµ¥, ÄÄÇ»ÅÍ°¡ ÄÑÁú ¶§ LILO ÇÁ·ÒÇÁÆ®¿¡¼­ ¿øÇÏ´Â ·¹À̺í(ºÎÆ® ¸Þ´º)¸¦ ¼±ÅÃÇÒ ¼ö ÀÖ´Ù.

    /etc/lilo.conf ÆÄÀÏ ÆíÁýÀÌ ³¡³ª¸é lilo¸¦ ½ÇÇàÇØ ¼³Á¤Á¤º¸¸¦ ¾÷µ¥ÀÌÆ® ÇÑ´Ù.

     

    3.4 Creating directories

    $LFS ÆÄƼ¼Ç¿¡ ÃÖ¼ÒÇÑÀÇ µð·ºÅ丮 Æ®¸®¸¦ ¸¸µéÀÚ.  

    ´ÙÀ½ ¸í·ÉµéÀ» µû¶óÇϸé ÇÊ¿äÇÑ µð·ºÅ丮µéÀÌ ¸¸µé¾îÁú °ÍÀÌ´Ù. ¿©·¯ºÐÀº µð·ºÅ丮µéÀ» ¸¸µé±â Àü¿¡ $LFS ÆÄƼ¼ÇÀ» ¸ÕÀú ¸¶¿îÆ®ÇØ¾ß ÇÑ´Ù.
     

    cd $LFS
    mkdir boot etc home lib mnt proc root tmp var
    mkdir -p bin sbin usr/bin usr/sbin usr/src usr/man
    cd usr/man
    mkdir man1 man2 man3 man4 man5 man6 man7 man8
    cd ..
    ln -s . local
    ln -s /etc etc
    ln -s /var var


    º¸´Ù½ÃÇÇ, LFS ½Ã½ºÅÛ¿¡¼­ /usr/local µð·ºÅ丮´Â /usr µð·ºÅ丮ÀÇ ¸µÅ©ÀÌ´Ù. ³ª´Â ÀÌ°ÍÀÌ FHS(File Hierarchy Standard - http://www.pathname.com/fhs)À» À§¹ÝÇÑ´Ù´Â °ÍÀ» ¾Ë°í ÀÖÁö¸¸, ³» »ý°¢¿¡ ¸ðµç ¼ÒÇÁÆ®¿þ¾î ÆÐÅ°Áö´Â ¾î·µç Áö¿ªÀûÀ¸·Î(local) ¼³Ä¡µÇ´Â °ÍÀÌ°í, º¥´õµéÀÇ CD-ROMÀ̳ª ±×¿Í ºñ½ÁÇÑ °Íµé¿¡ ÀÇÇØ ¼³Ä¡µÈ ºÎºÐÀÌ ¾Æ´Ï¹Ç·Î, /usr/local µð·ºÅ丮´Â ¿Ïº®ÇÑ self-built ½Ã½ºÅÛ¿¡ ±×´ÙÁö ÀûÇÕÇÑ °ÍÀÌ ¾Æ´Ï¶ó°í ¿©°ÜÁø´Ù.  

    ±×¸®°í, /usr/etc¿Í /usr/var´Â /etc¿Í /var µð·ºÅ丮ÀÇ ¸µÅ©ÀÌ´Ù.  ÀÌ °ÍÀº ´ÜÁö ³» °³ÀÎÀûÀÎ ÃëÇâÀÌ´Ù.

     

    3.5 Copying the /dev directory

    ¿ì¸®´Â mknod ¸í·ÉÀ» »ç¿ëÇؼ­ $LFS/dev µð·ºÅ丮 ¾Æ·¡¿¡ ÇÊ¿äÇÑ ¸ðµç °³º°ÀûÀÎ ÆÄÀÏÀ» ¸¸µé ¼ö ÀÖÁö¸¸, ±×·± ÀϵéÀº ¸Å¿ì ¿À·£ ½Ã°£ÀÌ °É¸°´Ù.  ³ª´Â °£´ÜÇÏ°Ô, ÇöÀç ¸®´ª½º ½Ã½ºÅÛÀÇ /dev µð·ºÅ丮¸¦ Ä«ÇÇÇؼ­ $LFS ÆÄƼ¼Ç¿¡ ³Ö´Â ¹æ¹ýÀ» ¼±ÅÃÇß´Ù.  ¿ø·¡ ¼Ó¼º, ±ÇÇÑ, ½Éº¼¸¯ ¸µÅ©, ±×¸®°í ¼ÒÀ¯±ÇÀ» º¸È£Çϱâ À§ÇØ ´ÙÀ½ ¸í·ÉÀ» »ç¿ëÇؼ­ Ä«ÇÇÇÑ´Ù.
     

    cp -av /dev $LFS


    ¿©·¯ºÐ¿¡°Ô ²À ÇÊ¿äÇÑ °ÍµéÀ» Á¦¿ÜÇÏ°í, $LFS/dev µð·ºÅ丮´Â ¸¶À½´ë·Î °¡Áö°í ³î¾Æµµ µÈ´Ù.

 

------------------------------------------------------------------------

4. Installing Sysvinit

    4.1 Preparing Sysvinit

    ÀϹÝÀûÀÎ °æ¿ì, Ä¿³Î ·ÎµùÀÌ ³¡³ª°í ´Ù¾çÇÑ ½Ã½ºÅÛ ±¸¼º¿ä¼ÒµéÀ» ÃʱâÈ­ÇÑ ÈÄ¿¡ ½Ã½ºÅÛ ºÎÆ®ÀÇ ¸¶Áö¸· °úÁ¤À¸·Î¼­ init ÇÁ·Î±×·¥À» ·ÎµåÇÑ´Ù. ´ëºÎºÐÀÇ ¸®´ª½º ½Ã½ºÅÛ¿¡¼­ ÀÌ ÇÁ·Î±×·¥Àº Sysvinit(System V ½ºÅ¸ÀÏÀÇ init)ÀÌ ¾²À̴µ¥, ¹Ù·Î ¿ì¸® LFS ½Ã½ºÅÛ¿¡ ¼³Ä¡ÇÒ ÇÁ·Î±×·¥ÀÌ´Ù.

    Sysvinit ¾ÐÃàÀ» Ǭ´Ù.
    ¼Ò½º µð·ºÅ丮·Î À̵¿ÇÑ´Ù.
    MakefileÀ» ÆíÁýÇÑ´Ù.
    ÀÌ ÆÄÀÏ ¾îµò°¡¿¡(±ÔÄ¢À» Á¤ÇÏ´Â ºí·Ïº¸´Ù´Â ¾Õ¿¡ ÀÖ¾î¾ß ÇÑ´Ù.) ROOT = $LFS º¯¼ö¸¦ ³Ö´Â´Ù.
    ÀÌ ÆÄÀÏÀÇ ¸¶Áö¸· ³× ÁÙ¿¡¼­ /dev ¶ó´Â ¹®ÀÚ¿­ ¾Õ¿¡ $(ROOT)¸¦ ºÙÀδÙ.

    ¸¶Áö¸· ³× ÁÙ¿¡ $(ROOT) º¯¼ö¸¦ Àû¿ëÇÑ ´ÙÀ½¿¡, ¾Æ¸¶ ÀÌ·¸°Ô º¸ÀÏ °ÍÀÌ´Ù:
     

    @if [! -p $(ROOT)/dev/initctl ]; then ¡¬
    echo ¡°Creating $(ROOT)/dev/initctl¡± ¡¬
    rm -f $(ROOT)/dev/initctl; ¡¬
    mknod -m 600 $(ROOT)/dev/initctl p; fi


    ¡®make LDFLAGS=-satic¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
    ¡®make install¡¯ ¸í·ÉÀ¸·Î ÆÐÅ°Áö¸¦ ÀνºÅçÇÑ´Ù.

     

    4.2 Configuring Sysvinit

    SysvinitÀÌ ÀÛµ¿Çϱâ À§Çؼ­´Â, ȯ°æ¼³Á¤ ÆÄÀÏÀ» ¸¸µé¾î¾ß ÇÑ´Ù.  ¾Æ·¡ ³»¿ëµéÀ» ´ã°í ÀÖ´Â $LFS/etc/inittab ÆÄÀÏÀ» ¸¸µç´Ù:
     

    # Begin /etc/inittab

    id:2:initdefault:

    si::sysinit:/etc/init.d/rcS

    ~~: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
    z6:6:wait:/sbin/sulogin

    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

    1:2345:respawn:/sbin/sulogin

    # End /etc/inittab


     

    4.3 Copying passwd & group files

    ¿©·¯ºÐÀÌ inittab ÆÄÀÏ¿¡¼­ º¸µíÀÌ, ½Ã½ºÅÛÀÌ ºÎÆ®µÉ ¶§ initÀº sulogin ÇÁ·Î±×·¥À» ½ÃÀÛÇÏ°í, suloginÀº ¿©·¯ºÐ¿¡°Ô ·çÆ® Æнº¿öµå¸¦ ¹°¾îº¼ °ÍÀÌ´Ù.  ÀÌ°ÍÀº LFS ½Ã½ºÅÛ¿¡ Æнº¿öµå ÆÄÀÏÀÌ ÀÖ¾î¾ß ÇÑ´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù.  ¿ì¸®´Â Áö±Ý »ç¿ë ÁßÀÎ ¸®´ª½º ½Ã½ºÅÛÀÇ Æнº¿öµå¿Í ±×·ìÆÄÀÏÀ» °¡Á®´Ù »ç¿ëÇÒ °ÍÀÌ´Ù.  Æнº¿öµå´Â ¾ÏȣȭµÇ¾î(encoded) ÀÖÀ¸¹Ç·Î Áö±Ý »ç¿ëÁßÀÎ passwd ÆÄÀÏÀ» Ä«ÇÇÇؼ­ ±×°ÍÀ» »ç¿ëÇÏ´Â °ÍÀÌ ´õ ½±´Ù.  ¾ÏȣȭµÈ Æнº¿öµå¸¦ ´Ù½Ã ŸÀÌÇÎÇÏ´Â ´ë½Å ±×´ë·Î °¡Á®´Ù ¾²¸é µÈ´Ù.  ÀÌ ¹æ¹ýÀ» »ç¿ëÇÏ¸é ½Ç¼ö¸¦ À¯¹ßÇÒ ¼ö ÀÖ´Â ºÒÇÊ¿äÇÑ ÀÛ¾÷À» ÇÇÇÒ ¼ö ÀÖµµ·Ï ÇØÁØ´Ù.

     /etc/passwd¿Í /etc/group ÆÄÀÏÀ» $LFS/etc/¿¡ º¹»çÇØ ³Ö´Â´Ù.
     $LFS/etc/passwd ÆÄÀÏÀ» ÆíÁý±â·Î ¿­¾î root »ç¿ëÀÚ¸¦ Á¦¿ÜÇÑ ¸ðµç ¶óÀÎÀ» Áö¿î´Ù.
     $LFS/etc/group ÆÄÀÏÀ» ÆíÁý±â·Î ¿­¾î root ±×·ìÀ» Á¦¿ÜÇÑ ¸ðµç ¶óÀÎÀ» Áö¿î´Ù.

     

    4.4 Installing a root shell

    suloginÀÌ ¿©·¯ºÐ¿¡°Ô ·çÆ® Æнº¿öµå¸¦ ¹°¾îº¸°í ¿©·¯ºÐÀÌ Æнº¿öµå¸¦ ÀÔ·ÂÇϸé, ÀÌÁ¦ºÎÅÍ´Â ¼Ð(shell)ÀÌ ÇÊ¿äÇÑ ´Ü°èÀÌ´Ù. ÀÌ °úÁ¤¿¡¼­ ´ë°³´Â bash ¼ÐÀÌ ¾²ÀδÙ. ¾ÆÁ÷ ¾î¶² ¶óÀ̺귯¸®µµ ¼³Ä¡µÇ¾î ÀÖÁö ¾ÊÀ¸¹Ç·Î, ¿ì¸®´Â Sysvinit¿¡¼­ ±×·¨´ø °Íó·³ bash¸¦ Á¤ÀûÀ¸·Î ¸µÅ©ÇØ¾ß ÇÑ´Ù.

    Bash ÆÐÅ°Áö ¾ÐÃàÀ» Ç®¾î³õ´Â´Ù.
    ¡®configure --enable-static-link¡¯ ¸í·ÉÀ» ¼öÇàÇØ Bash ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
    ¡®make¡¯ ¸í·ÉÀ¸·Î ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
    bash ¹ÙÀ̳ʸ®¸¦ $LFS/bin¿¡ º¹»çÇØ ³Ö´Â´Ù.
    $LFS/bin/bash ¹ÙÀ̳ʸ®¸¦ $LFS/bin/sh¶ó´Â À̸§À¸·Î ½Éº¼¸¯ ¸µÅ©¸¦ ¸¸µç´Ù.

     

    4.5 Testing the system

    ÀÌ ¼½¼ÇÀ» ¹«»çÈ÷ ¸¶ÃÆÀ¸¸é, ½Ã½ºÅÛÀ» Å×½ºÆ®ÇÏ°í ·Î±×¿Â ÇÒ ¼ö ÀÖ´ÂÁö È®ÀÎÇØ¾ß ÇÑ´Ù. ¿©·¯ºÐÀº init ÇÁ·Î±×·¥ÀÌ rcS¿Í rc ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÒ ¼ö ¾ø´Ù´Â ¿¡·¯ ¸Þ½ÃÁö¸¦ ¸¸³ª°Ô µÇ°ÚÁö¸¸ ½É°¢ÇÑ °ÍÀº ¾Æ´Ï´Ù. ¿ì¸®´Â ´ÙÀ½ ´Ü°è¿¡¼­ ÀÌ ½ºÅ©¸³Æ®µéÀ» ¼³Ä¡ÇÒ °ÍÀÌ´Ù.

    ¶Ç Çϳª ÁÖÀÇÇÒ °ÍÀº ¿©·¯ºÐÀÌ ½Ã½ºÅÛÀ» ¼Ë´Ù¿î ÇÒ ¼ö ¾ø´Ù´Â °ÍÀÌ´Ù.  shutdown ÇÁ·Î±×·¥Àº Sysvinit ÆÐÅ°Áö¿¡¼­ Á¦°øµÇÁö¸¸ ´ÙÀ½°ú °°Àº ¿¡·¯ ¸Þ½ÃÁö¸¦ º¸¿©ÁÙ °ÍÀÌ´Ù: ¡°You don¡¯t exist. Go away.¡± ÀÌ ¸Þ½ÃÁö´Â ½Ã½ºÅÛÀÌ Æнº¿öµå ÆÄÀÏÀ» ãÀ» ¼ö ¾ø´Ù´Â °ÍÀ» ³ªÅ¸³½´Ù. shutdown ÇÁ·Î±×·¥ÀÌ ÇÊ¿äÇÑ ¶óÀ̺귯¸®¿¡ Á¤ÀûÀ¸·Î ¸µÅ©µÇ¾î ÀÖ´õ¶óµµ, ¿©ÀüÈ÷ ¿ì¸®°¡ ´ÙÀ½ °úÁ¤¿¡ ¼³Ä¡ÇÒ GNU C ¶óÀ̺귯¸® °¡¿îµ¥ ÀϺÎÀÎ nss ¶óÀ̺귯¸® (Name Server Switch)¿¡ ÀÇÁ¸¼ºÀ» °¡Áø´Ù.  NSS ¶óÀ̺귯¸®´Â (»óȲ¿¡ µû¶ó) ¾îµð¼­ passwd ÆÄÀÏÀ» ãÀ» ¼ö ÀÖ´ÂÁö Á¤º¸¸¦ Á¦°øÇÑ´Ù.

    Áö±ÝÀº reboot -f ¸í·ÉÀ¸·Î ½Ã½ºÅÛÀ» ÀçºÎÆ®ÇÒ ¼ö ÀÖ´Ù. ÀÌ ¸í·ÉÀº shutdown ÇÁ·Î±×·¥À» »ç¿ëÇؼ­ ¼Ë´Ù¿î ÇÏ°í, ¹Ù·Î ´Ù½Ã ºÎÆ®ÇÑ´Ù. ÆÄÀϽýºÅÛÀÌ read-only·Î ¸¶¿îÆ®µÇ¾î ÀÖÀ¸¹Ç·Î ÀÌ·¸°Ô Çصµ ½Ã½ºÅÛ¿¡´Â ¾î¶² ¼Õ»óµµ ÀÔÈ÷Áö ¾Ê´Â´Ù.(±×·¸±â´Â Çصµ, ´ÙÀ½¿¡ ½Ã½ºÅÛÀ» ¸¶¿îÆ®ÇÏ·Á ÇÒ ¶§, ÀÌÀü¿¡ ¸¶¿îÆ® Á¤º¸°¡ Á¤¸®µÇÁö ¾ÊÀº ä ½Ã½ºÅÛÀ» ²¨¹ö·ÈÀ¸¹Ç·Î(¡®not unmounted cleanly¡¯), ÆÄÀÏ ½Ã½ºÅÛÀ» ¾ÈÀüÇÏ°Ô »ç¿ëÇÏ·Á¸é e2fsck ÇÁ·Î±×·¥À» ½ÇÇàÇؼ­ Á¤¸®ÇØ¾ß ÇÑ´Ù´Â °æ°í ¸Þ½ÃÁö¸¦ ¸¸³ª°Ô µÉ Áöµµ ¸ð¸£°Ú´Ù.)

     

------------------------------------------------------------------------

5. Installing a kernel

     

    5.1 Note on ftp.kernel.org

    À§ ¼½¼Ç 2¿¡¼­ ³ª´Â ¿©·¯ºÐÀÌ ftp://ftp.kernel.org/¿¡¼­ »õ·Î¿î Ä¿³ÎÀ» ´Ù¿î·ÎµåÇÒ ¼ö ÀÖ´Ù°í ¼³¸íÇßÁö¸¸, ÀÌ »çÀÌÆ®´Â ´ë°³ ³Ê¹« ¸¹Àº Á¢¼ÓÀÚ°¡ ¹°·Á ÀÖ°í, ÀÌ »çÀÌÆ® °ü¸®ÀÚµµ ¿©·¯ºÐ ±Ùó »çÀÌÆ®¿¡¼­ Ä¿³ÎÀ» ´Ù¿î·ÎµåÇÏ´Â ÆíÀÌ ³ªÀ» °Å¶ó°í ±Ç°íÇÑ´Ù. ¿©·¯ºÐÀº ftp://ftp.<country code>.kernel.org/ (¿¹¸¦ µé¾î ftp.ca.kernel.orgó·³)¶ó´Â ÁÖ¼Ò·Î ¹Ì·¯ »çÀÌÆ®¿¡ Á¢¼ÓÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.

     

    5.2 Configuring the kernel

    Ä¿³Î ÆÐÅ°Áö ¾ÐÃàÀ» Ǭ´Ù.

    Ä¿³Î ȯ°æÀ» ¼³Á¤ÇÏ´Â ¹æ¹ý Çϳª¸¦ ¼±ÅÃÇÏ°í(¼³Á¤¹æ¹ý¿¡ ´ëÇØ ´õ ÀÚ¼¼ÇÑ Á¤º¸¸¦ ¾Ë°í ½ÍÀ¸¸é README ÆÄÀÏÀ» Àд´Ù) ¿É¼ÇÀ» ¼³Á¤Çϴµ¥, ÀÌ ´Ü°è¿¡¼­´Â ¾î¶² °Íµµ ¸ðµâ·Î ¼³Á¤Çؼ­´Â ¾ÈµÈ´Ù. ´çºÐ°£Àº Ä¿³Î ¸ðµâÀ» ·ÎµåÇÒ ¼ö ÀÖ´Â ¼ÒÇÁÆ®¿þ¾î°¡ ¾ø±â ¶§¹®ÀÌ´Ù.

    Ä¿³Î ȯ°æ¼³Á¤ÀÌ ³¡³ª¸é ¡®make dep¡¯ ¸í·ÉÀ» ½ÇÇàÇÑ´Ù.
    ¡®make bzImage¡¯ ¸í·ÉÀ¸·Î Ä¿³ÎÀ» ÄÄÆÄÀÏÇÑ´Ù.
    arch/<cpu>/boot/bzImage(¿¹¸¦ µé¾î arch/i386/boot/bzImage) ÆÄÀÏÀ» /boot µð·ºÅ丮¿¡ º¹»çÇØ ³Ö´Â´Ù. (¶Ç´Â, ¿©·¯ºÐÀÇ ¸®´ª½º ½Ã½ºÅÛ¿¡¼­ ´Ù¸¥ ÇüÅ·ΠĿ³Î À̹ÌÁö¸¦ ´Ù·é´Ù¸é ±× ¹æ¹ýÀ» µû¸¥´Ù.)
    /boot/bzImage ÆÄÀÏÀÇ À̸§Àº ¿©·¯ºÐ ¸¶À½´ë·Î Á¤ÇÒ ¼ö ÀÖ´Ù.  ¿¹¸¦ µé¾î /boot/lfskernel µî.

     

    5.3 Updating LILO

    /etc/lilo.conf ÆÄÀÏÀ» ÆíÁý±â·Î ¿­¾î LFS ¼½¼ÇÀ¸·Î °£´Ù. (¡±3¤ý3¡±¿¡¼­ ¸¸µç ºÎºÐ)
     image À̸§À» lfskernel·Î ¹Ù²Ù°í (¶Ç´Â ¿©·¯ºÐÀÌ Á¤ÇÑ À̸§À̳ª, ¹Ù²ÙÁö ¾Ê¾Ò´Ù¸é ¿ø·¡ À̸§ÀÎ bzImage¸¦ ±×´ë·Î) lilo¸¦ ½ÇÇàÇØ ºÎÆ®·Î´õ ¼³Á¤À» ¾÷µ¥ÀÌÆ® ÇÑ´Ù.

     

    5.4 Copying the new kernel source tree to $LFS

    »õ·Î¿î Ä¿³Î ¼Ò½º Àüü Æ®¸®¸¦ $LFS/usr/src ¾Æ·¡ º¹»çÇÑ´Ù. ¡®cp -av <kernel directory> $LFS/usr/src¡¯ ¸í·ÉÀ¸·Î ½±°Ô º¹»çµÈ´Ù.

     

    5.5 Updating sysmlinks

    ´ë°³ /usr/local/include/linux µð·ºÅ丮´Â /usr/src/linux µð·ºÅ丮¿¡ ½Éº¼¸¯ ¸µÅ©µÇ¾î ÀÖ°í, /usr/src/linux µð·ºÅ丮´Â /usr/src/<kernel version>¿¡ ½Éº¼¸¯ ¸µÅ©µÇ¾î ÀÖ´Ù. /usr/src/linux µð·ºÅ丮´Â ¿©·¯ºÐÀÌ ÀÌ ÀåÀÇ Ã¹ ºÎºÐ¿¡¼­ ¼Ò½º ÆÐÅ°Áö¸¦ Ç®¾î³õÀº µð·ºÅ丮¸¦ °¡¸®Å°°í ÀÖ¾î¾ß ÇÑ´Ù.

    /usr/include/linux°¡ /usr/src/linux µð·ºÅ丮¸¦ °¡¸®Å°°Ô ÇÒ ¼öµµ ÀÖ´Ù. - ÀÌ ¹æ¹ýÀº ¿©·¯ºÐÀÌ »ç¿ëÇÏ´Â ¹èÆ÷ÆÇ¿¡ ÀÇÁ¸ÇÑ´Ù.

    LFS ½Ã½ºÅÛ¿¡¼­ ¾Æ·¡ ¸í·ÉµéÀ» ½ÇÇàÇؼ­ Àû´çÇÑ ½Éº¼¸¯¸µÅ©µéÀ» »ý¼ºÇÑ´Ù.
     

    cd $LFS/usr/include
    ln -s ../src/linux/include/asm asm
    ln -s ../src/linux/include/linux linux


    ¸¸¾à ¿©·¯ºÐÀÌ (¹èÆ÷ÆÇÀ¸·ÎºÎÅÍ ¼³Ä¡Çؼ­ Áö±Ý »ç¿ëÇÏ´Â) normal Linux ½Ã½ºÅÛ¿¡¼­ »ç¿ëÇÒ ¼ö ÀÖµµ·Ï ¼ÒÇÁÆ®¿þ¾î¸¦ ÄÄÆÄÀÏÇÏ·Á¸é Ä¿³Î Çì´õ°¡ ÇÊ¿äÇÏ°í, »õ Ä¿³ÎÀ» ·ÎµåÇÏÁö ¾Ê´Â´Ù¸é ½Éº¼¸¯ ¸µÅ©¸¦ Çì´õÀÇ ÁøÂ¥ À§Ä¡·Î µ¹·Á³õ´Â °ÍÀÌ ¹Ù¶÷Á÷ÇÏ´Ù. lfskernelÀ» LFS ½Ã½ºÅÛ°ú nomal Linux ½Ã½ºÅÛ ¾î´À ÂÊ¿¡¼­ »ç¿ëÇصµ  ¾ÈÀüÇÏ´Ù.

     

    5.6 Testing the system

    ½Ã½ºÅÛÀ» ÀçºÎÆ®Çؼ­ LFS ½Ã½ºÅÛÀ» ½ÃÀÛÇÑ´Ù.  »õ·Î ÀνºÅçÇÑ Ä¿³ÎÀÌ ÀÌ»ó µ¿ÀÛÀ» º¸ÀÌÁö ¾Ê´ÂÁö °Ë»çÇÑ´Ù.(crashing °°Àº)

     

------------------------------------------------------------------------

6. Installing the GNU C Library

     

    6.1 Preparing the system for the GNU C Library installation

    ÀÌ ¼½¼Ç¿¡¼­ ¿ì¸®´Â Glibc¸¦ ¼³Ä¡ÇÒ °ÍÀÌ´Ù. ±×·¸Áö¸¸ ÀÌµé ¶óÀ̺귯¸®¸¦ ¼³Ä¡ÇÏ·Á¸é ¸ÕÀú, ´Ù¸¥ ¼ÒÇÁÆ®¿þ¾îµéÀ» LFS ½Ã½ºÅÛ¿¡ ¼³Ä¡ÇØ¾ß ÇÑ´Ù. ÀÌ°ÍÀº Àӽà ÀÛ¾÷ °¡¿îµ¥ ¸Å¿ì ÀÛÀº ÇÑ ºÎºÐÀ» ¶æÇϴµ¥, Glibc¿Í GNU CC ÄÄÆÄÀÏ·¯°¡ ÀνºÅç µÈ ´ÙÀ½ ¸ÕÀú ¼³Ä¡µÈ ÇÁ·Î±×·¥µéÀÌ µ¿ÀûÀ¸·Î ¶óÀ̺귯¸®¿¡ ¸µÅ©µÇ¹Ç·Î ÀÌ ÈÄ¿¡ ÇÁ·Î±×·¥ ¸ðµÎ¸¦ ´Ù½Ã ¼³Ä¡ÇÒ °ÍÀÌ´Ù.  ¸ÕÀú ¸ðµç ¼ÒÇÁÆ®¿þ¾î¸¦ Á¤ÀûÀ¸·Î ±¸¼ºÇÏ°í ´Ù½Ã ±×µéÀ» µ¿ÀûÀ¸·Î À籸¼ºÇÏ´Â º¹ÀâÇÑ °úÁ¤À» °ÅÄ¡Áö ¾Ê°íµµ ÀÌ ÀÛ¾÷À» ÇÒ ¼ö ÀÖ´Â ´õ ÁÁÀº ¹æ¹ýÀ» ¾Ë°í ÀÖ´Ù¸é ºÎµð ³»°Ôµµ ¾Ë·ÁÁֱ⠹ٶõ´Ù.

    ³ª´Â ´Ù¸¥ ¹æ¹ýÀ» Çϳª ´õ ¾Æ´Âµ¥ Àüó¸®µÈ ¹ÙÀ̳ʸ®¸¦ ÀÌ¿ëÇØ Glibc¸¦ ¼³Ä¡ÇÏ´Â °ÍÀÌ´Ù. ±×·¸Áö¸¸ ±× ¹æ¹ýÀº ¿ì¸®°¡ Áö±Ý ÇÏ´Â ÀÛ¾÷(¼Ò½º¸¸À¸·Î ¸®´ª½º ½Ã½ºÅÛÀ» ±¸¼ºÇÏ´Â)¿¡ ¾î¿ï¸®Áö ¾Ê´Â´Ù. ±×·¯¹Ç·Î ±× ¹æ¹ýÀº ¼±ÅÃÇÏÁö ¾Ê°Ú´Ù.

    ÀÌ ¼½¼Ç¿¡¼­ ¼³Ä¡µÇ´Â ¸ðµç ¼ÒÇÁÆ®¿þ¾î´Â ¿ì¸®°¡ Áö±Ý ÀÛ¾÷ÁßÀÎ normal Linux ¸®´ª½º ½Ã½ºÅÛ¿¡¼­ ÄÄÆÄÀÏµÇ°í ´Ù½Ã LFS ½Ã½ºÅÛÀ¸·Î º¹»çµÉ °ÍÀÌ´Ù.

    ¿©·¯ºÐÀº ÀÌ·± ¼ÒÇÁÆ®¿þ¾î ¼³Ä¡°¡ ´ë°³ÀÇ °æ¿ì ¸Å¿ì ½±´Ù´Â °ÍÀ» ¾Ë°Ô µÉ °ÍÀÌ´Ù.  ³ª´Â ¶Ç, ÀÌ·± ¼ÒÇÁÆ®¿þ¾î´Â ¸ðµÎ ÀÏ»óÀûÀÎ °Íµé·Î, °¢°¢ ¾î¶² ÀÏÀ» ÇÏ´ÂÁö ±»ÀÌ ¼³¸íÇÏÁö ¾ÊÀ» °ÍÀ̹ǷÎ, ¸¸¾à ¾î¶² °÷¿¡ ¾²ÀÌ´Â ÇÁ·Î±×·¥ÀÎÁö ¸ð¸¥´Ù¸é ±× ¶§¸¶´Ù ¿©·¯ºÐ ½º½º·Î README ÆÄÀÏ°ú ´Ù¸¥ ¹®¼­µé(/usr/doc ¶Ç´Â http://kldp.org/¿¡¼­ Á¦°øÇÏ´Â ¹®¼­µé)À» Àд °ÍÀÌ ÁÁ°Ú´Ù.

      Installing Make

      Make ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure ¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      make ¹ÙÀ̳ʸ®¸¦ $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù.

      Installing Sed

      sed ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure ¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      sed ¹ÙÀ̳ʸ®¸¦ $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù.

      Installing Shell Utils

      Shell Utils ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      srcµð·ºÅ丮¿¡ ¸¸µé¾îÁø ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/binµð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù:
      date echo false pwd sleep stty su true uname
      src µð·ºÅ丮¿¡ ¸¸µé¾îÁø ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/sbin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: chroot

      Installing File Utils

      File Utils ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: chgrp chmod chown cp dd df dir dircolors du ln ls mkdir mkfifo mknod rm rmdir sync touch vdir
      ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: ginstall
      $LFS/usr/bin/ginstall ÆÄÀÏ À̸§À» $LFS/usr/bin/install ·Î ¹Ù²Û´Ù.

      Installing Util Linux

      Installing Utils ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      lib µð·ºÅ丮·Î °¡¼­ ¡®make¡¯ ¸í·ÉÀ¸·Î ÆÄÀϵéÀ» ÄÄÆÄÀÏÇÑ´Ù.
      mount µð·ºÅ丮·Î °¡¼­ ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
      ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/sbin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: losetup mount swapon umount
      $LFS/sbin/swaponÀ» $LFS/sbin/swapoff¶õ À̸§À¸·Î ½Éº¼¸¯ ¸µÅ©ÇÑ´Ù.

      Installing Text Utils

      Text Utils ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      src µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: cat
      src µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù:
      cksum comm csplit cut expand fmt fold head join md5sum nl od paste pr sort split sum tac tail tr unexpand uniq wc

      Installing Tar

      Tar ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇϸé src µð·ºÅ丮¿¡ ÇÁ·Î±×·¥ÀÌ µÎ °³ »ý±ä´Ù: tar¿Í rmt.
      Tar´Â Àß ¾Æ´Â ÇÁ·Î±×·¥ÀÌ°í. Rmt´Â ReMote Tapesever¸¦ ¶æÇÑ´Ù. ¿©·¯ºÐ¿¡°Ô ÀÌ ÇÁ·Î±×·¥ÀÌ ÇÊ¿ä ¾ø´Ù¸é (¿¹¸¦ µé¾î ¿©·¯ºÐ ³×Æ®¿öÅ©³ª ¸Ó½Å¿¡ Å×ÀÌÇÁ ½ºÆ®¸®¸Ó-tape streamer°¡ ¾ø´Ù¸é) ÀÌ ÇÁ·Î±×·¥Àº Ä«ÇÇÇÒ ÇÊ¿ä ¾ø´Ù.
      src/tar ¹ÙÀ̳ʸ®¸¦ $LFS/bin¿¡ Ä«ÇÇÇÑ´Ù.
      src/rmt ¹ÙÀ̳ʸ®¸¦ $LFS/bin¿¡ (¿©·¯ºÐ¿¡°Ô ÇÊ¿äÇÏ´Ù¸é) Ä«ÇÇÇÑ´Ù.

      Installing Gzip

      Gzip ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.

      ³ª´Â Gzip ¹öÀü 1.2.4¸¦ »ç¿ëÇϴµ¥ ÄÄÆÄÀÏ ÀÛ¾÷À» ÁøÇàÇÏ´Â µ¿¾È ¿¡·¯ ¸Þ½ÃÁö¸¦ ¸¸³µ´Ù: basename¿¡ ¼³Á¤µÈ ÀÚ·áÇüÀÌ »óÃæµÈ´Ù´Â °ÍÀÌ´Ù. ¿©·¯ºÐ¿¡°Ôµµ ÀÌ ¿¡·¯¿¡ ÀÇÇÑ ¹®Á¦°¡ »ý±ä´Ù¸é, ´ÙÀ½ °úÁ¤À» ÅëÇØ ¹Ù·ÎÀâÀ» ¼ö ÀÖ´Ù:

      gzip.h ÆÄÀÏÀ» ÆíÁý±â·Î ¿­¾î ´ÙÀ½ ÁÙÀ» ã´Â´Ù:
      extern char *basename OF((char *fname));  

      ÀÌ ÁÙÀ» ´ÙÀ½°ú °°ÀÌ ¹Ù²Û´Ù: extern char *basename2
      OF((char *fname));

      util.c ÆÄÀÏÀ» ¿­¾î ´ÙÀ½ ÁÙÀ» ã´Â´Ù:
      char *basename(fname)
      ÀÌ ÁÙÀ» ´ÙÀ½°ú °°ÀÌ ¹Ù²Û´Ù: char *basename2(fname)

      ÀÌÁ¦ ÆÐÅ°Áö¸¦ ´Ù½Ã ÄÄÆÄÀÏ Çغ¸¸é(make LDFLAGS=-static ¸í·ÉÀ» ´Ù½Ã ½ÇÇàÇÑ´Ù.) ¿¡·¯°¡ °íÃÄÁ³À» °ÍÀÌ´Ù.

      ¹¹°¡ À߸øµÇ¾úÀ»±î? ³» ½Ã½ºÅÛ¿¡¼­ Ç¥ÁØ ½Ã½ºÅÛ Çì´õ ÆÄÀÏ °¡¿îµ¥ Çϳª°¡ ¡®basename¡¯À̶õ À̸§À» °¡Áø ÇÔ¼ö¿´´Ù.(³»°¡ »ý°¢Çϱ⿡ string.h¿´´ø °Í °°Àºµ¥ ´õ ÀÌ»óÀº Àß ¸ð¸£°Ú´Ù) Gzip ÇÁ·Î±×·¥Àº ±× ÀÚü¿¡ ÀÌ ÇÔ¼ö¸¦ °¡Áö°í ÀÖ°í, ¶Ç basenameÀ̶õ À̸§À» ¶È°°ÀÌ »ç¿ëÇϹǷΠ¾Æ¸¶ ¿©·¯ºÐ¿¡°Ôµµ ±×·± ¹®Á¦°¡ »ý±æ °ÍÀÌ´Ù. Gzip ¼Ò½º¿¡¼­ basename ÇÔ¼ö¸¦ basename2¶ó´Â À̸§À¸·Î ¹Ù²Ù¸é ¹®Á¦°¡ ÇØ°áµÈ´Ù.

      .inÀ̶ó´Â ²¿¸®(extension)¸¦ °¡Áø ´ÙÀ½ ÆÄÀϵéÀ» Áö¿î´Ù: gzexe.in zdiff.in zforce.in zgrep.in zmore.in znew.in

      ´ÙÀ½ ÆÄÀϵéÀ» $LFS/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù:  
      gunzip gzexe gzip zcat zdiff zforce zgrep zmore znew

      Installing Binutils

      BinUtils ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
      gas µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: as-new gasp-new
      ±× ÆÄÀϵé À̸§À»$LFS/usr/bin/as¿Í $LFS/usr/bin/gasp·Î ¹Ù²Û´Ù.
      ld µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: ld-new
      ±× ÆÄÀÏÀ» $LFS/usr/bin/ld¶õ À̸§À¸·Î ¹Ù²Û´Ù.
      binutils µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: addr2line ar c++filt nm-new objcopy objdump ranlib size strings strip-new
      $LFS/usr/bin/nm-new ÆÄÀÏÀ» $LFS/usr/bin/nm¶õ À̸§À¸·Î ¹Ù²Û´Ù.
      $LFS/usr/bin/strip-new ÆÄÀÏÀ» $LFS/usr/bin/strip¶õ À̸§À¸·Î ¹Ù²Û´Ù.

      Installing Grep

      Grep ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      /configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
      src µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/usr/bin
      µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: egrep fgrep grep

      Installing Bison

      Bison ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.  
      ¡®make LDFLAGS=-static¡¯ ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
      ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: bison
      ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/usr/share µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: bison.hairy bison.simple

      Installing Mawk

      Mawk ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      make CFLAGS=¡±-O -static¡± ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
      ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: mawk
      $LFS/usr/bin/awk¶õ À̸§À¸·Î $LFS/usr/bin/mawk ÆÄÀÏÀ» ½Éº¼¸¯ ¸µÅ©ÇÑ´Ù.

      Installing Find Utils

      Utils ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      make CFLAGS=-static ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.

      ³ª´Â Find Utils 4.1 ¹öÀüÀ» »ç¿ëÇϴµ¥ ÄÄÆÄÀÏÀ» ÁøÇàÇÏ´Â µ¿¾È ¿¡·¯¸¦ ¸¸³ª°Ô µÇ¾ú´Ù. Ä¡¸íÀûÀÎ ¿¡·¯(fatal error)À̱â´Â ÇÏÁö¸¸ ¿¡·¯°¡ ¹ß»ýÇßÀ» ¶§ ÄÄÆÄÀÏ ÀÛ¾÷ÀÌ ¸ØÃßÁö´Â ¾Ê¾Ò´Ù. ¿©·¯ºÐÀÌ ´ÙÀ½ ¿¡·¯¸¦ ¸¸³­´Ù¸é ÄÄÆÄÀÏ °úÁ¤¿¡¼­ Ãâ·ÂµÇ´Â Á¤º¸µéÀ» ÁÖÀÇ ±í°Ô »ìÆ캼 ÇÊ¿ä°¡ ÀÖ´Ù: defs.h304: ¿ª½Ã basename ÀÚ·áÇüÀÌ »óÃæÇÏ´Â °ÍÀÌ´Ù.

      ±×·± ¿¡·¯ ¶§¹®¿¡ ¹®Á¦°¡ »ý±ä´Ù¸é ´ÙÀ½ °úÁ¤À» ÅëÇØ ¹Ù·ÎÀâÀ» ¼ö ÀÖ´Ù:

      find/Makefile ÆÄÀÏÀ» ÆíÁý±â·Î ¿­¾î ´ÙÀ½ º¯¼ö¸¦ ã´Â´Ù: CFLAGS
      ÀÌ º¯¼ö¿¡ -D_GNU_SOURCE ¶ó´Â °ªÀ» Ãß°¡ÇÑ´Ù.
      find/defs.h ÆÄÀÏÀ» ÆíÁý±â·Î ¿­¾î ´ÙÀ½ ÁÙÀ» ã´Â´Ù:
      char *basename P_((char *fname));  

      ±× ÁÙÀ» ´ÙÀ½°ú °°ÀÌ ¹Ù²Û´Ù:
       char *basename2 P_((char *fname));
       find/util.c ÆÄÀÏÀ» ÆíÁý±â·Î ¿­¾î ´ÙÀ½ ÁÙÀ» ã´Â´Ù:
       char *basename (fname)

      ÀÌ ÁÙÀº µÎ ÁÙ·Î ºÐ¸®µÈ´Ù (¡°char *¡±°¡ ù ¹ø° ÁÙÀÌ°í µÎ ¹ø° ÁÙÀº ¡°basename (fname)¡±ÀÌ´Ù)

      ±× ÁÙÀ» ´ÙÀ½°ú °°ÀÌ ¹Ù²Û´Ù:
      char *basename2 (fname)

      ±»ÀÌ µÎ ÁÙ·Î °è¼Ó µÎÁö ¾Ê¾Æµµ µÇÁö¸¸, ²À ±×·¸°Ô ÇÏ°í ½Í´Ù¸é ¿©·¯ºÐÀÌ ¿øÇÏ´Â ´ë·Î µÎ¾îµµ »ó°ü¾ø´Ù.  ¿©·¯ºÐÀÌ º¸±â¿¡ ´õ ¸¾¿¡ µå´Â °ÍÀ¸·Î Á¤ÇÑ´Ù.

      ÀÌÁ¦ ÆÐÅ°Áö¸¦ ´Ù½Ã ÄÄÆÄÀÏ Çغ¸¸é(make LDFLAGS=-static ¸í·ÉÀ» ´Ù½Ã ½ÇÇàÇÑ´Ù.) ¿¡·¯°¡ °íÃÄÁ³À» °ÍÀÌ´Ù. find µð·ºÅ丮¿¡¼­ ´ÙÀ½ ÆÄÀÏÀ» $LFS/usr/bin µð·ºÅ丮·Î º¹»çÇÑ´Ù: find

      Installing Diff Utils

      Diff ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      make LDFLAGS=-static ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
      ´ÙÀ½ ¹ÙÀ̳ʸ®µéÀ» $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: diff diff3 sdiff

      Installing Ld.so

      Ld.so ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      util µð·ºÅ丮·Î °£´Ù.
      make ldd ¸í·ÉÀ¸·Î ldd¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      make ldconfig ¸í·ÉÀ¸·Î ldconfig¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: ldd
      ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/usr/sbin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: ldconfig

      Installing Perl

      Perl ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.

      ¿©·¯ºÐÀº ¾Æ·¡ Áú¹®µéÀ» Á¦¿ÜÇÏ°í, ¸ðµç Áú¹®¿¡ ´ëÇØ ±âº» °ªÀ» ±×´ë·Î µÎ¾îµµ µÈ´Ù.
       

      What is the file extension used for shared libraries? [so]

      Answer with: none

      Any additional ld flags (NOT including libraries)? [-L/usr/local/lib]

      Answer with: -L/usr/local/lib -static

      Do you wish to use dynamic loading? [y]

      Answer with: n


      make ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: perl

      Installing M4

      M4 ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      make LDFLAGS=-static ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
      src µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: m4

      Installing Texinfo

      Texinfo ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      make LDFLAGS=-static ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
      makeinfo µð·ºÅ丮¿¡¼­ ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: makeinfo

      Installing Automake

      automake ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      ´ÙÀ½ ½ºÅ©¸³Æ®µéÀ» $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: automake aclocal
      ´ÙÀ½ µð·ºÅ丮¸¦ ¸¸µç´Ù: $LFS/usr/share/automake
      ´ÙÀ½ ÆÄÀϵéÀ» $LFS/usr/share/automake µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù:
      config.guess config.sub install-sh mdate-sh missing mkinstalldirs elisp-comp ylwrap acinstall

      ´ÙÀ½ ÆÄÀϵéÀ» $LFS/usr/share/automake µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: All *.am files

      ´ÙÀ½ µð·ºÅ丮¸¦ ¸¸µç´Ù:
      $LFS/usr/share/aclocal m4 µð·ºÅ丮·ÎºÎÅÍ ´ÙÀ½ ÆÄÀϵéÀ» $LFS/usr/shar- e/aclocalµð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: all *.m4 files

      Installing Autoconf

      Autoconf ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
      make ¸í·ÉÀ» ½ÇÇàÇؼ­ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
      ´ÙÀ½ ÆÄÀϵéÀ» $LFS/usr/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: autoconf autoheader autoreconf autoscan autoupdate ifnames
      ´ÙÀ½ µð·ºÅ丮¸¦ ¸¸µç´Ù: $LFS/usr/share/autoconf
      ´ÙÀ½ ÆÄÀϵéÀ» $LFS/usr/share/autoconf µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù:
      acconfig.h acfunctions acheaders acidentifiers acprograms acmakevars

     

    6.2 Installing the GNU C Library

    ¿ì¸®´Â ÃÖ±Ù Glibc ¹öÀüÀÎ, 2.1.2¸¦ ¼³Ä¡ÇÏÁö ¾Ê°í ÀÌÀü ¹öÀü 2.0.7pre6À» »ç¿ëÇÒ °ÍÀÌ´Ù. ±× ±î´ßÀº glibc 2.1.2 ¹öÀüÀÌ ÃÖ¼ÒÇÑ gcc 2.8(¶Ç´Â egcs 1.1)¹öÀü ÀÌ»óÀ» ¿ä±¸Çϱ⠶§¹®ÀÌ´Ù. ³» ½Ã½ºÅÛ¿¡´Â gcc 2.7.2.3 ¹öÀüÀÌ ¼³Ä¡µÇ¾î ÀÖÀ¸¹Ç·Î ³ª´Â glibc 2.1.2 ¶óÀ̺귯¸®¸¦ ÄÄÆÄÀÏ ÇÒ ¼ö ¾ø´Ù. ±×¸®°í ¶Ç, ³ª´Â Áö±Ý »ç¿ëÁßÀÎ ¸®´ª½º ½Ã½ºÅÛÀ» gcc 2.95.2 ¹öÀüÀ¸·Î ¾÷±×·¹À̵åÇÒ »ý°¢µµ ¾ø´Ù.(gcc 2.95.2´Â ÀÌ ±ÛÀ» ¾²´Â µ¿¾È °¡Àå ÃÖ±Ù ¹öÀüÀÌ´Ù.) ÄÄÆÄÀÏ·¯¸¦ ¾÷±×·¹À̵åÇÏ´Â °ÍÀÌ ¸»Ã³·³ ±×·¸°Ô ½¬¿î Àϵµ ¾Æ´Ï°í ³ª´Â ³» ½Ã½ºÅÛÀÌ ¾î¼´Ù ¸Á°¡Áö´Â °ÍÀ» °áÄÚ ¹Ù¶óÁö ¾Ê´Â´Ù.

    ±×·¯¹Ç·Î ³ª´Â glibc 2.0.7pre6 ¹öÀüÀ» ¼³Ä¡ÇØ¾ß ÇÑ´Ù.  ±×·¸Áö¸¸, ¿ì¸®´Â gcc 2.95.2 ÄÄÆÄÀÏ·¯´Â ¼³Ä¡ÇÏ°Ô µÉ °ÍÀÌ´Ù. ±×¸®°í, ¾î¶² ¼ÒÇÁÆ®¿þ¾î´Â gcc 2.95.2 ¹öÀü¿¡¼­´Â ÄÄÆÄÀϵÇÁö ¾Ê´Â °Íµµ ÀÖÀ¸¹Ç·Î, ±×·± °ÍµéÀ» À§ÇØ gcc 2.7.2.3 ÄÄÆÄÀÏ·¯µµ ¼³Ä¡ÇØ¾ß ÇÑ´Ù. (ÁøÂ¥ ¹ö±×°¡ ¾Æ´Ñµ¥µµ ÇÁ·Î±×·¥ »óÀÇ ¹ö±× ¶§¹®¿¡, gcc 2.95.2 ÄÄÆÄÀÏ·¯´Â ¹ö±×¶ó°í ÆÇ´ÜÇÑ´Ù. ±×·¸´Ù°í ÄÄÆÄÀÏ·¯ ¹ö±×´Â ¾Æ´Ï°í, C Ç¥ÁØÀÌ ¹Ù²ï °ÍÀÌ´Ù(³»°¡ Á¦´ë·Î ÀÌÇØÇÏ°í ÀÖ´Ù¸é ¾Æ¸¶..)

    ¾Æ·¡´Â glibc-crypt ÆÐÅ°Áö»óÀÇ ³ëÆ®ÀÌ´Ù. ¾Æ·¡´Â ftp://ftp.gnu.org/gnu/glibc¿¡¼­ ±¸ÇÑ glibc-crypt-README ÆÄÀϷκÎÅÍ ÀοëÇÑ ±ÛÀÌ´Ù:
     

    ÇÁ¶û½º, ·¯½Ã¾Æ µî ¾î¶² Á¤ºÎµé, -ƯÈ÷ US´Â ¶óÀ̼±½º ¾øÀÌ ÀÎÅͳÝÀ» ÅëÇØ ¾Ïȣȭ¿Í °ü·ÃµÈ ¼ÒÇÁÆ®¿þ¾î°¡ ÇØ¿Ü·Î ¹ÝÃâµÇ´Â °ÍÀ» Çã¿ëÇÏÁö ¾ÊÀ¸¹Ç·Î, ¿©·¯ºÐÀÌ US°¡ ¾Æ´Ñ °÷¿¡ »ì°í ÀÖ´Ù¸é À̰͵éÀ» ftp.gnu.org¿¡ ÀÖ´Â ÁÖ FSF FTP »çÀÌÆ®¿¡¼­ ¹ÞÀ¸¸é ¾ÈµÇ¸ç, ÀÌ ¼ÒÇÁÆ®¿þ¾î´Â US¿Í ÀüÇô »ó°ü¾ø´Â °÷¿¡¼­ °³¹ßµÇ¾ú´Ù´Â ±×·± ¶æÀ» ´ã°í ÀÖ´Ù.

     

    -------------------------»ý·«--------------------------
    In particular, the US does not allow export of this software without a
    license, including via the Internet. So please do not download it from the
    main FSF FTP site at ftp.gnu.org if you are outside of the US. This software
    was completely developed outside the US.


    À§¿¡¼­ ¡°ÀÌ ¼ÒÇÁÆ®¿þ¾î¡±¶õ ftp://ftp.gwdg.de/pub/lin-
    ux/glibc/2.0.7pre6/·ÎºÎÅÍ °¡Á®¿Â glibc-crypt ÆÐÅ°Áö¸¦ ¸»ÇÑ´Ù. ÀÌ ¹ý±Ô´Â US ¾È¿¡ »ìÁö ¾Ê´Â »ç¶÷µé¿¡°Ô¸¸ Àû¿ëµÈ´Ù. ±×¸®°í, DES ¼ÒÇÁÆ®¿þ¾î¸¦ µé¿©¿À´Â °ÍÀº ¸·Áö ¾ÊÀ¸¹Ç·Î, ¿©·¯ºÐÀÌ US ¾È¿¡ »ì°í ÀÖ´Ù¸é µ¶ÀÏ »çÀÌÆ®·ÎºÎÅÍ µé¿©¿À´Â °ÍÀº °¡´ÉÇÏ´Ù.

    Glibc ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
    glibc-crypt¿Í glibc-linuxthreads ÆÐÅ°Áö¸¦ Ç®¾î³õÀº
    glibc µð·ºÅ丮·Î ¿Å±ä´Ù.
    glibc-crypt¿Í glibc-linuxthreads ÆÐÅ°Áö ¾ÐÃàÀ» ±× °÷¿¡ Ǭ´Ù.
    ¡®./configure  --with-gnu-binutils  --enable-shared  --enable-add-ons=linuxthreads,crypt¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.(glibc ÃÖ»óÀ§ µð·ºÅ丮¿¡¼­)

    ´ÙÀ½ ³»¿ëÀ» ³Ö¾î¼­ configparms ÆÄÀÏÀ» »õ·Î ¸¸µç´Ù.
     

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


    make ¸í·ÉÀ» ½ÇÇàÇؼ­ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
    LFS ½Ã½ºÅÛÀ¸·Î ÄÄÇ»Å͸¦ ÀçºÎÆ®ÇÑ´Ù.
    LFS ÆÄƼ¼ÇÀ» read-write ¸ðµå·Î ´Ù½Ã ¸¶¿îÆ®ÇÑ´Ù.
    Glibc ¼Ò½º ÆÄÀϵéÀÌ µé¾î ÀÖ´Â ÆÄƼ¼ÇÀ» ¸¶¿îÆ®ÇÑ´Ù.
    ¸¸¾à ÀÌ ÆÄƼ¼ÇÀÌ ÀÏ»óÀûÀ¸·Î ¸¶¿îÆ®ÇÏ´Â ¿©·¯ºÐÀÇ /usr µð·ºÅ丮¿Í ´Ù¸£´Ù¸é ±× ÆÄƼ¼Çµµ ¸¶¿îÆ®ÇÑ´Ù.
    ÀϹÝÀûÀÎ ¸®´ª½º ½Ã½ºÅÛ¿¡¼­ usr/lib/gcc-lib µð·ºÅ丮¸¦ /usr/lib/gcc-lib¶õ À̸§À¸·Î ½Éº¼¸¯ ¸µÅ©¸¦ ¸¸µç´Ù.
    Glibc ¼Ò½º µð·ºÅ丮·Î °£´Ù.
    make install ¸í·ÉÀ¸·Î ÆÐÅ°Áö¸¦ ÀνºÅç ÇÑ´Ù.
    /usr/lib/gcc-lib ½Éº¼¸¯ ¸µÅ©¸¦ »èÁ¦ÇÑ´Ù.

    ¿©·¯ºÐÀÇ normal Linux ÆÄƼ¼Ç bin µð·ºÅ丮¿¡ ÀÖ´Â ls ÇÁ·Î±×·¥À» ½ÇÇàÇؼ­ »õ·Î ¼³Ä¡ÇÑ ¶óÀ̺귯¸®¸¦ °£´ÜÇÏ°Ô Å×½ºÆ®ÇÒ ¼ö ÀÖ´Ù.  ¿©·¯ºÐÀÌ ¾î¶² ¿¡·¯µµ ¸¸³ªÁö ¾Ê°í ÀÌ ÇÁ·Î±×·¥À» ½ÇÇàÇÒ ¼ö ÀÖ´Ù¸é GNU C ¶óÀ̺귯¸®´Â Á¦´ë·Î ÀνºÅç µÈ °ÍÀ̶ó°í º¸¸é µÈ´Ù.

 

------------------------------------------------------------------------

7. Installing the GNU CC compilers

    ¿©·¯ºÐÀº gcc ÄÄÆÄÀÏ·¯¸¦ ÄÄÆÄÀÏÇϱâ À§ÇØ ½Ã½ºÅÛÀ» ´Ù½Ã ½ÃÀÛÇؼ­ normal LinuxÀ¸·Î µ¹¾Æ°¡¾ß ÇÑ´Ù.

     

    7.1 Installing GCC 2.95.2

    GCC ¼³Ä¡ ³ëÆ®´Â ¿ÀºêÁ§Æ® ÆÄÀÏÀ» º°µµÀÇ µð·ºÅ丮¿¡ µÑ °ÍÀ» ±ÇÇÑ´Ù.  ÀÌ°ÍÀº gcc ¼Ò½º°¡ ³õÀÎ µð·ºÅ丮¿Í, ÄÄÆÄÀÏµÈ ÆÄÀϵéÀÌ ³õÀÏ ¶Ç ´Ù¸¥ µð·ºÅ丮°¡ ¸¸µé¾îÁ®¾ß ÇÑ´Ù´Â °ÍÀ» ¶æÇÑ´Ù.  ¿¹¸¦ µé¾î gcc ÆÐÅ°Áö¸¦ /usr/src/gcc-2.95.2 µð·ºÅ丮¿¡ Ç®¾î³õ°í, /usr/src/gcc-install À̶õ À̸§À¸·Î ´Ù¸¥ µð·ºÅ丮¸¦ ¸¸µé ¼öµµ ÀÖ´Ù.

    GCC ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
    gcc-install µð·ºÅ丮·Î °£´Ù.
    ¡®../gcc-2.95.2/configure --prefix=/usr --enable-
    shared¡¯ ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
    make bootstrap ¸í·ÉÀ» ½ÇÇàÇؼ­ ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÑ´Ù.
    ´ÙÀ½ ³»¿ëÀ» ´ã¾Æ $LFS/root/test.c ÆÄÀÏÀ» ¸¸µç´Ù.
     

       // Begin test.c
       #include <stdio.h>
       int main() {
          printf(¡°Hello World!¡¬n¡±);
          return 0;
       }
       // End test.c


    ´ÙÀ½ ³»¿ëÀ» ´ã¾Æ $LFS/root/test2.c ÆÄÀÏÀ» ¸¸µç´Ù.
     

      // Begin test2.c
       #include <iostream.h>
       int main() {
          cout << ¡°Hello World!¡± << endl;
          return 0;
       }
       // End test2.c


    ÄÄÇ»Å͸¦ LFS ½Ã½ºÅÛÀ¸·Î ´Ù½Ã ºÎÆ®ÇÑ´Ù.
    LFS ÆÄƼ¼ÇÀ» read-write ¸ðµå·Î ´Ù½Ã ¸¶¿îÆ®ÇÑ´Ù.
    gcc-2.95.2¿Í gcc-install µð·ºÅ丮¸¦ Æ÷ÇÔÇÏ°í ÀÖ´Â ÆÄƼ¼ÇÀ» ¸¶¿îÆ®ÇÑ´Ù.
    gcc ¼Ò½º ÆÄÀϵéÀ» ´ã°í ÀÖ´Â usr/src/gcc-2.95.2 µð·ºÅ丮¸¦ /usr/src/gcc-2.95.2¶ó´Â À̸§À¸·Î ½Éº¼¸¯  ¸µÅ©¸¦ ¸¸µç´Ù.
    gcc-install µð·ºÅ丮·Î °£´Ù.
    make install ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÑ´Ù.
    /root µð·ºÅ丮·Î °£´Ù.
    gcc test.c -o test ¸í·ÉÀ» ½ÇÇàÇؼ­ test.c¸¦ Compile+linkÇÑ´Ù.
    g++ test2.c -o test2 ¸í·ÉÀ» ½ÇÇàÇؼ­ test2.c¸¦ Compile+linkÇÑ´Ù.
    µÎ ÇÁ·Î±×·¥À» ½ÇÇàÇÑ´Ù
    µÎ ÇÁ·Î±×·¥ ¸ðµÎ ¿¡·¯¾øÀÌ µ¿ÀÛÇϰųª ¸ØÃç¹ö¸®¸é /usr/src/gcc-2.95.2 ½Éº¼¸¯ ¸µÅ©¸¦ Áö¿öµµ ÄÄÆÄÀÏ·¯¿Í ¸µÄ¿°¡ µ¿ÀÛÇÒ °ÍÀÌ´Ù.

     

    7.2 Installing GCC 2.7.2.3

      gcc-2.7.2.3 ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.

      configure --prefix=/usr/gcc2723 --enable-shared

    ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
    ȯ°æÀ» ¼³Á¤ÇÏ´Â ½ºÅ©¸³Æ®°¡ ½Ã½ºÅÛ Å¸ÀÔÀ» °áÁ¤ÇÏÁö ¸øÇÏ°Ú´Ù°í ¸»Çϸé, configure --host=<cpu>-linux-gnu --prefix=/usr/gcc2723 --enable-shared ¸í·ÉÀ¸·Î ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.

    <cpu> ÀÚ¸®¿¡´Â ¿©·¯ºÐ ½Ã½ºÅÛ¿¡ ¸Â´Â °ªÀ» ³Ö´Â´Ù.  ¿©·¯ºÐÀÌ Pentium ½Ã½ºÅÛÀ» °¡Áö°í ÀÖ´Ù¸é i586À» ÀÔ·ÂÇÑ´Ù. ¿©·¯ºÐÀÌ PII ¶Ç´Â ±× ÀÌ»óÀÇ ½Ã½ºÅÛÀ» °¡Áö°í ÀÖ´Ù¸é i686À» ³Ö´Â´Ù. ¸¸¾à ¿©·¯ºÐÀÌ Intel ±â¹ÝÀÇ Ç÷§ÆûÀ» °¡Áö°í ÀÖÁö ¾Ê´Ù¸é, ¹«¾ùÀ» ³Ö¾î¾ß ÇÒÁö ½º½º·Î ÆÇ´ÜÇØ¾ß ÇÑ´Ù.
    (³»°¡ ÀÎÅÚ ±â¹ÝÀÇ Ç÷§Æû¸¸ »ç¿ëÇØ º¸¾ÒÀ¸¹Ç·Î ´Ù¸¥ Ç÷§Æû¿¡ ´ëÇÑ Á¶¾ðÀº ÇÒ ¼ö ¾ø´Ù.  ½½ÇÁ°Ôµµ, ³ª´Â ¾ËÆÄ(alpha)³ª ½ºÆÅ(sparc) ¶Ç´Â ±× ¹ÛÀÇ ½Ã½ºÅÛÀ» »ì¸¸Å­ ³Ë³ËÇÏÁö°¡ ¸øÇÏ´Ù.)

     ¾Æ·¡ ¸í·ÉµéÀ» ¼ø¼­´ë·Î ½ÇÇàÇؼ­ ÄÄÆÄÀÏ·¯¸¦ ¸¸µç´Ù:
     

     make LANGUAGES=c
     make stage1 (ignore errors about files not found)
     make CC=¡±stage1/xgcc -Bstage1/¡± CFLAGS=¡±-g -O2¡±
     make stage2
     make CC=¡±stage2/xgcc -Bstage2/¡± CFLAGS=¡±-g -O2¡±
     make compare


    ¸¸¾à make compare ¸í·ÉÀÌ ÀÌ»óÇÑ °ÍµéÀ» º¸°í ÇÏÁö ¾Ê´Â´Ù¸é ÄÄÆÄÀÏ·¯°¡ ¼º°øÀûÀ¸·Î ¸¸µé¾îÁø °ÍÀÌ´Ù.

      make install CC=¡±stage2/xgcc -Bstage2/¡± CFLAGS=¡±-g -O2¡±

    ¸í·ÉÀ» ½ÇÇàÇؼ­ ÆÐÅ°Áö¸¦ ÀνºÅçÇÑ´Ù.

 

------------------------------------------------------------------------

8. Installing login utilities

     

    8.1 Installing agetty + login

    ÀÌ Àå¿¡¼­´Â ÅؽºÆ® ¿¡µðÅÍ°¡ ÇÊ¿äÇϹǷΠnormal Linux ½Ã½ºÅÛÀ» »ç¿ëÇؼ­ ¸ðµç ÀÛ¾÷À» ÇÑ´Ù. ÀÌ Àå¿¡¼­ ¿©·¯ºÐ¿¡°Ô´Â Util Linux ÆÐÅ°Áö°¡ ÇÊ¿äÇÏ´Ù.  ¸¸¾à Util Linux ¼Ò½º µð·ºÅ丮¸¦ ¾ÆÁ÷ Áö¿ìÁö ¾Ê°í ÀÖ´Ù¸é, ¿©·¯ºÐÀº óÀ½ µÎ ´Ü°è¸¦ °ÅÄ¡Áö ¾Ê¾Æµµ ÁÁ´Ù.

    Util ¸®´ª½º ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.(¸¸¾à ¿©·¯ºÐÀÌ Áö³­¹ø¿¡ »ç¿ëÇß´ø Util ¸®´ª½º ÆÐÅ°Áö¸¦ Áö¿ü´Ù¸é)/configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.
    login-utils µð·ºÅ丮·Î °£´Ù.
    make agetty login ¸í·ÉÀ¸·Î agetty¿Í loginÀ» ÄÄÆÄÀÏÇÑ´Ù.
    ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/sbin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: agetty
    ´ÙÀ½ ¹ÙÀ̳ʸ®¸¦ $LFS/bin µð·ºÅ丮¿¡ Ä«ÇÇÇÑ´Ù: login

     

    8.2 Modifying $LFS/etc/inittab

    ´ÙÀ½ ´Ü°è´Â ¿ì¸®°¡ ½Ã½ºÅÛÀ» ÄÓ ¶§¸¶´Ù agetty°¡ °¡»ó Äֻܼ󿡼­ ½ÃÀÛµÉ ¼ö ÀÖµµ·Ï $LFS/etc/inittab ÆÄÀÏÀ» ÆíÁýÇÏ´Â °ÍÀÌ´Ù.  ÀÌ·¸°Ô Çؼ­ ¸ðµç ¸®´ª½º ½Ã½ºÅÛÀº ¾Æ´Ï¶óµµ °ÅÀÇ ´Ù ÀÛµ¿ÇÑ´Ù.

    $LFS/etc/inittab ÆÄÀÏÀ» ÆíÁý±â·Î ¿¬´Ù.
    ´ÙÀ½ ÁÙÀ» ã¾Æ¼­ Áö¿î´Ù:
    1:2345:respawn:/sbin/sulogin
    ¾Õ¼­ Áö¿î ÁÙ ¿¡ ´ÙÀ½ ÁÙµéÀ» ³Ö´Â´Ù:
     

    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


     

    8.3 Creating the UTMP record file

    ¿©·¯ºÐÀÌ ¸®´ª½º ½Ã½ºÅÛ¿¡ ·Î±×¿Â ÇÒ ¶§¸¶´Ù, /var/run/utmp ÆÄÀÏÀÌ °íÃÄÁø´Ù. ÀÌ ÆÄÀÏÀÌ ¾øÀ» ¶§¿¡´Â, agetty¿Í loginÀ» ºñ·ÔÇÑ ¸Å¿ì ¸¹Àº ÇÁ·Î±×·¥µéÀÌ Åõ´ú°Å¸®±â ½ÃÀÛÇÑ´Ù. ±×·¯¹Ç·Î ¿ì¸®´Â ºñ¾î ÀÖ´Â $LFS/var/run/utmp ÆÄÀÏÀ» ¸¸µé¾î¼­ ±×·± ÇÁ·Î±×·¥µéÀÌ ´õ ÀÌ»ó Åõ´ú°Å¸®Áö ¾Ê°Ô ¸¸µé¾î¾ß ÇÑ´Ù.

    $LFS/var/run µð·ºÅ丮¸¦ ¸¸µç´Ù.
    touch $LFS/var/run/utmp ¸í·ÉÀ» ½ÇÇàÇؼ­ ºñ¾îÀÖ´Â utmp ÆÄÀÏÀ» ¸¸µç´Ù.

     

    8.4 Testing the system

    ¿©·¯ºÐÀÌ ¸¸¾à Áö±Ý ½Ã½ºÅÛÀ» Å×½ºÆ®ÇÏ·Á ÇÑ´Ù¸é ½Ã½ºÅÛÀ» ´Ù½Ã ½ÃÀÛÇؼ­ LFS ½Ã½ºÅÛÀ¸·Î ºÎÆ®ÇÑ´Ù.  Ä¿³Î°ú sysvinitÀÌ ·ÎµåµÈ ´ÙÀ½, agetty°¡ ½ÃÀ۵ǰí, username°ú ÇÔ²² ºÎÆ®°úÁ¤ÀÌ ³¡³µÀ½À» ¿©·¯ºÐ¿¡°Ô ¾Ë¸°´Ù. ÇöÀç root »ç¿ëÀÚ Çϳª¸¸ ÀÖÀ¸¹Ç·Î ¿©·¯ºÐÀº root·Î ·Î±×ÀÎÇÑ´Ù.

 

------------------------------------------------------------------------

9. Installing Vim

    VimÀÌ ¼³Ä¡µÈ ´ÙÀ½ºÎÅÍ´Â, ¿ì¸®´Â LFS ½Ã½ºÅÛÀ» ¡°²Ù¹Ì´Â µ¥(dress up)¡± ´õ ÀÌ»ó normal LinuxÀ» »ç¿ëÇÒ ÇÊ¿ä°¡ ¾ø´Ù.  ÀÌ °ÍÀº ¿©·¯ºÐÀÌ Áö±ÝºÎÅÍ ¿À·¡Áö ¾Ê¾Æ normal Linux ½Ã½ºÅÛÀ» ÀçºÎÆ®Çؼ­ ¿ì¸®ÀÇ LFS ½Ã½ºÅÛÀ¸·Î µ¹¾Æ°¡¾ß ÇÑ´Ù´Â °ÍÀ» ¶æÇÑ´Ù.

     

    9.1 Preparing the system for the Vim installation

    Installing Ncurses

    VimÀ» ¼³Ä¡Çϱâ À§ÇØ ncurses ¶óÀ̺귯¸®¸¦ ¼³Ä¡ÇÒ Â÷·ÊÀÌ´Ù.

    Ncurses ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
    ¡®./configure --with-shared ¸í·ÉÀ» ½ÇÇàÇØ ÆÐÅ°Áöȯ°æÀ» ¼³Á¤ÇÑ´Ù.

    Ncurses´Â ÃÖ±Ù ¹öÀüÀÇ C Ç¥ÁØÀ» 100% Á¤È®ÇÏ°Ô µû¸£Áö ¾ÊÀ¸¹Ç·Î, gcc2723À¸·Î ÄÄÆÄÀÏÇÒ ÇÊ¿ä°¡ ÀÖ´Ù.

     make CC=/usr/gcc2723/bin/gcc ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
     make install.data ¸í·ÉÀ¸·Î terminfo ÆÄÀϵéÀ» ¼³Ä¡ÇÑ´Ù.
     test µð·ºÅ丮·Î °¡¼­ ¶óÀ̺귯¸®µéÀÌ µ¿ÀÛÇÏ´ÂÁö °Ë»çÇÏ´Â ¸î °¡Áö ÇÁ·Î±×·¥À» ½ÇÇàÇÑ´Ù.
     make install ¸í·ÉÀ¸·Î ¶óÀ̺귯¸®µéÀ» ¼³Ä¡ÇÑ´Ù.

     

    9.2 Installing Vim

    VimÀº µÎ ºÎºÐÀ¸·Î µÇ¾î Àִµ¥ src ÆÐÅ°Áö¿Í rt (run-time)ÆÐÅ°ÁöÀÌ´Ù. ¿©·¯ºÐÀº vimÀ» ¼³Ä¡Çϱâ À§ÇØ µÎ ÆÐÅ°Áö ¸ðµÎ °¡Á®¿Í¾ß ÇÑ´Ù.  ¿©·¯ºÐÀÌ ¸¸¾à µÎ ÆÐÅ°Áö¸¦ ¸ðµÎ ÇÑ µð·ºÅ丮¿¡ ³Ö¾ú´Ù¸é, ¿©·¯ºÐÀÌ Ã³À½ ¾ÐÃàÀ» Ç® ¶§ »ý±ä µð·ºÅ丮¿¡ µÎ ÆÐÅ°Áö·ÎºÎÅÍ Ç®¾î³õÀº ÆÄÀϵéÀÌ °°ÀÌ ÀÖÀ» °ÍÀÌ´Ù.(¾î¶² °ÍÀ» ¸ÕÀú Ç®¾î³õ´Â°¡´Â ¹®Á¦µÇÁö ¾Ê´Â´Ù)

      Vim-src¿Í Vim-rt ÆÐÅ°ÁöÀÇ ¾ÐÃàÀ» Ǭ´Ù.
      configure¸¦ ½ÇÇàÇØ ÆÐÅ°Áö ȯ°æÀ» ¼³Á¤ÇÑ´Ù.

    Vimµµ ¿ª½Ã gcc 2.95.2¿¡¼­ ÄÄÆÄÀϵÇÁö ¾ÊÀ¸¹Ç·Î Àß ¼öÇàµÇ´Â gcc 2.7.2.3¿¡¼­ ÄÄÆÄÀÏÇØ¾ß ÇÑ´Ù.

     make CC=/usr/gcc2723/bin/gcc ¸í·ÉÀ» ½ÇÇàÇؼ­ ÇÁ·Î±×·¥µéÀ» ÄÄÆÄÀÏÇÑ´Ù.
     make install ¸í·ÉÀ» ½ÇÇàÇؼ­ ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÑ´Ù.

 

------------------------------------------------------------------------

10. Creating initial boot scripts

     

    10.1 Preparing the directories and master files

    ÀÌ ¼½¼Ç¿¡¼­ ¼³¸íÇÏ´Â ÇÁ·Î±×·¥À» ¼³Ä¡ÇÏ·Á¸é Sysvi-nit ÆÐÅ°Áö°¡ ÇÊ¿äÇÏ´Ù.

    ´ÙÀ½ ¸í·ÉÀ» ¼öÇàÇؼ­ ÇÊ¿äÇÑ µð·ºÅ丮µéÀ» ¸¸µç´Ù:
     

    cd /etc
    mkdir rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d init.d rcS.d


    Sysvinit ¼Ò½º°¡ ¼³Ä¡µÈ µð·ºÅ丮·Î °£´Ù.
    debian/etc/init.d/rc ÆÄÀÏÀ» ´ÙÀ½ ÆÄÀÏ·Î º¹»çÇÑ´Ù:    
    /etc/init.d
    /etc/init.d µð·ºÅ丮·Î °£´Ù.
    ´ÙÀ½ ³»¿ëÀ» ´ã¾Æ »õ·Î¿î rcS ÆÄÀÏÀ» ¸¸µç´Ù:
     

       #!/bin/sh
       # Begin /etc/init.d/rcS

       runlevel=S
       prelevel=N
       umask 022
       export runlevel prevlevel

       trap ¡°:¡± INT QUIT TSTP

       for i in /etc/rcS.d/S??*
       do
          if [ ! -f  ¡°$i¡± ] && continue
          $i start
       done

       # End /etc/init.d/rcS 


     

    10.2 Creating the reboot script

    ´ÙÀ½ ³»¿ëÀ» ´ã¾Æ »õ·Î¿î reboot ÆÄÀÏÀ» ¸¸µç´Ù:
     

       #!/bin/sh
       # Begin /etc/init.d/reboot 

       echo -n ¡°System reboot in progress...¡±

       /sbin/reboot -d -f -i 

       # End /etc/init.d/reboot


     

    10.3 Creating the halt script

      ´ÙÀ½ ³»¿ëÀ» ´ã¾Æ »õ·Î¿î halt ÆÄÀÏÀ» ¸¸µç´Ù:
     

       #!/bin/sh
       # Begin /etc/init.d/halt 

       /sbin/halt -d -f -i -p

       # End /etc/init.d/halt


     

    10.4 Creating the mountfs script

    ´ÙÀ½ ³»¿ëÀ» ´ã¾Æ »õ·Î¿î mountfs ÆÄÀÏÀ» ¸¸µç´Ù:
     

    #!/bin/sh
    # Begin /etc/init.d/mountfs 

    check_status()
    {
      if [ $? = 0 ]
      then
        echo ¡°OK¡±
      else
        echo ¡°FAILED¡±
      fi
    }

    echo -n ¡°Remounting root file system in read-write mode...¡±
    /sbin/mount -n -o remount,rw /
    check_status

    > /etc/mtab
    /sbin/mount -f -o remount,rw /

    echo -n ¡°Mounting proc file system...¡±
    /sbin/mount proc
    check_status

    # End /etc/init.d/mountfs


       

    10.5 Creating the umountfs script

    ´ÙÀ½ ³»¿ëÀ» ´ã¾Æ »õ·Î¿î umountfs ÆÄÀÏÀ» ¸¸µç´Ù:
     

     #!/bin/sh
     # Begin /etc/init.d/umountfs

     check_status()
     {
       if [ $? = 0 ]
       then
         echo ¡°OK¡±
       else
         echo ¡°FAILED¡±
       fi
     }
     echo -n ¡°Unmounting file systems...¡±
     /sbin/umount -a -r
     check_status

     echo -n ¡°Remounting root file system in read-only  
     mode...¡±
     /sbin/mount -o remount,ro /
     check_status

     # End /etc/init.d/umountfs


     

    10.6 Creating the sendsignals script

    ´ÙÀ½ ³»¿ëÀ» ´ã¾Æ »õ·Î¿î sendsignals ÆÄÀÏÀ» ¸¸µç´Ù:
     

    #!/bin/sh
    # Begin /etc/init.d/sendsignals

    check_status()
    {
      if [ $? = 0 ]
      then
        echo ¡°OK¡±
      else
        echo ¡°FAILED¡±
      fi
    }
    echo -n ¡°Sending all processes the TERM signal...¡±
    /sbin/killall5 -15
    check_status

    echo -n ¡°Sending all processes the KILL signal...¡±
    /sbin/killall5 -9
    check_status


       

    10.7 Set file permissions and create symlinks

    chmod 755 reboot halt mountfs umountfs sendsignals ¸í·ÉÀ¸·Î Àû´çÇÑ ÆÄÀÏ Æ۹̼ÇÀ» ¼³Á¤ÇÑ´Ù.
    ´ÙÀ½ ¸í·ÉµéÀ» ½ÇÇàÇØ ÇÊ¿äÇÑ ½Éº¼¸¯ ¸µÅ©µéÀ» ¸¸µç´Ù:
     

    cd ../rc6.d; ln -s ../init.d/umountfs S90umountfs
    ln -s ../init.d/reboot S99reboot
    ln -s ../init.d/sendsignals S80sendsignals

    cd ../rc0.d; ln -s ../init.d/umountfs S90umountfs
    ln -s ../init.d/halt S99halt
    ln -s ../init.d/sendsignals S80sendsignals

    cd ../rcS.d; ln -s ../init.d/mountfs S10mountfs


       

    10.8 Creating the /etc/fstab file

      ´ÙÀ½ ³»¿ëÀ» ´ã¾Æ /etc/fstab ÆÄÀÏÀ» ¸¸µç´Ù:
     

    /dev/<LFS-partition device>   /       ext2   defaults  0 1
    /dev/<swap-partition device> none swap     sw      0 0
    proc                                     /proc proc  defaults  0 0


       

    10.9 Testing the system

    ¿©·¯ºÐÀÇ ÄÄÇ»Å͸¦ ´Ù½Ã ½ÃÀÛÇÏ°í LFS·Î ºÎÆ®Çؼ­ ½Ã½ºÅÛÀ» Å×½ºÆ®ÇÑ´Ù. ¿¡·¯ ¸Þ½ÃÁöµéÀÌ Áö³ª°¡°í ¿©·¯ºÐÀÇ ·çÆ® ÆÄƼ¼ÇÀÌ read-write ¸ðµå·Î ÀÚµ¿À¸·Î ¸¶¿îÆ® µÉ °ÍÀÌ´Ù.

    ÀÌÁ¦´Â shutdown -r now µî ¸í·ÉÀ¸·Î ¿©·¯ºÐÀÇ ÄÄÇ»Å͸¦ Àç½ÃÀÛÇÒ ¼ö ÀÖ´Ù.

     

    -------------------------------------------------------

    ÀÌ ±ÛÀÇ ³²Àº ºÎºÐ(11Àå¡­19Àå)Àº ´ÙÀ½ ´Þ¿¡ ´Ù·é´Ù.




¡ã top

homeÀ¸·Î...