Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Boot process and Service Control of CentOS 7 system (2)

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

six。 Fix grub menu

(1)。 Understand the location of the grup configuration file

1.cd / boot

two。 There are grub and grub2 in it.

Grub: background picture of startup menu

Grub2: startup menu profile

(2)。 Simulated destruction of the grub menu

(3) the following occurs when .reboot restarts

(4)。 Restart, press ESC during the reading phase and follow the steps to enter the first aid mode (connect the CD system image)

(5)。 Enter chroot / mnt/sysimage/ to enter the bash environment

(6)。 Enter grub2-install / dev/sda to reload the sda partition

(7)。 Enter grub2-mkconfig-o / boot/grub2/grub.cfg to rebuild the grub menu configuration file

(8)。 Enter exit to exit the bash environment and restart

(9)。 Wait for a while.

Grub menu repair completed

seven。 Crack the root password

When the root password is forgotten and cannot be operated by the administrator, you can enter the first aid mode to reset the password

(1) follow our previous method to enter the first aid mode (connect the CD system image)

(2)。 Enter chroot / mnt/sysimage/ to enter the bash environment

(3)。 Enter passwd root to change the password

(4)。 Enter exit to exit the bash environment and restart

(5)。 Log in to root with a new password

(6)。 Login succeeded

In this way, the root password of Centos 7 is cracked.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report