[中英对照]Booting Process in Linux RHEL 7 | Linux RHEL 7启动过程
Posted veli
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[中英对照]Booting Process in Linux RHEL 7 | Linux RHEL 7启动过程相关的知识,希望对你有一定的参考价值。
Booting Process in Linux RHEL 7 | Linux RHEL 7启动过程
In this post, I will guide you booting process in linux RHEL 7, it is very important to know the linux booting process to troubleshoot and fix boot issues. Redhat 7 replaced the init process (/sbin/init) with systemd (/usr/lib/systemd/systemd), systemd provides considerably more control compared to the init process does, although still supporting existing init scripts.
在本文中,我将引导你了解Linux RHEL 7的启动过程。了解Linux的启动过程对排除故障和修复启动问题来说非常重要。RedHat 7使用systemd(/usr/lib/systemd/systemd)替换init进程(/sbin/init)。与传统的init进程相比,systemd提供了更多的启动控制,虽然它仍支持现有的init脚本。
Linux boot process step by step:
Linux的启动过程
1. BIOS (Perform POST) | Bios (执行上电自检Power On Self Test)
2. MBR (loads GRUB2) | 加载GRUB2
3. GRUB2
- Loads the vmlinuz kernel image 加载vmlinuz内核映像
- Extract the contents of initramfs image 提取initramfs映像中的内容
4. KERNEL
- Loads necessary driver modules from initrd image 从initrd映像中加载必要的驱动模块
- Systemd starts systems first process systemd启动系统中第一个进程
5. SYSTEMD
- Reads conf files from /etc/systemd 从/etc/systemd中读取配置文件
- Reads file linked by /etc/systemd/system/default.target 读取/etc/systemd/system/default.target指向的文件
- Brings the system to the state defined by the system target 将系统引导到由system target定义的状态
RHEL 7 booting process:
RHEL 7启动过程
BIOS:
BIOS Full Form is Basic Input/Output System, It is a software which helps in booting process when the power is on, it executes the power on self test (POST) to identify, test and initialize system hardware components and its loads the MBR.
BIOS代表的是基本的输入输出系统,它是一个帮助开机的软件,当上电后,它执行开机自检(POST)来识别、测试和初始化系统硬件部件,加载主引导记录(MBR)。
Master boot record (MBR)
It is the information in the first sector (512 bytes) of any Linux booting disk drive that identifies where and how an operating system is situated. Out of 512 bytes Boot-loader contains in 446 bytes, next 64 bytes contains the partition table for the disk. Last 2 bytes is called Magic number, which is used for error detection. MBR detects the bootable device and loads the GRUB2 boot loader into memory and transfers control over to it.
MBR是任何Linux引导磁盘驱动器的第一个扇区(512字节)中的信息,用于标识操作系统位于何处和如何定位。在这512个字节中,引导装载器占了446个字节,接下来的64个字节为磁盘分区表,最后2个字节被称为魔幻数,用于错误检测。MBR检测可启动的设备,并把GRUB2引导程序加载到内存中,然后把控制权交给GRUB2。
GRUB2 Bootloader:
GRUB stands for GRand Unified Boot-loader. In Redhat 7, GRUB 2 is the default boot loader program, GRUB boot loader was used in previous RHEL versions. Configuration file for GRUB2 is located at /boot/grub2/grub.cfg. GRUB2 do a search for vmlinuz kernel image file in the /boot and loads the vmlinuz kernel image file into memory and extract the items in the initramfs image file into tmpfs (temporary file system).
GRUB代表GRand Unified Boot-loader. 在RedHat 7中,GRUB 2是默认的引导装载程序,而GRUB用在以前的RHEL版本中。GRUB2配置文件位于/boot/grub2/grub.cfg。GRUB2在/boot查找vmlinuz内核镜像文件,一旦找到,加载vmlinuz内核映像文件到内存中,并提取initramfs映像文件中的条目然后存储到tmpfs(临时文件系统)中。
initramfs: It will pre-load the block devices modules, for example: SCSI, IDE, so that the root file system, on which those modules normally reside, can then be accessed and mounted.
initramfs: 预先加载块设备模块,例如SCSI, IDE, 因此通常存放在这些模块中的根文件系统就可以被访问和加载。
KERNEL:
The initramfs is bound to the kernel and the kernel mounts this initramfs as part of a two-stage boot process. Kernel starts the systemd process with a process ID of 1 (PID 1).
initramfs被绑定到内核,内核挂载这个initramfs作为两阶段启动过程中的一部分。内核启动进程systemd(PID为1)。
SYSTEMD:
systemd is an init system used in boot process in linux RHEL 7 to bootstrap the user space and manage all processes subsequently. systemd brings the machine to the state based on the system target, performing system initialization tasks such as:
systemd是一个init系统,用来在Linux RHEL 7开机过程中引导自举用户空间和管理接下来的所有进程。systemd基于system目标将机器引导到特定的状态,执行系统初始化等任务:
- Initializing the Network 初始化网络
- Setting the Host-name 设置主机名
- Initializing SE-Linux 初始化SE-Linux
- Initializing the system hardware based on kernel boot arguments 基于内核引导参数初始化系统硬件
- Mounting the file systems, including virtual file systems such as the /proc file system 加载文件系统,包括虚拟文件系统,例如/proc文件系统
- Starting swapping 启动交换分区
I hope this article provides you the information about, Booting Process in Linux RHEL 7. Thank you for studying!!. Be Social and share it in social media,if you really feel worth sharing it.
希望这篇文章可以提供Linux RHEL 7启动过程的相关信息。谢谢你的学习!。如果您真的觉得本文值得分享,请在社交媒体上分享它。
扩展阅读
- Step By Step Red Hat Enterprise Linux 7 Booting Process
- A Basic Guide to Linux Boot Process
- 6 Stages of Linux Boot Process (Startup Sequence)
- How Linux Boots, Run Levels, and Service Control
- Quick HOWTO : Ch07 : The Linux Boot Process
- Inside the Linux boot process
- Wikipedia: Linux startup process
- Wikipedia: Unified Extensible Firmware Interface
- Systemd Boot Process a Close Look in Linux
- RHEL6 boot process
- Slides: Linux Boot Process
- Book: linux-insides
后记 : Linux RHEL 7启动过程小结 (图片来源戳这里)
以上是关于[中英对照]Booting Process in Linux RHEL 7 | Linux RHEL 7启动过程的主要内容,如果未能解决你的问题,请参考以下文章
3GPP TS 23501-g51 中英文对照 | 4.3.5 Service Exposure in Interworking Scenarios
3GPP TS 23502-g40 中英文对照 | 4.17.4 NF/NF service discovery by NF service consumer in the same PLMN