650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/87/05/wKiom1fRSCOyjaV2AAIASTC03xw720.png "title=" 1.png " alt= "Wkiom1frscoyjav2aaiastc03xw720.png"/>
1. Load the BIOS hardware information to get the first boot device.
2. Read the boot loader (grub) information for the first boot device MBR
3. Load core operating system information, the core begins to decompress, and attempts to drive all hardware devices.
4. The kernel executes the INIT program and obtains the running information.
5.Init execute the/etc/rc.d/rc.sysinit file.
6. Launch the core plug-in module (/etc/modprobe.conf).
7.Init execution of individual batch files (scripts).
8.Init execution/etc/rc.d/rc.local.
9. Execute the/bin/login program and wait for the user to log in.
10. Start with the Shell to control the host after logging in.
Post:power-on-self-test, power-on self-test, is a major part of the BIOS function. Responsible for the CPU, motherboard, memory, hard disk subsystem, display subsystem, serial parallel interface, keyboard, CD-ROM drive and other hardware conditions detection.
The Rom:bios,basic input and output system holds the most important basic input and output programs for computer systems, System Information settings, power-on and self-test programs, and system startup bootstrap programs.
Ram:cmos complementary metal oxide semiconductors, preserving the setting of various parameters
Find the boot device in order, the first device with a boot program is the boot device
Bootloader: bootloader, boot loader
Windows:ntloader, just start the OS
Linux: Feature rich, provide menus that allow users to choose which system to boot or different kernel versions, load the user-selected kernel into a specific space in memory, unzip, expand, and transfer control of the system to the kernel
Lilo:linuxloader
Grub:grandunified Bootloader
GRUB 0.x:grub LEGACY,GRUB2
Mbr:
446:BOOTLOADER,64: Partition table, 2:55AA
Grub:
Primary boot loader:1st stage,1.5 stage
Secondary boot loader:2nd stage, partition file
Kernel
Self-initialization:
Detect all hardware devices that can be identified
Load the hardware driver (possibly with RAMDisk load driver)
Mount the root file system as read-only
The first application running user space:/sbin/init
Types of init programs:
Sysv:init, before CentOS 5
Configuration file:/etc/inittab
Upstart:init,centos6
Configuration files:/etc/inittab,/etc/init/*.conf
SYSTEMD:SYSTEMD, CentOS 7
Configuration file:/usr/lib/systemd/system
/etc/systemd/system
RAMDisk
One of the attributes in the kernel: use buffering and caching to speed up file access on disk
ramdisk--> Ramfs Increase Speed
CentOS 5:INITRD, tool program: MKINITRD
CentOS 6:initramfs, utility program: MKINITRD, Dracut
System initialization:
POST--Bootsequence (BIOS)--Bootloader (MBR)--Kernel (ramdisk)--ROOTFS (read-only)--init (SYSTEMD)
Before/SBIN/INITCENTOS6
Operating level: Set for the purpose of operation or maintenance of the system; 0-6:7 Levels
0: Turn off the machine
1: Single user mode (root automatic login), one, maintenance mode
2: Multi-user mode, start the network function, but do not start NFS; Maintenance mode
3: Multi-user mode, normal mode, text interface
4: Reserved level, can be same as 3 level
5: Multi-user mode, Normal mode, graphical interface
6: Restart
Default Level: 3, 5
Toggle Level: Init #
viewing level: RunLevel; Who-r
Service Script Example:
[email protected] init.d]# cat Testsrv
#!/bin/bash
# chkconfig:35 #35: Operating level, 88: The operating order of this service at system startup, up to 99; 22: The Order of operation when the system shuts down, the higher the value the lower the priority!
# description:testsrv Script #描述-----This two lines are fixed format!!!
Case $ in
Start
Echo testsrv Start
;;
Stop
Echo Testsrv Stop
;;
Status
echo testsrv Status
;;
*)
Echo ' testsrv Start | Stop | Status
;;
Esac
The following are command-line operations:
Chkconfig--add/etc/rc.d/init.d/testsrv #添加此服务至服务列表
Chkconfig--list #查看服务列表
Chkconfig--del testsrv #从服务列表中删除此服务
Chkconfig--level testsrv off #3或者5级别, this service is not started when the machine is switched on
Chkconfig--level 345 testsrv on #3, 4 or 5 level, start this service on boot
NTSYSV #也可以设置开机启动项
Chkconfig testsrv on #不指定级别时, mode is 2345
Chkconfig |grep Testsrv
Testsrv 0:off 1:off 2:on 3:on 4:on 5:on 6:off
centos6 hack root password---Single user mode (If the grub password is not set, you will need to enter the grub password to enter)
1. Restart the machine and press any key when the following interface appears
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/87/03/wKioL1fRSgyxzya8AAAGmhzeTSI573.png "style=" float: none; "title=" 2.png "alt=" Wkiol1frsgyxzya8aaagmhzetsi573.png "/>
Press "E"
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/87/05/wKiom1fRSg3DUWxGAAAUiVZr0LQ697.png "style=" float: none; "title=" 3.png "alt=" Wkiom1frsg3duwxgaaauivzr0lq697.png "/>
Press the up and down arrows to select the second row, then press "E"
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/87/03/wKioL1fRSg2iHx3SAAAcmup8Av4506.png "style=" float: none; "title=" 4.png "alt=" Wkiol1frsg2ihx3saaacmup8av4506.png "/>
After the quit, enter a space, then 1, return
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/87/05/wKiom1fRSg3jxJG6AAAP6dxaU34886.png "style=" float: none; "title=" 5.png "alt=" Wkiom1frsg3jxjg6aaap6dxau34886.png "/>
Press "B" to start the system
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/87/03/wKioL1fRSg2iAUyPAAAcodl-xus543.png "style=" float: none; "title=" 6.png "alt=" Wkiol1frsg2iauypaaacodl-xus543.png "/>
2, if the system has been started, in the command line input runlevel, check the current operating level of the system, displayed as 1 S, that is, single user mode, you can change the root password, in the command line input passwd, enter the password two times, and then restart the machine.
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/87/05/wKiom1fRSg6zfqa2AAAUi_Sh9iM026.png "style=" float: none; "title=" 7.png "alt=" Wkiom1frsg6zfqa2aaaui_sh9im026.png "/>
This article is from a "little progress every Day" blog, make sure to keep this source http://563349612.blog.51cto.com/11096134/1850856
CentOS6 start process and crack root password