Rescue Mode for Vmware Virtual Machines

Before entering single-user mode to change the root password , the premise is that GRUB is not encrypted or the GRUB password is known.

If you cannot enter GRUB, use rescue mode.


  • Shut down first
[root@localhost ~]# init 0
  • Edit virtual machine settings

Edit virtual machine settings

  • To tick "connect at startup"

  • Right click - power - enter BIOS on reboot (enter firmware when powered on)

  • Select "Boot"

  • Move "CD-ROM Driver" to the first line, then CD-ROM is the first to start

Move "CD-ROM Driver" to the first line

  • F10 save and exit

  • Enter the CD-ROM boot interface, select "Troubleshooting"

Troubleshooting

  • Select the second item - Rescue a CentOS system (if you cannot enter GRUB, you can only use the CD-ROM drive to enter the "Rescue a CentOS system" interface)

Rescue a CentOS system

  • Select "1" to continue

Select "1"

Rescue Mount

chroot /mnt/sysimage/

chroot /mnt/sysimage/

  • At this time, you can change the root password

At this time, you can change the root password

  • Modify the BIOS or edit the virtual machine settings, and then restart

Here choose the second

Click the small CD-ROM drive in the lower right corner of the virtual machine and select "Settings"

The small CD-ROM drive in the lower right corner of the virtual machine

Uncheck it, do not connect CD-ROM at startup

uncheck

  • power - restart client

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325729657&siteId=291194637