11. System Recovery ***********
# #系统启动流程 # #
Power
||
BIOS (in read-only storage on the motherboard, basic input or output system)
function, hardware detection, activation hardware
||
Grub System boot (grub boot divided into two stages)
1) Stage 1 MBR (Master boot record) master boot record 0 tracks on hard disk, one sector, 446 bytes
*) dd If=/dev/zero Of=/dev/vda bs=446 count=1 can empty MBR
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8A/81/wKioL1gyxhfy_bSFAACHUP8-g8s901.png "title=" Picture 12.png "alt=" Wkiol1gyxhfy_bsfaachup8-g8s901.png "/>
*) go to save mode, perform chroot/mnt/sysimage switch to real/environment,
and execute GRUB2-INSTALL/DEV/VDA
Booting from the network card
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8A/81/wKioL1gyxXmwmddNAACSgqCtFWs574.png "title=" Picture 1.png "alt=" Wkiol1gyxxmwmddnaacsgqctfws574.png "/> 650" this.width=650; "src=" http://s1.51cto.com/ Wyfs02/m01/8a/85/wkiom1gyxyotushgaabci6qqq34494.png "title=" image 2.png "alt=" wkiom1gyxyotushgaabci6qqq34494.png "/ >
2) Phase 2 Grub File boot phase
Locate the/boot partition
Read /boot/grub2/grub.cfg
file lost,grub2-mkconfig >/boot/grub2/grub.cfg
Booting from the network card
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8A/85/wKiom1gyxZGBFHVMAABFHapCoII397.png "title=" Picture 3.png "alt=" Wkiom1gyxzgbfhvmaabfhapcoii397.png "/>
||
boot kernel, read-only mount /device
Testing equipment
Initialize the device driver
Enter the system initialization phase
Kernel is missing, the new kernel installation package can be resolved
RPM-IVH kernel-xxxxx.rpm--force
Or you can add the missing files
Rpm2cpio kernel-xxxxx.rpm | Cpio-id // decomposition file
Booting from the network card
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8A/81/wKioL1gyxbbze_8jAAB94xetGNE114.png "title=" Picture 6.png "style=" Float:none; "alt=" Wkiol1gyxbbze_8jaab94xetgne114.png "/>650" this.width=650; "src="/HTTP// S1.51cto.com/wyfs02/m02/8a/81/wkiol1gyxbwcsjb3aahr97hw6ky375.png "style=" Float:none; "title=" Picture 5.png "alt=" Wkiol1gyxbwcsjb3aahr97hw6ky375.png "/>
||
System initialization phase
system initialization phase load INITRD mirror
Open Initialization Process SYSTEMD
Start SELinux
Load Kernel parameters
Initialize the system clock, keyboard, host name
re-read/write mount /device
activating RAID,LVM
Activate quotas
start All services in the multi-user.target.wants
If the boot service configuration is wrong, you can press "E" in the Startup selection screen , modify the boot configuration, and then restore the correct configuration.
For example, if you start the boot by default, link to Reboot.service. The system will restart after booting, in the Boot selection screen, select "E", the kernel boot option to fix RW, and in the last
add rd.break. When startup executes here, the system exits and modifies the boot configuration file in the resulting shell
Booting from hard disk
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8A/81/wKioL1gyxbbze_8jAAB94xetGNE114.png "title=" Picture 6.png "style=" White-space:normal;float:none; "alt=" Wkiol1gyxbbze_8jaab94xetgne114.png "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/8A/85/wKiom1gyxc3DCTdvAABSwr4FoIo276.png "style=" float: none; "title=" Image 7.png "alt=" Wkiom1gyxc3dctdvaabswr4foio276.png "/>
||
Turn on the Virtual Console
Start graphics
initramfs-' uname-r '. img
lost by: mkinitrd initramfs-' uname-r '. img ' uname-r ' recovery
or mkinitrd initramfs-$ (UNAME-R). IMG $ (UNAME-R)
Uname-r--View system version number
Booting from the network card
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8A/81/wKioL1gyxc_gbTBhAADueY-vK34499.png "title=" Picture 8.png "style=" Float:none; "alt=" Wkiol1gyxc_gbtbhaaduey-vk34499.png "/>
Note: If the contents of/boot/partition are all lost
Install GRUB2 First , then reload the kernel, and finally restore the/boot/grub2/grub.cfg file
Booting from the network card
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8A/85/wKiom1gyxonicmjgAAIbNvMZjKw939.png "title=" Picture 9.png "alt=" Wkiom1gyxonicmjgaaibnvmzjkw939.png "/>
Change Password
Booting from hard disk
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8A/81/wKioL1gyxqHi-nEvAAB94xetGNE176.png "style=" float: none; "title=" Image 10.png "alt=" Wkiol1gyxqhi-nevaab94xetgne176.png "/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8A/85/wKiom1gyxqLwAfc5AAB98pmrd70751.png "style=" float: none; "title=" Image 11.png "alt=" Wkiom1gyxqlwafc5aab98pmrd70751.png "/>
Linux Note 2-11 System Recovery