·Î´õ´Â ºÎÆ®½ºÆ®·¦ÀÇ ¼¼ ´Ü°è Áß ¸¶Áö¸· ´Ü°èÀ̸ç, ÆÄÀϽýºÅÛ À§¿¡ À§Ä¡Çϰí ÀÖ½À´Ï´Ù. º¸Åë /boot/loader»ó¿¡ Á¸ÀçÇϰí ÀÖ½À´Ï´Ù.
The loader is the final stage of the three-stage bootstrap, and is located on the filesystem, usually as /boot/loader.
Note: /boot/boot0, /boot/boot1, /boot/boot2 ÆÄÀϵéÀÌ ±×°÷¿¡ ÀÖÁö¸¸, ÀÌ·¯ÇÑ ÆÄÀϵéÀÌ MBR, ºÎÆ® ¼½ÅÍ, ¶Ç´Â disklabelÀÇ ½ÇÁ¦ÀûÀÎ º¹»çº»Àº ¾Æ´Õ´Ï´Ù.
While /boot/boot0, /boot/boot1, and /boot/boot2 are files there, they are not the actual copies in the MBR, the boot sector, or the disklabel respectively.
·Î´õ´Â »ç¿ëÀÚ¿¡°Ô Ä£¼÷ÇÑ ¼³Á¤ ±â´É°ú »ç¿ëÇϱ⠽¬¿î ³»Àå ¸í·É¾îµé, º¸´Ù °·ÂÇÑ ÀÎÅÍÇÁ¸®Åͳª ´õ º¹ÀâÇÑ ¸í·É¾îµé·Î ¹é¾÷µÉ ¼ö ÀÖµµ·Ï ¸¸µé¾îÁ³½À´Ï´Ù.
The loader is intended as a user-friendly method for configuration, using an easy-to-use built-in command set, backed up by a more powerful interpreter, with a more complex command set.
ÃʱâÈ °úÁ¤ Áß¿¡ ·Î´õ´Â Äְܼú µð½ºÅ©¸¦ ŽÁöÇÏ°í ¾î¶² µð½ºÅ©·ÎºÎÅÍ ºÎÆÃÀ» ¼öÇàÇÒ °ÍÀÎÁö¸¦ ¾Ë¾Æ³À´Ï´Ù. ±×¿¡ µû¶ó º¯¼öµéÀ» ÁöÁ¤ÇÏ°Ô µÇ¸é ÀÎÅÍÇÁ¸®ÅͰ¡ ¼öÇàµÇ°í, ÀÎÅÍÇÁ¸®ÅÍ´Â »ç¿ëÇϱ⠽¬¿î ¸í·É¾îµéÀ» ÇØ¼®ÇÏ¿© ·Î´õ·Î º¸³À´Ï´Ù.
During initialization, the loader will probe for a console and for disks, and figure out what disk it is booting from. It will set variables accordingly, and then the interpreter is started, and the easy-to-use commands are explained to it.
±×·± ÈÄ, ·Î´õ´Â /boot/loader.rcÀ» ÀÐ°Ô µË´Ï´Ù. ÀÌ ÆÄÀÏÀº /boot/defaults/loader.conf - ±âº»ÀûÀÎ º¯¼ö °ªµé¿¡ ´ëÇÑ ¼³Á¤À» ´ã°í ÀÖ´Â ÆÄÀÏ - ¿¡¼ ÁöÁ¤ÇÑ ÆÄÀÏÀÔ´Ï´Ù. ±×¸®°í /boot/loader.conf¸¦ ÀÐ¾î¼ ±×·¯ÇÑ º¯¼öµé¿¡ ´ëÇÑ °ªÀ» ÁöÁ¤ÇÏ°Ô µË´Ï´Ù. loader.rcÀº ÀÌ·¯ÇÑ º¯¼öµé¿¡ ÀÇÇØ¼ ÀÛµ¿Çϸç, ¼±ÅÃµÈ Ä¿³Î°ú ¸ðµâµéÀ» ÀоîµéÀÔ´Ï´Ù.
loader will then read /boot/loader.rc, which by default reads in /boot/defaults/loader.conf which sets reasonable defaults for variables and reads /boot/loader.conf for local changes to those variables. loader.rc then acts on these variables, loading whichever modules and kernel are selected.
¸¶Áö¸·À¸·Î ·Î´õ´Â 10Ãʰ£ÀÇ Å° ÀÔ·ÂÀ» ±â´Ù¸³´Ï´Ù. - ÀÌ ÀÛ¾÷Àº ±âº»À¸·Î ÇàÇØÁý´Ï´Ù. ±×¸®°í ÀÎÅÍ·´Æ®°¡ °É¸®¸é Ä¿³Î·Î ºÎÆÃÇÕ´Ï´Ù. ÀÎÅÍ·´Æ®°¡ °É¸®¸é »ç¿ëÀÚ°¡ »ç¿ëÇϱ⠽¬¿î ¸í·É¾îµéÀ» »ç¿ëÇÒ ¼ö ÀÖ´Â ¸í·É ÇÁ·ÒÇÁÆ®°¡ ¶å´Ï´Ù. ¿©±â¼ »ç¿ëÀÚ´Â ¸ðµâÀ» ·ÎµåÇϰųª ¾ð·ÎµåÇϰí, º¯¼öµéÀ» Á¶Á¤Çϰí, ºÎÆÃ ¶Ç´Â ¸®ºÎÆÃ ÀÛ¾÷À» ¼öÇàÇÒ ¼ö ÀÖ½À´Ï´Ù.
Finally, by default, the loader issues a 10 second wait for keypresses, and boots the kernel if it is interrupted. If interrupted, the user is presented with a prompt which understands the easy-to-use command set, where the user may adjust variables, unload all modules, load modules, and then finally boot or reboot.
ÀÌ °úÁ¤¿¡ ´ëÇÑ º¸´Ù ±â¼úÀûÀÎ »çÇ×µéÀº loader(8)¿¡¼ ã¾Æº¼ ¼ö ÀÖ½À´Ï´Ù.
A more technical discussion of the process is available in loader(8)
»ç¿ëÇϱ⠽¬¿î ¸í·É¾îµéÀº ´ÙÀ½°ú °°ÀÌ ÀÌ·ç¾îÁ® ÀÖ½À´Ï´Ù.:
ÁÖ¾îÁø ½Ã°£ ³»¿¡ ÀÎÅÍ·´Æ®°¡ °É¸®Áö ¾ÊÀ¸¸é(»ç¿ëÀÚ°¡ ۸¦ ´©¸£Áö ¾ÊÀ¸¸é) Ä¿³ÎÀ» ºÎÆÃ½Ãŵ´Ï´Ù. ÀÌ ½Ã°£Àº ÃÊ ´ÜÀ§À̸ç, Ä«¿îÆ®´Ù¿îÀ» Ç¥½ÃÇÏ°Ô µË´Ï´Ù. ±âº»°ªÀº 10ÃÊ·Î ÁöÁ¤µÇ¾î ÀÖ½À´Ï´Ù.
Proceeds to boot the kernel if not interrupted within the time span given, in seconds. It displays a countdown, and the default timespan is 10 seconds.
ÁÖ¾îÁø ¿É¼ÇÀ» ¹ÙÅÁÀ¸·Î ¹Ù·Î Ä¿³Î ºÎÆÃ ÀÛ¾÷À» ¼öÇàÇÕ´Ï´Ù. ¾î¶² ¿É¼ÇÀÌ ÁÖ¾îÁöµç, ÁÖ¾îÁø À̸§ÀÇ Ä¿³ÎÀÌ Á¸ÀçÇÑ´Ù¸é ºÎÆÃ ÀÛ¾÷Àº ¼öÇàµË´Ï´Ù.
Immediately proceeds to boot the kernel, with the given options, if any, and with the kernel name given, if it is.
ºÎÆ®½Ã¿¡ ³ªÅ¸³ª´Â °Í°ú °°Àº º¯¼öµé¿¡ ±âÃÊÇØ¼ ¸ðµâµéÀ» ÀÚµ¿À¸·Î ±¸¼ºÇϵµ·Ï ÇÕ´Ï´Ù. ÀÌ´Â unload¸í·ÉÀ» ¸ÕÀú »ç¿ëÇÏ°í ¾î¶² °ªµéÀ» º¯°æÇßÀ» ¶§ - ÁÖ·Î kernel °ª - ¼öÇàµË´Ï´Ù.
Goes through the same automatic configuration of modules based on variables as what happens at boot. This only makes sense if you use unload first, and change some variables, most commonly kernel.
/boot/loader.help¿¡¼ µµ¿ò¸» ¸Þ¼¼Áö¸¦ ÀÐ¾î¼ È¸é¿¡ Ç¥½ÃÇÕ´Ï´Ù. ¸¸¾à ¿äûÇÑ »çÇ×ÀÌ indexÀÎ °æ¿ì¿¡´Â °¡´ÉÇÑ »çÇ׿¡ ´ëÇÑ ¸ñ·ÏÀ» Ãâ·ÂÇÕ´Ï´Ù.
Shows help messages read from /boot/loader.help. If the topic given is index, then the list of available topics is given.
ÁÖ¾îÁø ÆÄÀϸíÀÇ ÆÄÀÏÀ» ¼öÇàÇÕ´Ï´Ù. ÀÌ ÆÄÀÏÀº Çà ´ÜÀ§·Î ÀÐÇôÁö°í ¼öÇàµË´Ï´Ù. ¿¡·¯°¡ ¹ß»ýÇÏ´Â °æ¿ì¿¡´Â ÀÌ ¸í·ÉÀº ±× Áï½Ã Áߴܵ˴ϴÙ.
Processes the file with the given filename. The file is read in, and interpreted line by line. An error immediately stops the include command.
Ä¿³Î, Ä¿³Î ¸ðµâ, ¶Ç´Â ÁÖ¾îÁø À̸§ ¶Ç´Â À¯ÇüÀÇ ÆÄÀÏÀ» ·ÎµåÇÕ´Ï´Ù. ÆÄÀÏ¸í µÚ¿¡ ÁÖ¾îÁö´Â ÀμöµéÀº ÇØ´ç ÆÄÀÏ·Î ³Ñ¾î°©´Ï´Ù.
Loads the kernel, kernel module, or file of the type given, with the filename given. Any arguments after filename are passed to the file.
ÁÖ¾îÁø °æ·Î ¾È¿¡ ÀÖ´Â ÆÄÀϵéÀÇ ¸ñ·ÏÀ» Ãâ·ÂÇÕ´Ï´Ù. ¸¸¾à °æ·Î¸íÀÌ ÁÖ¾îÁöÁö ¾ÊÀ¸¸é ·çÆ® µð·ºÅ丮 ¾ÈÀÇ ÆÄÀϵéÀ» Ãâ·ÂÇÕ´Ï´Ù. -l ÀÌ ÁÖ¾îÁö¸é ÆÄÀÏÀÇ Å©±âµµ ÇÔ²² Ç¥½ÃµË´Ï´Ù.
Displays a listing of files in the given path, or the root directory, if the path is not specified. If -l is specified, file sizes will be shown too.
¸ðµâÀ» ¿Ã¸± ¼ö ÀÖ´Ù°í ÆÇ´ÜµÇ´Â ÀåÄ¡µéÀÇ ¸ñ·ÏÀ» Ç¥½ÃÇÕ´Ï´Ù. -v ¿É¼ÇÀÌ ÁÖ¾îÁö¸é »ó¼¼ »çÇ×µéÀÌ ÇÔ²² Ãâ·ÂµË´Ï´Ù.
Lists all of the devices from which it may be possible to load modules. If -v is specified, more details are printed.
·ÎµåµÈ ¸ðµâµéÀÇ ¸ñ·ÏÀ» Ç¥½ÃÇÕ´Ï´Ù. ¸¸¾à -v¿É¼ÇÀÌ ÁÖ¾îÁö¸é »ó¼¼ »çÇ×µéÀÌ ÇÔ²² Ãâ·ÂµË´Ï´Ù.
Displays loaded modules. If -v is specified, more details are shown.
ÁöÁ¤µÈ ÆÄÀÏÀÇ ³»¿ëÀ» Ãâ·ÂÇÕ´Ï´Ù. Ãâ·ÂµÇ´Â °¢ LINES¸¶´Ù Ãâ·ÂÀÌ ¸ØÃß¾îÁý´Ï´Ù.
Note: Ä¿¸Çµå »óÀÇ more¿Í °°Àº ±â´ÉÀÔ´Ï´Ù.
Display the files specified, with a pause at each LINES displayed.
½Ã½ºÅÛÀ» ¹Ù·Î ¸®ºÎÆÃÇÕ´Ï´Ù.
·Î´õÀÇ È¯°æ º¯¼ö¿¡ ´ëÇÑ °ªÀ» ÁöÁ¤ÇÕ´Ï´Ù.
·ÎµåµÈ ¸ðµç ¸ðµâÀ» Áö¿ó´Ï´Ù.
´ÙÀ½Àº ·Î´õ »ç¿ë¿¡ ´ëÇÑ ÀϹÝÀûÀÎ ¿¹Á¦µéÀÔ´Ï´Ù.
º¸Åë »ç¿ëÇÏ´Â Ä¿³ÎÀ» ºÎÆÃÇϰíÀÚ Çϴµ¥ ´ÜÀÏ »ç¿ëÀÚ ¸ðµå·Î ºÎÆÃÇϰíÀÚ ÇÏ´Â °æ¿ì¿¡´Â :
To simply boot your usual kernel, but in single-user mode:
boot -s
Åë»óÀûÀÎ Ä¿³Î°ú ¸ðµâÀ» ¸ðµÎ ¾ø¾Ö°í ÀÌÀüÀÇ(ȤÀº ´Ù¸¥) Ä¿³ÎÀ» ·ÎµåÇϰíÀÚ ÇÒ ¶§:
To unload your usual kernel and modules, and then load just your old (or another) kernel:
unload load kernel.old
¼³Ä¡ µð½ºÅ©¿¡ ÀÖ´Â ÀϹÝÀûÀÎ Ä¿³ÎÀ» »ç¿ëÇϰíÀÚ ÇÑ´Ù¸é Ä¿³Î À̸§À¸·Î kernel.GENERICÀ» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌÀü¿¡ »ç¿ëÇÏ´ø Ä¿³ÎÀ» »ç¿ëÇϰíÀÚ ÇÑ´Ù¸é kernel.oldÀ» »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. (¿¹¸¦ µé¾î¼ Ä¿³ÎÀ» ¾÷±×·¹À̵åÇϰųª »õ·Î ¼³Á¤ÇÏ¿´À» ¶§ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.)
You can use kernel.GENERIC to refer to the generic kernel that comes on the install disk, or kernel.old to refer to your previously installed kernel (when you've upgraded or configured your own kernel, for example).
Note: »ç¿ëÇÏ´ø ¸ðµâÀº ±×´ë·Î µÎ°í Ä¿³Î¸¸ ´Ù¸¥ °ÍÀ¸·Î ·ÎµåÇϰíÀÚ ÇÒ ¶§ :
Use the following to load your usual modules with another kernel:
unload set kernel="kernel.old" boot-conf
Ä¿³Î ±¸¼º ½ºÅ©¸³Æ®¸¦ ·ÎµåÇϰíÀÚ ÇÒ ¶§ ( ÀÌ ½ºÅ©¸³Æ® ³»¿¡´Â Ä¿³Î ºÎÆ®½ÃÀÇ ±¸¼º¿¡¼ ¼öÇàÇÏ¿©¾ß ÇÒ »çÇ×µéÀÌ ÀÖ½À´Ï´Ù. ÀÌ ½ºÅ©¸³Æ®´Â ±×·¯ÇÑ »çÇ×µéÀ» ÀÚµ¿ÀûÀ¸·Î ¼öÇàÇÕ´Ï´Ù. ):
To load a kernel configuration script (an automated script which does the things you'd normally do in the kernel boot-time configurator):
load -t userconfig_script /boot/kernel.conf