Get the App
SLTechnology News&Howtos  ›  Network Security  › 

System recovery technology of [basic part]

Shulou Source: shulou.com Published: 2022-06-01 07:07:56 10月03日 Update

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.

Tags: Select system input CD password hard disk Force Technology success location Kernel Graphics method Root Directory Mode Physics Interface Network Card Link Management Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MySQL Linux Huawei OPPO Reno