Linux startup process, module management and Loader learning summary

1. Linux cannot be shut down at will, otherwise it will easily cause file system confusion or other problems that cannot be started.

2. The startup process is mainly BIOS, MBR, Loader, kernel+initrd, /sbin/init and other processes

3. The loader has functions such as providing menus, loading kernel files, and transferring control rights to other Loaders.

4. The boot loader can be installed in the MBR or in the bootsector area of ​​each partition

5. initrd can provide the most important modules required by the kernel during the boot process (usually modules related to disks and file systems)

6. The configuration file of init is /etc/initab. The content of this file can set the default runlevel, system initialization script, service startup of different execution levels, etc.

7. Additional devices and modules can be written in /etc/modprobe.comf

8. The management of kernel modules can use lsmod, modinfo, rmmod, insmod, modprobe and other commands

9. modprobe mainly refers to the settings of /lib/modules/$( uname -r )/modules.dep to load and unload kernel modules

10. Grub configuration files and related file system definition files are mostly placed in the /boot/grub directory, and the configuration file name is menu.lst

11. The code name setting of grub for the disk is different from that of Linux. It is mainly set by the order of detection, such as (hd0) and (hd0,0), etc.

12. Each menu in menu.lst is related to title, and when directly specifying the kernel to start, at least two files, kernel and initrd, are required

13. When setting loader control transfer in menu.lst, the most important option is chainloader+1

14. If you want to rebuild the initrd, you can use mkinitrd to process it

15. When reinstalling grub to the MBR or boot sector, you can use the grub shell to handle it

16. If you want to enter the rescue mode, you can enter the rescue mode by adding "single" or "init=/bin/bash" after the kernel option during the startup menu process.

17. We can give different passwords to each menu of grub

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326621870&siteId=291194637