Linux system startup

  
        

One: Liunx system startup

1: First, the bootloader grub is loaded by the MBR boot.

2: The grub boot loads the virtual file image initramfs.img.

3: Mirror initramfs.img uses the command read-only to hang on the root partition to load the system driver of the root partition and load the kernel kernel into memory.

4: The virtual disk image contains the basic kernel boot driver module, giving control to the kernel.

5: The kernel uses the system driver to re-read and write the mount root partition, and the system starts loading the first process init.

If you want to set a password for grub boot, add a line under the title field:

password --md5 ciphertext

In grub.conf, the hard disk number is from 0 At the beginning, regardless of whether the hard disk is of hd type or sd type, it starts with hd,

such as: sda is hd0 sdb is hd1 partition number is also starting from 0 sdb2 is (hd1, 1).

The configuration file for the grub bootstrap is placed in /boot/grub/grub.conf The link file for this file is /etc/grub.conf

The location of the kernel and virtual file images is /boot under.

2: Module files and operations

The module file compilation files are placed under /lib/modules/../kernel/lib, and the module files end with .ko.

1: lsmod View all module files that have been loaded on the system

2: rmmod module absolute path Unloads the specified module and can't be uninstalled if other modules are using the module.

3: modinfo modules_name Query module information.

4: insmod module absolute path Run a module.

5: modprobe modules_name Run a module

6: modprobe -r modules_name Unload a module to resolve dependencies.

7: depmod updates dependencies.

Copyright © Windows knowledge All Rights Reserved