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

System recovery technology of [basic part]

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

System recovery technology

Recovery method of 1.mbr error

Dd if=/dev/zero of=/dev/vda bs=446 count=1

Reboot

Open the virtual manager at this time

Boot with CD or network card

Select troubleshooting

Select rescue a red hat.

The original root directory will be mounted to / mnt/sysimage

Choose to continue

Enter grub2-install / dev/vda

Then ctrl+d twice.

Force shutdown to change the first boot item to hard disk boot

two。 Delete grub2.cfg

Enter / boot/grub2/

Delete grub2.cfg

Reboot

Enter grub2-mkconfig > / boot/grub2/grub.cfg after successfully opening it.

If there is no ip input / etc/init.d/network restart

Yum install

3. Delete img

Enter / boot to delete initXXXXXXXXXXX.img

Delete vmliXXXXXXXXXXXXX.img

CD-ROM starts rescue mode

Yum install lftp-y

Lftp IP installs Paclages kernel-3.10 in yum source

Exit restart and change the hard disk to the first startup item

4. Modify the password

Forget the root password:

First change selinux to disabled

Press e to edit when booting

Delete the position from 8 to ro

Change it to rw rd.break

Ctrl+x

5. Modify link

Rm-fr / etc/systemd/system/default.target

Ln-s / usr/lib/systemd/system/poweroff.target / etc/systemd/system/default.target

System paralysis

Select kernel and press e to edit

Force to interrupt the system on

Rm-fr / etc/systemd/system/default.target

Ln-s / usr/lib/systemd/system/graphical.target

/ etc/systemd/system/default.target

Graphical.target is to launch the physical graphical interface.

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

Network Security

Wechat

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

12
Report