https://www.thegeekdiary.com/centos-rhel-7-booting-process/

It is important to understand the linux boot process to troubleshoot boot problems. The post describes the high level steps in the boot process. Below flow chart describes basic boot stages and what happens during each boot stage.

Linux 7 booting process
1. BIOS (or firmware phase)

– The BIOS (Basic Input/Output System),performs the POST (power on self test) to detect,test and initialize system hardware components.
– Loads the MBR (Master boot record).

  1. Master boot record (MBR)

– Master Boot Record (MBR) is the first 512 bytes of the boot drive that is read into memory by the BIOS.
– The next 64 bytes contain the partition table for the disk. The last two bytes are the “Magic Number” which is used for error detection.

Master boot record (MBR)

– MBR discovers the bootable device and loads the GRUB2 boot loader into memory and transfers control over to it.
3. GRUB2 Bootloader

– The default bootloader program used on RHEL 7 is GRUB 2. GRUB stands for GRand Unified Bootloader. GRUB 2 replaces the older GRUB bootloader also called as legacy GRUB.
– The GRUB 2 configuration file is located at /boot/grub2/grub.cfg (Do not edit this file directly).
– GRUB 2 menu-configuration settings are taken from /etc/default/grub when generating grub.cfg.
– Sample /etc/default/grub file :

cat /etc/default/grub

GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_disABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT=”console”
GRUB_CMDLINE_LINUX=”rd.lvm.lv=rhel/swap crashkernel=auto rd.lvm.lv=rhel/root rhgb quiet net.ifnames=0”
GRUB_disABLE_RECOVERY=”true”

– If changes are made to any of these parameters,you need to run grub2-mkconfig to re-generate the /boot/grub2/grub.cfg file.

grub2-mkconfig –o /boot/grub2/grub.cfg

– GRUB2 searches the compressed kernel image file also called as vmlinuz in the /boot directory.
– GRUB2 loads the vmlinuz kernel image file into memory and extracts the contents of the initramfs image file into a temporary,memory-based file system (tmpfs).
– The initial RAM disk (initrd) is an initial root file system that is mounted before the real root file system.

initramfs
– The job of the initial RAM file system is to preload the block device modules,such as for IDE,SCSI,or RAID,so that the root file system,on which those modules normally reside,can then be accessed and mounted.
– The initramfs is bound to the kernel and the kernel mounts this initramfs as part of a two-stage boot process.
– The dracut utility creates initramfs whenever a new kernel is installed.
– Use the lsinitrd command to view the contents of the image created by dracut:

lsinitrd | less

  1. Kernel

– The kernel starts the systemd process with a process ID of 1 (PID 1).

root 1 0 0 02:10 ? 00:00:02 /usr/lib/systemd/systemd –switched-root –system –deserialize 23

  1. systemd

– systemd is the ancestor of all processes on a system.
– systemd reads the file linked by /etc/systemd/system/default.target (for example,/usr/lib/systemd/system/multi-user.target) to determine the default system target (equivalent to run level). The system target file defines the services that systemd starts.
systemd brings the system to the state defined by the system target,performing system initialization tasks such as:
1. Setting the host name
2. Initializing the network
3. Initializing SELinux based on its configuration
4. Printing a welcome banner
5. Initializing the system hardware based on kernel boot arguments
6. Mounting the file systems,including virtual file systems such as the /proc file system
7. Cleaning up directories in /var
8. Starting swapping
CentOS / RHEL 7 : Beginners guide to systemd
CentOS / RHEL 7 : Begginners guide to systemd targets (replacement of SysV init run levels)

Filed Under: CentOS/RHEL 7,Linux
Some more articles you might also be interested in …

