로더는 부트스트랩의 세 단계 중 마지막 단계이며, 파일시스템 위에 위치하고 있습니다. 보통 /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