ÀÏ´Ü Ä¿³ÎÀÌ ºÎÆÃÀ» ¿Ï·áÇϸé init¶ó´Â »ç¿ëÀÚ ÇÁ·Î¼¼½º·Î Á¦¾î±ÇÀ» ³Ñ±é´Ï´Ù. À̰ÍÀº /sbin/init¿¡ À§Ä¡Çϰí ÀÖÀ¸¸ç, loader¿¡¼ init_path¸¦ ¼³Á¤ÇÔÀ¸·Î½á ÀÌ ÇÁ·Î±×·¥ÀÇ °æ·Î¸¦ ¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
Once the kernel has finished booting, it passes control to the user process init, which is located at /sbin/init, or the program path specified in the init_path variable in loader.
ÀÚµ¿ ¸®ºÎÆÃ °úÁ¤¿¡¼´Â ½Ã½ºÅÛ¿¡ ÀÖ´Â ÆÄÀϽýºÅÛµéÀÌ ÀϰüÀûÀÎÁö¸¦ È®ÀÎÇÕ´Ï´Ù. ¸¸¾à ±×·¸Áö ¾Ê°í, fsck·Î ÀÌ·¯ÇÑ ¹®Á¦¸¦ ÇØ°áÇÒ ¼ö ¾ø´Ù¸é init´Â ½Ã½ºÅÛÀ» ´ÜÀÏ »ç¿ëÀÚ ¸ðµå·Î ÀüȯÇÕ´Ï´Ù. ¿©±â¼ ½Ã½ºÅÛ °ü¸®ÀÚ´Â ¹®Á¦¸¦ ¹Ù·Î °Ë»çÇØº¼ ¼ö ÀÖ½À´Ï´Ù.
The automatic reboot sequence makes sure that the filesystems available on the system are consistent. If they are not, and fsck can not fix the inconsistencies, init drops the system into single-user mode for the system administrator to take care of the problems directly.
ÀÌ ¸ðµå´Â ÀÚµ¿ ¸®ºÎÆÃ °úÁ¤À» ÅëÇØ¼ µé¾î¿À°Å³ª »ç¿ëÀÚ°¡ ºÎÆÃ½Ã¿¡ -s ¿É¼ÇÀ» ÁÖ¾úÀ» ¶§, ¶Ç´Â loader³»ÀÇ boot_singleº¯¼ö¸¦ ¼¼ÆÃÇÏ¿´À» ¶§ µé¾î¿À°Ô µË´Ï´Ù.
This mode can be reached through the automatic reboot sequence, or by the user booting with the -s or setting the boot_single variable in loader.
¶ÇÇÑ, shutdown¿¡¼ ¸®ºÎÆ®¸¦ ÇÏÁö ¾Ê°Å³ª( -r¿É¼Ç) halt(-h¿É¼Ç)¸¦ ´ÙÁß »ç¿ëÀÚ ¸ðµå¿¡¼ ¼öÇà½Ãų ¶§¿¡µµ ÀÌ ¸ðµå·Î µé¾î¿À°Ô µË´Ï´Ù.
It can also be reached by calling shutdown without the reboot (-r) or halt (-h) options, from multi-user mode.
½Ã½ºÅÛ ÄܼÖÀÎ consoleÀÌ /etc/ttys¿¡¼ insecure·Î ÁöÁ¤µÇ¾î ÀÖ´Ù¸é, ´ÜÀÏ »ç¿ëÀÚ ¸ðµå·Î µé¾î°¡±â Àü¿¡ rootÆÐ½º¿öµå¸¦ ¹°¾î¿Ã °ÍÀÔ´Ï´Ù.
If the system console console is set to insecure in /etc/ttys, then the system prompts for the root password before initiating single-user mode.
Example 5-3. /etc/ttys¿¡ ÀÖ´Â ºñ º¸¾È ÄÜ¼Ö : insecure console in /etc/ttys
# name getty type status comments # # This entry needed for asking password when init goes to single-user mode # If you want to be asked for password, change "secure" to "insecure" here console none unknown off insecure
Note: ºñ º¸¾ÈÄܼÖÀº ÇØ´ç Äֿܼ¡ µé¾î¿À´Â °úÁ¤¿¡ ¹°¸®ÀûÀÎ º¸¾È ÀåÄ¡°¡ ¾øÀ¸¸ç, ·çÆ® ÆÐ½º¿öµå¸¦ ¾Ë°í ÀÖ´Â »ç¶÷¸¸ÀÌ ´ÜÀÏ »ç¿ëÀÚ ¸ðµå·Î µé¾î°¥ ¼ö ÀÖµµ·Ï ÇÏ´Â ÄܼÖÀ» ÀǹÌÇÕ´Ï´Ù. ÄܼÖÀÌ ¾ÈÀüÇÏÁö ¾ÊÀº »óÅ¿¡¼ ¿î¿µµÈ´Ü¤¤ °ÍÀ» ÀǹÌÇÏ´Â °ÍÀº ¾Æ´Õ´Ï´Ù. ±×·¯¹Ç·Î, º¸¾ÈÀ» ¿øÇÑ´Ù¸é, secure´ë½Å insecure À» »ç¿ëÇϽʽÿÀ.
An insecure console means that you consider your physical security to the console to be insecure, and want to make sure only someone who knows the root password may use single-user mode, and it does not mean that you want to run your console insecurely. Thus, if you want security, choose insecure, not secure.
¸¸¾à init°¡ Á¤·ÄµÇ¾î ÀÖ´Ù´Â °ÍÀ» °¨ÁöÇϰųª »ç¿ëÀÚ°¡ Çѹø ´ÜÀÏ »ç¿ëÀÚ ¸ðµå·Î µé¾î¿Ô¾ú´Ù´Â »ç½ÇÀ» ¾Ë°Ô µÇ¸é ½Ã½ºÅÛÀº ´ÙÁß »ç¿ëÀÚ ¸ðµå·Î µé¾î°©´Ï´Ù. ´ÙÁß »ç¿ëÀÚ ¸ðµå´Â ½Ã½ºÅÛÀÇ ÀÚ¿ø ¼³Á¤ ±â´ÉÀ» ½ÃÀÛÇÕ´Ï´Ù.
If init finds your filesystems to be in order, or once the user has finished in single-user mode, the system enters multi-user mode, in which it starts the resource configuration of the system.
ÀÚ¿ø ¼³Á¤ ½Ã½ºÅÛÀº ±âº» ¼³Á¤À» /etc/defaults/rc.conf À¸·ÎºÎÅÍ Àоî¿À°í, ½Ã½ºÅÛ¿¡ ƯÁ¤ÇÑ ¼³Á¤µéÀº /etc/rc.confÀ¸·ÎºÎÅÍ Àоî¿É´Ï´Ù. ±×¸®°í /etc/fstab¿¡ ¾ð±ÞµÈ ÆÄÀϽýºÅÛµéÀ» ¸¶¿îÆ®Çϰí, ³×Æ®¿öÅ© ¼ºñ½º¸¦ ½ÃÀÛÇÕ´Ï´Ù. ±×¸®°í ¸¶Áö¸·À¸·Î ·ÎÄÿ¡ ¼³Ä¡µÇ¾î ÀÖ´Â ÆÐŰÁöµéÀÇ ½ÃÀÛ ½ºÅ©¸³Æ®¸¦ ¼öÇà½Ãŵ´Ï´Ù.
The resource configuration system reads in configuration defaults from /etc/defaults/rc.conf, and system-specific details from /etc/rc.conf, and then proceeds to mount the system filesystems mentioned in /etc/fstab, start up networking services, starts up miscellaneous system daemons, and finally runs the startup scripts of locally installed packages.
ÀÚ¿ø ¼³Á¤ ½Ã½ºÅÛ¿¡ ´ëÇÑ ³»¿ëÀ» ÂüÁ¶ÇÏ·Á¸é rc(8)À» º¸¼¼¿ä. ½ºÅ©¸³Æ® ÀÚüµµ ÁÁÀº ¿¹½ÃÀÔ´Ï´Ù.
rc(8) is a good reference to the resource configuration system, as is examining the scripts themselves.