CentOS / RHEL : How to find if a network port is open or not?
CentOS / RHEL : How to activate and mount 2 Volume groups with same names
CentOS / RHEL 5,6 : Change default kernel (boot with old kernel)
CentOS / RHEL 5 : How to rebuild Initial Ramdisk Image
RHEL 7 – RHCSA Notes : Configure a system to use time services
CentOS / RHEL 6 : How to setup yum repository using locally mounted DVD
CentOS / RHEL : How to configure NTP server and client
CentOS / RHEL : How to determine which SNMP version is being used
CentOS / RHEL 7 : How to enable telnet for a group of users
RedHat / CentOS : Managing software RAID with mdadm

CentOS / RHEL 7 : Booting process的更多相关文章

  1. iOS – 友好的NSDate格式

    我需要在我的应用程序中显示帖子的日期给用户,现在我用这种格式:“5月25日星期五”.如何格式化NSDate以阅读“2小时前”的内容?使其更加用户友好.解决方法NSDateFormatter不能做这样的事情;你将需要建立自己的规则.我想像:所以这是打印’x分钟前’或’x小时前’从日期起24小时,通常是一天.

  2. 记一次云计算测试实验-openstack-icehouse-安装swift

    -----------------------controller:---------------------------------sourceadmin-openrc.shkeystoneuser-create--name=swift--pass=000000--email=swift@localhostkeystoneuser-role-add--user=swift--tenant=ser

  3. android – 模拟器中hosts文件中的Url映射被忽略

    我正在使用genymotion仿真器,并使用它从主机文件中提取adbremountadbpull/system/etc/hostsC:\Users\Rkn09\Desktop\hosts我添加了新的映射192.168.0.115xxx.mydomain.com,我把它推回到模拟器使用adbpushC:\Users\Rkn09\Desktop\hosts/system/etc/hosts但是当我向x

  4. CentOS 8.2服务器上安装最新版Node.js的方法

    这篇文章主要介绍了CentOS 8.2服务器上安装最新版Node.js的方法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

  5. Spring Boot 集成Redisson实现分布式锁详细案例

    这篇文章主要介绍了Spring Boot 集成Redisson实现分布式锁详细案例,文章围绕主题展开详细的内容介绍,具有一定的参考价值,需要的朋友可以参考一下

  6. spring boot实现文件上传

    这篇文章主要为大家详细介绍了spring boot实现文件上传,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

  7. Spring Boot + EasyExcel实现数据导入导出

    这篇文章主要介绍了Spring Boot+EasyExcel实现数据导入导出,文章围绕主题展开详细的内容介绍,具有一定的参考价值,需要的朋友可以参考一下

  8. Spring Boot日志的打印与持久化详细解析

    Spring Boot默认使用SLF4J+Logback 记录日志,并提供了默认配置,即使我们不进行任何额外配,也可以使用SLF4J+Logback进行日志输出

  9. SpringBoot浅析安全管理之Spring Security配置

    安全管理是软件系统必不可少的的功能。根据经典的“墨菲定律”——凡是可能,总会发生。如果系统存在安全隐患,最终必然会出现问题,这篇文章主要介绍了SpringBoot安全管理Spring Security基本配置

  10. centos+php+coreseek+sphinx+mysql之一coreseek安装篇

    这篇文章主要介绍了centos+php+coreseek+sphinx+mysql之一coreseek安装篇的相关资料,非常不错具有参考借鉴价值,需要的朋友可以参考下

