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启动过程的相关信息。谢谢你的学习!。如果您真的觉得本文值得分享,请在社交媒体上分享它。

扩展阅读

后记 : Linux RHEL 7启动过程小结 (图片来源戳这里

[中英对照]Booting Process in Linux RHEL 7 | Linux RHEL 7启动过程的更多相关文章

  1. [中英对照]Introduction to DPDK: Architecture and Principles | DPDK概论: 体系结构与实现原理

    [中英对照]Introduction to DPDK: Architecture and Principles | DPDK概论: 体系结构与实现原理   Introduction to DPDK: ...

  2. 【论文翻译】NIN层论文中英对照翻译--(Network In Network)

    [论文翻译]NIN层论文中英对照翻译--(Network In Network) [开始时间]2018.09.27 [完成时间]2018.10.03 [论文翻译]NIN层论文中英对照翻译--(Netw ...

  3. eclipse菜单解释及中英对照《二》

    上篇文章主要介绍了eclipse中每个大的标题下的中英文及其用法. 感谢http://blog.csdn.net/li_jinjian2005/article/details/2831641这个博主. ...

  4. eclipse菜单解释及中英对照

    在使用Eclipse作为开发工具的时候,建议使用英文版本的(直接百度从官网下就行,这里不详细描述,如果有问题,咱们私聊).虽然中文版本的对于和我一样对英文是小白的看起来特别爽,但是公司大多是英文版本的 ...

  5. [转]从普通DLL中导出C++类 – dllexport和dllimport的使用方法(中英对照、附注解)

      这几天写几个小程序练手,在准备将一个类导出时,发现还真不知道如果不用MFC的扩展DLL,是怎么导出的.但我知道dllexport可以导出函数和变量,而且MFC扩展DLL就算是使用了MFC的功能,但 ...

  6. webstorm快捷键 webstorm keymap内置快捷键英文翻译、中英对照说明

    20160114参考网络上的快捷键,整理自己常用的: 查找/代替shift+shift 快速搜索所有文件,简便ctrl+shift+N 通过文件名快速查找工程内的文件(必记)ctrl+shift+al ...

  7. 知识:CSS 词汇表(中英对照)_CSS Vocabulary

    注释(Comment) 语句(Statement) 规则集(Rule-set) At 规则(At-rule) 媒体查询(Media query) 媒体查询列表(Media query list) 媒体 ...

  8. HALCON中的算子大全(中英对照)

    HALCON中的算子大全(中英对照) Chapter 1 :Classification1.1 Gaussian-Mixture-Models1.add_sample_class_gmm功能:把一个训 ...

  9. PCMM(人力资源能力成熟度模型)V2.0中英对照版发布

    PCMM中英版终于发布 时光荏苒,从当初的回眸到如今的回头,这才发现:坚守一份承诺是多么的不易! 一年多了,这份承载殷切期待的作品--<PCMM(人力资源能力成熟度模型)V2.0 (中英文对照版 ...

随机推荐

  1. Hibernate实体类注解的问题

    刚刚和八千哥弄一个问题,这个很诡异的问题,困扰了我这么长时间.哎,说来惭愧. 用三大框架写毕设,结果今天获取前台数的时候,发现传值有个传不到. 我一开始用的是名为cows的数据,后来换了个数据库,加了 ...

  2. 基于Extjs的web表单设计器

    由于这样工作和自身的一些原因很长一段时间没有写过博客了.最近想把自己前面一段时间搞出的一个表单设计器的相关经验或者经历记录下来.分享给大家,也算是对自己前2个月的一个总结回顾吧. 首先介绍一下开发此版 ...

  3. asp.net core部署到iis

    asp.net core项目部署到IIS稍微不同于之前,记录几个要点: 一.下载安装.NET Core 托管捆绑包,下载地址,这个链接或许不是最新的了,官方文档里面有这个链接,到下图所示位置即可找到. ...

  4. Selenium下拉菜单(Select)的操作-----Selenium快速入门(五)

    对于一般元素的操作,我们只要掌握本系列的第二,三章即可大致足够.对于下拉菜单(Select)的操作,Selenium有专门的类Select进行处理.文档地址为:http://seleniumhq.gi ...

  5. DS作业01--日期抽象数据类型设计与实现

    第六次作业 1.思维导图及学习体会 1.1 思维导图 1.2 学习体会 因为假期里面代码的练习量很小,所以开学来上学期的知识遗忘了很多,刚刚开始写大作业的时候很困难,完全没有思路,后来看了几位同学的代 ...

  6. 激活IDEA,pycharm方法

    1.修改hosts文件将0.0.0.0 account.jetbrains.com添加到hosts文件最后,注意hosts文件无后缀,如果遇到无法修改或权限问题,可以采用覆盖的方法去替换hosts文件 ...

  7. 配置DNS服务器转发器

    1.(windows server 2008 r2)控制面板->管理工具->服务器管理器->DNS->服务器图标->属性 2.转发器->编辑 3.填写DNS并点击确 ...

  8. BZOJ 1248--游乐园(DFS&贪心)

    1248: 游乐园Pleasure Ground Time Limit: 10 Sec  Memory Limit: 128 MBSec  Special JudgeSubmit: 6  Solved ...

  9. Linux之解决命令行cat命令中文乱码

    临时解决cat中文乱码 cat test.txt | iconv -f GBK -t UTF-8

  10. 如何使用robots禁止各大搜索引擎爬虫爬取网站

    ps:由于公司网站配置的测试环境被百度爬虫抓取,干扰了线上正常环境的使用,刚好看到每次搜索淘宝时,都会有一句由于robots.txt文件存在限制指令无法提供内容描述,于是便去学习了一波 1.原来一般来 ...