2018-04-23 "Bird Brother's Linux private cuisine Basic Study (Fourth Edition)" chapter 19th, boot process, module management and loader notes

Source: Internet
Author: User

Start-up process:
1. Load BIOS (Basic Input Output System)
Load the CMOS information,
Obtain the hardware configuration of the host,
such as the frequency of communication between CPU and interface devices,
The boot device search order,
The size and type of the hard disk,
System time,
Does the peripheral bus start Plug and play (PnP, Plug and Play device),
I/O addresses for each interface device,
And the IRQ fork that communicates with the CPU.
And so on information.
BIOS Boot Self Test (power-on, Post)
Perform initialization of hardware detection
Setting up the PnP device
Define the sequence of devices that can be powered on
Reading data from the boot device
2. Read and execute the boot Loader (i.e. GRUB2, spfdisk, etc.) of the MBR in the first boot device;
3. According to the boot loader setting Kernel (CORE) decompression (also known as loading) to the main memory, Kernel will start to detect hardware and load drivers, including storage devices, CPUs, network cards, sound cards and so on.
4. After the hardware driver is successful, Kernel will actively call the SYSTEMD program and start the default.target process;
o SYSTEMD perform sysinit.target initialization system and basic.target prepare operating system;
o systemd start the native and server services under Multi-user.target;
O systemd Execute the/etc/rc.d/rc.local file under Multi-user.target;
o systemd execution of Getty.target and login services under Multi-user.target;
o Systemd perform services required by graphical

Noun extraction from the start-up process:
1. BIOS
2, the boot Loader of the MBR
3, Kernel
Hardware
Driver Program
4. SYSTEMD procedure
Default.target process
Sysinit.target
Basic.target
Multi-user.target Native and server services
Multi-user.target's/etc/rc.d/rc.local
Multi-user.target Getty.target and log in service
Graphical


The main features of boot loader are as follows:
? Menu: Users can choose different boot items, which is also an important function of multi-boot!
? Load the core file: direct point to the bootable program section to start the operating system;
? Transfer other loader: The power-on management function is transferred to other loader.

Initramfs virtual file system. Initial Ram Disk or Initial Ram Filesystem. File name used:/BOOT/INITRD or/boot/initramfs
Vmlinuz core file. These core modules (drivers) are placed within the/lib/modules/directory

Default.target Pre-set operating environment
Graphical.target graphical interface
/etc/systemd/system/graphical.target.wants/: The user sets the loaded unit
/usr/lib/systemd/system/graphical.target.wants/: Unit loaded by default system
/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 setting)
? /etc/systemd/system (Administrator's own development with set script settings)

Module:
? /etc/modules-load.d/*.conf: simply to the location of the core loading module;
? /etc/modprobe.d/*.conf: The position of the module parameter can be added

/etc/sysconfig/*


Systemctl list-dependencies graphical.target command to view the system's service-enabled processes
systemctl [instruction]
The directive items include the following:
Halt into the system stop mode, the screen may retain some information, which is related to your power management mode
Poweroff into the system shutdown mode, the direct shutdown does not provide power Oh!
Reboot Direct reboot
Suspend into sleep mode
Reboot # System Restart
Poweroff # system shutdown
Restart ATD # Restart ATD This service
Enable ATD # Let the service boot up automatically
Status ATD # Check out the current status of ATD
[Command] [--type=type] [--all]
Command
List-units: The unit that is currently activated is listed according to unit. If you add--all, the list does not start.
List-unit-files: The list of all files is described according to the files in the/usr/lib/systemd/system/.
--type=type: The unit type mentioned earlier, mainly service, socket, target, etc.
[Email protected] ~]# systemctl [command] [Unit.target]
Options and Parameters:
Command
Get-default: Get the current target
Set-default: Set the subsequent target to become the default mode of operation
Isolate: Switch to the next mode
Hibernate enters Hibernate mode
Rescue forced access to rescue mode
Emergency forced into emergency rescue mode
list-dependencies [Unit] [--reverse]
Options and Parameters:
--reverse: Reverse track who uses the meaning of this unit!

2018-04-23 "Bird Brother's Linux private cuisine Basic Study (Fourth Edition)" chapter 19th, boot process, module management and loader notes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.