2018-04-23 "Brother Bird's Linux Private Kitchen Basic Learning (Fourth Edition)" Chapter 19 Boot Process, Module Management and Loader

Boot process:
1. Load the BIOS (Basic Input Output System)
    and load the CMOS information to
        obtain various hardware configurations of the host,
            such as the communication frequency between the CPU and the interface device,
            the search sequence of the boot device,
            the size and type of the hard disk, the
            system time, Information
            on whether Plug and Play (PnP, plug and play) is enabled for each peripheral bus,
             the I/O address of each interface device,
            and the IRQ disconnection that communicates with the CPU
            .
BIOS performs Power-on Self Test (POST),
performs hardware detection, initializes
settings, PnP devices
define bootable devices, and sequentially
reads the data of the booting device.
2. Reads and executes the MBR in the first booting device. boot Loader (that is, programs such as grub2, spfdisk, etc.);
3. According to the settings of the boot loader, the Kernel (core) is decompressed (also known as loading) into the main memory, and the Kernel will start to detect the hardware and load the driver. Including storage device, CPU, network card, sound card and so on.
4. After the hardware driver is successful, the Kernel will actively call the systemd program and boot with the default.target process;
o systemd executes sysinit.target to initialize the system and basic.target to prepare the operating system;
o systemd starts the local and server services under multi-user.target;
o systemd executes /etc/rc.d/rc under multi-user.target .local file;
o systemd executes getty.target and login service under multi-user.target; o systemd executes the noun extraction
of the service boot process required by graphic: 1. BIOS 2. MBR's boot Loader 3. Kernel hardware driver 4 , systemd program default.target process sysinit.target basic.target multi-user.target local and server service multi-user.target /etc/rc.d/rc.local getty.target of multi-user.target and The main functions of the login service graphical boot loader are as follows:  Provide menu: users can choose different boot items, which is also an important function of multi-boot!  Load core file: directly point to the bootable program section to start the operating system;  Transfer to other loader: Transfer the boot management function to other loader.






















initramfs virtual file system. Initial RAM Disk or Initial RAM Filesystem. Filename used: /boot/initrd or /boot/initramfs
vmlinuz core file. These core modules (drivers) are placed in the /lib/modules/ directory

default.target default operating environment
    graphical.target graphical interface
        /etc/systemd/system/graphical.target.wants/: user-set to load unit
        /usr/lib/systemd/system/graphical.target.wants/: The system default loaded unit
        /usr/lib/systemd/system/graphical.target
        /usr/lib/systemd/system/multi-user.target text interface
        /usr/lib/systemd/system/multi-user.target.wants/
        /etc/systemd/system/multi-user.target.wants/

 /usr/lib/systemd/system (system default service startup script settings )
 /etc/systemd/system (script settings developed and set by administrators themselves)

modules:
 /etc/modules-load.d/*.conf: The location where the core load module is simply required;
 /etc/modprobe.d/*.conf: You can add the location of module parameters

/etc/sysconfig/*


systemctl list-dependencies graphical.target command to view the process of system service enablement
systemctl [command]
command items include the following:
Halt Enter the system stop mode, the screen may retain some information, which is related to your power management mode.
Poweroff Enters the system shutdown mode, and the direct shutdown does not provide power!
reboot Directly restarts
suspend Enters hibernation mode
reboot # System restart
poweroff # System shutdown
restart atd # Restart the atd service
enable atd # Let the service start automatically
status atd # Check the current status of atd
[command] [--type=TYPE] [--all]
command:
list-units: Lists currently activated units by unit. If you add --all, it will list the ones that are not started.
list-unit-files : List all files according to the files in /usr/lib/systemd/system/.
--type=TYPE: is the unit type mentioned earlier, mainly service, socket, target, etc.
[root@study ~]# systemctl [command] [unit.target]
Options and parameters:
command:
get-default : get the current target
set-default : set the following target to become the default operation mode
isolate: switch to the back The connected mode
hibernate enters hibernation mode
rescue Force enters rescue mode
emergency Force enters emergency rescue mode
list-dependencies [unit] [--reverse]
Options and parameters:
--reverse : Reverse tracking who uses this unit means!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326376769&siteId=291194637