CentOS 7 boot the system and service control process (II)

VI. Repair grub menu

(1) Learn the location grup configuration files

1.cd  /boot

image.png


2. There are grub2 and grub

grub: Start menu background image

grub2: Start menu configuration file

image.png


(2) The analog destruction grub menu

QQ picture 20190823164206.png

(3) .reboot restart following occurs

QQ picture 20190823165424.png


(4) Restart press the ESC stage reading section, according to the step proceeds to the emergency mode (connected to the optical disk system image)

image.png

image.png

QQ picture 20190823170047.png

image.png

image.png


(5) The input chroot / mnt / sysimage / bash into the environment

image.png


(6) Input grub2-install / dev / sda sda partition reload

image.png


(7) Input grub2-mkconfig -o /boot/grub2/grub.cfg rebuild grub menu Profile

image.png


(8) Enter exit to exit bash environment and reboot

image.png


(9) Wait for some time

image.png


grub menu repair is complete



VII. Crack the root password

When the root password is forgotten, the administrator can not operate, reset the password to enter the emergency mode

(1) in accordance with our previous method into the emergency mode (connected to the optical disk system image)

image.png



(2) Input chroot / mnt / sysimage / bash into the environment

image.png


(3) Enter passwd root to change the password

image.png


(4) Enter exit to exit bash environment, restart

image.png


(5) Use the new password root

image.png


(6). Login is successful

image.png


Such Centos root password to complete 7 crack








Guess you like

Origin blog.51cto.com/14469918/2432088