随机推荐

  1. 在airgapped(离线)CentOS 6系统上安装yum软件包

    我有一个CentOS6系统,出于安全考虑,它已经被空气泄漏.它可能从未连接到互联网,如果有,它很长时间没有更新.我想将所有.rpm软件包放在一个驱动器上,这样它们就可以脱机安装而无需查询互联网.但是,我在测试VM上遇到的问题是,即使指定了本地路径,yum仍然会挂起并尝试从在线存储库进行更新.另外,有没有办法使用yum-utils/yumdownloader轻松获取该包的所有依赖项和所有依赖项?目前

  2. centos – 命名在日志旋转后停止记录到rsyslog

    CentOS6.2,绑定9.7.3,rsyslog4.6.2我最近设置了一个服务器,我注意到在日志轮换后,named已停止记录到/var/log/messages.我认为这很奇怪,因为所有日志记录都是通过rsyslog进行的,并且named不会直接写入日志文件.这更奇怪,因为我在更新区域文件后命名了HUPed,但它仍然没有记录.在我停止并重新启动命名后,记录恢复.这里发生了什么?

  3. centos – 显示错误的磁盘大小

    对于其中一个磁盘,Df-h在我的服务器上显示错误的空白区域:Cpanel表明它只有34GB免费,但还有更多.几分钟前,我删除了超过80GB的日志文件.所以,我确信它完全错了.fdisk-l/dev/sda2也显示错误:如果没有格式化,我该怎么做才能解决这个问题?并且打开文件描述符就是它需要使用才能做到这一点.所以…使用“lsof”并查找已删除的文件.重新启动写入日志文件的服务,你很可能会看到空间可用.

  4. 如何在centos 6.9上安装docker-ce 17?

    我目前正在尝试在centOS6.9服务器上安装docker-ce17,但是,当运行yuminstalldocker-ce时,我收到以下错误:如果我用跳过的标志运行它我仍然得到相同的消息,有没有人知道这方面的方法?

  5. centos – 闲置工作站的异常负载平均值

    我有一个新的工作站,具有不寻常的高负载平均值.机器规格是:>至强cpu>256GB的RAM>4x512GBSSD连接到LSI2108RAID控制器我从livecd安装了CentOS6.564位,配置了分区,网络,用户/组,并安装了一些软件,如开发工具和MATLAB.在启动几分钟后,工作站负载平均值的值介于0.5到0.9之间.但它没有做任何事情.因此我无法理解为什么负载平均值如此之高.你能帮我诊断一下这个问题吗?

  6. centos – Cryptsetup luks – 检查内核是否支持aes-xts-plain64密码

    我在CentOS5上使用cryptsetupluks加密加密了一堆硬盘.一切都很好,直到我将系统升级到CentOS6.现在我再也无法安装磁盘了.使用我的关键短语装载:我收到此错误:在/var/log/messages中:有关如何装载的任何想法?找到解决方案问题是驱动器使用大约512个字符长的交互式关键短语加密.出于某种原因,CentOS6中的新内核模块在由旧版本创建时无法正确读取512个字符的加密密钥.似乎只会影响内核或cryptsetup的不同版本,因为在同一系统上创建和打开时,512字符的密钥将起作用

  7. centos – 大量ssh登录尝试

    22个我今天登录CentOS盒找到以下内容这是过去3天内的11次登录尝试.WTF?请注意,这是我从我的提供商处获得的全新IP,该盒子是全新的.我还没有发布任何关于此框的内容.为什么我会进行如此大量的登录尝试?是某种IP/端口扫描?基本上有4名匪徒,其中2名来自中国,1名来自香港,1名来自Verizon.这只发生在SSH上.HTTP上没有问题.我应该将罪魁祸首子网路由吗?你们有什么建议?

  8. centos – kswap使用100%的CPU,即使有100GB的RAM也可用

    >Linux内核是否应该足够智能,只需从内存中清除旧缓存页而不是启动kswap?

  9. centos – Azure将VM从A2 / 3调整为DS2 v2

    我正在尝试调整前一段时间创建的几个AzureVM,从基本的A3和标准A3到标准的DS2v2.我似乎没有能力调整到这个大小的VM.必须从头开始重建服务器会有点痛苦.如果它有所不同我在VM中运行CentOS,每个都有一个带有应用程序和操作系统的磁盘.任何人都可以告诉我是否可以在不删除磁盘的情况下删除VM,创建新VM然后将磁盘附加到新VM?

  10. centos – 广泛使用RAM时服务器计算速度减慢

    我在非常具体的情况下遇到服务器速度下降的问题.事实是:>1)我使用计算应用WRF>2)我使用双XeonE5-2620v3和128GBRAM(NUMA架构–可能与问题有关!

返回
顶部