In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the startup process of CentOS". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "what is the boot process of CentOS?"
The process of enabling and launching CentOs mainly includes the following steps:
I. post power-on self-test
POST (POST ON SELF TEST) first checks each device, finishes looking for the device that has the boot record, finds the boot record that is read into the operating system, and gives control of the system to the boot record.
II. MBR Boot
MBR (Master Boot Record), MBR records are generally in the disk 0 track 1 sector, a total of 512 bytes, the first 446 bytes are BootLoader, the next 4'16 bytes store partition information, and the last two bytes are check information.
Third, GRUB loads the kernel
GRUB (GRand Unified Bootloader) is the first 446 bytes of MBR, a kind of Booloader, and its function is to select the kernel to boot.
Start the init process
The init process is the first process started by the system, and all other processes are controlled by this process, PID=1. PID=1.
1 read / etc/inittab, select the default level
On my machine, the contents of the file are as follows:
Id:5:initdefault:
Represents multi-user mode and supports graphic mode
2 execute initialization system script
This script is in / etc/rc.d/rc.sysinit
3 execute the script under / etc/rc.d/rcX.d/
Because the default level I chose here is 5, all scripts under rc5.d are read to control whether those services are started or turned off when the system starts.
The scripts here are roughly divided into two categories, those that start with S and those that start with K.
S: on behalf of the boot
K: indicates that it does not start when it is started.
File command format, for example:
S01sysstat S Boot 01 Boot order sysstat Boot script name
You can use chkconfig to relate to the startup of scripts.
The code is as follows:
Chkconfig-add SRC_SCRIPT
Add Servic
The code is as follows:
Chkconfig-del SRC_SCRIPT
Delete a service
The code is as follows:
Chkconfig SRC_SCRIPT {on | off}
Sets whether the service starts up automatically
-level 2345 specifies the default level
4 execute / etc/rc.d/rc.local script
This is the last script to start during startup, and then the / bin/login login user is executed.
CentOS sets the boot waiting time
Every time the Centos6.x operating system boots, there is a waiting time for the system. The most common place to change the password is to change the password. If you do not need to change the password, you usually need to quickly enter the system. Because the system wait time can be modified.
The boot waiting time defaults to 5 seconds. After setting it to 0 seconds, restart the server after saving, you will quickly skip the boot option to enter the system, but it is recommended to set it to 1 second, so that when you forget your password, you can press the option to reset your password in time.
The code is as follows:
[root@rac1 grub] # cat / boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a / boot partition. This means that
# all kernel and initrd paths are relative to / boot/, eg.
# root (hd0,0)
# kernel / vmlinuz-version ro root=/dev/mapper/vg_rac1-lv_root
# initrd / initrd- [generic-] version.img
# boot=/dev/sda
Default=0
Timeout=5 / / set boot option description. Default is 5 seconds.
Splashimage= (hd0,0) / grub/splash.xpm.gz
Hiddenmenu
Title Red Hat Enterprise Linux (2.6.32-358.el6.x86_64)
Root (hd0,0)
Kernel / vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vg_rac1-lv_root rd_LVM_LV=vg_rac1/lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M rd_LVM_LV=vg_rac1/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
Initrd / initramfs-2.6.32-358.el6.x86_64.img
At this point, I believe you have a deeper understanding of "what is the startup process of CentOS?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.