The bootloader is responsible for loading the kernel in storage and transferring control to the kernel. The boot loader is divided into the first stage and the second stage. The first stage part is stored in the MBR (Master Boot Record), and the second stage part is stored in another location in the storage device (HDD). The first stage boot loader is installed in the first 446 bytes of the MBR. → It's a program that is called at startup to run the OS. It's in /boot/grub/menu.lst. "/Boot/grub/grub.conf" depending on the distribution
Example) When installing GRUB in "/ dev / hda"
The GRUB version 0.9x is called "GRUB Legacy", and the GRUB version 1.9 or later is called "GRUB2". Both versions use the grub-install command to install.
・ For GRUB2 The GRUB2 configuration file is "/boot/grub/grub.cfg". However, it does not directly edit the "/boot/grub/grub.cfg" file. Describe the settings in the "/etc/default/grub" file and the files in the "/etc/grub.d" directory, and use the "grub-mkconfig" command to change the settings to the "/boot/grub/grub.cfg" file. It will be reflected in.
GRUB The boot loader GRUB version 0.9x is called "GRUB Legacy", and the boot loader GRUB 1.9 or later is called "GRUB 2". The partition number is counted from 0 for GRUB Legacy and 1 for GRUB2. The disk number is counted from 0 for both GRUB Legacy / GRUB2.
The boot loader represented by GRUB is stored in the MBR (master boot record) in the first sector (512 bytes) of the HDD. The area to be used in the MBR is determined as follows, and the boot loader is stored in the first 446-byte area.
For GRUB2, specify boot options as follows: grub> linux kernel image [optional]
・ Init = / dev / sda2 A startup option that executes a specified command instead of init ・ Root = / dev / sda2 Set the root partition.
On systems running systemd, the kernel parameter that specifies the boot target is systemd.unit. Specify the startup target for the value of the systemd.unit parameter. The target name can omit .target.
Use quiet.