After the system is installed, it’s better to make a backup of the boot partition, because we can’t move it, so the backup should be done once and for all, just in case. If we accidentally delete this directory, we don’t have to panic. Because of this partition, we can’t use it except when we start up, so it’s very easy to recover. Moreover, after recovery, other services in our operating system are basically unaffected. Let’s see how to recover if / boot is deleted by mistake
Since the / boot partition is generally used to store the image and related boot files, the recovery does not affect the normal operation of other services of the system after being mistakenly deleted; However, the system can’t start after being deleted by mistake, because grub.conf file is also deleted in / boot / grub /.
Delete boot directory
Unable to start, enter grub mode
At this time, it is necessary to hang the disk for repair
Load a shell after emergency mode starts
Check that the disk has been automatically mounted to the / MNT / directory
Use chroot command to enter the disk system. Otherwise, only in the memory system.
The boot directory is empty.
Mount CD image
Use other centos8 systems to view the packages generated by vmlinuz and initramfs in the boot directory
Boot directory recovery
It can boot normally