Handbook:AMD64/Blocks/Bootloader/ko

부트로더 선택
리눅스 커널을 설정하고, 시스템 도구를 설치하고, 설정 파일을 편집하고 나면, 리눅스 설치의 일부로서 마지막으로 중요한 부분, 부트로더를 설치할 차례입니다.

부트로더는 부팅 과정에서 리눅스 커널의 실행을 담당합니다. 부트로더가 없으면 시스템에서는 전원 단추를 누른 후 그 다음 과정을 어떻게 처리해야 할지 모릅니다.

For, we document how to configure either GRUB2 or LILO for BIOS based systems, and efibootmgr for UEFI systems.

기본: GRUB2 사용
Previously, Gentoo Linux used what is now called GRUB Legacy as the recommended boot loader. As the name implies, the older GRUB package is no longer actively maintained and has been superseded by GRUB2. For more information about the legacy GRUB, please refer to its GRUB article on the Gentoo Wiki.

Installing GRUB2
GRUB2 is provided through the package.

The GRUB2 software is now installed on the system, but not activated yet.

Configuring GRUB2
Next, install the necessary GRUB2 files in. Assuming the first disk (the one where the system boots from) is, the following command will do this:

Next, we can generate the GRUB2 configuration based on the user configuration specified in the file and  scripts. In most cases, no configuration is needed by users as GRUB2 will automatically detect which kernel to boot (the highest one available in ) and what the root file system is.

To generate the final GRUB2 configuration, run the  command:

The output of the command must mention that at least one Linux image is found, as those are needed to boot the system. If an initramfs is used or  was used to build the kernel, the correct initrd image should be detected as well. If this is not the case, go to and check the contents using the   command. If the files are indeed missing, go back to the kernel configuration and installation instructions.

Installing LILO
LILO, the LInuxLOader, is the tried and true workhorse of Linux boot loaders. However, it lacks some features that GRUB has. The reason why LILO is still used is that, on some systems, GRUB doesn't work and LILO does. Of course, it is also used because some people know LILO and want to stick with it. Either way, Gentoo supports both.

Installing LILO is a breeze; just use emerge.

Configuring LILO
To configure LILO, first create :

In the configuration file, sections are used to refer to the bootable kernel. Make sure that the kernel files (with kernel version) and initramfs files are known, as they need to be referred to in this configuration file.

If an initramfs is necessary, then change the configuration by referring to this initramfs file and telling the initramfs where the real root device is at:

If additional options need to be passed to the kernel, use an  statement. For instance, to add the  statement to enable framebuffer:

Users that used  should know that their kernels use the same boot options as is used for the installation CD. For instance, if SCSI device support needs to be enabled, add  as kernel option.

Now save the file and exit.

To finish up, run  so LILO can apply the  settings to the system (i.e. install itself on the disk). Keep in mind that  needs to be executed every time a new kernel is installed or a change has been made to the  file.

Alternative: Using efibootmgr
On UEFI based systems, the boot loader itself is the UEFI firmware of the system. Such systems do not need additional boot loaders to help boot the system, although EFI-based bootloaders do exist to extend the functionality of UEFI systems during boot.

The application is not a boot loader, but a tool to interact with the UEFI firmware and update its settings, so that the Linux kernel that was previously installed can be booted with additional options (if necessary), or to allow multiple boot entries. This interaction is done through the EFI variables (hence the need for the support of EFI vars in the past).

First install the software:

Next, tell the UEFI firmware that a boot entry called "Gentoo" is to be created, which has the freshly installed Linux kernel booted:

If an initial ram file system (initramfs) is used, add the proper boot option to it:

With these changes done, when the system reboots, a boot entry called "Gentoo" will be available.