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

What if the / boot directory under the Linux system is damaged and cannot be started?

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

Share

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

This article focuses on "Linux system / boot directory damage can not start how to do", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "Linux system / boot directory damage can not start what to do" bar!

The / boot directory in the linux system stores all kinds of files needed to boot the system, including the kernel, boot menu, required configuration files, and so on.

But how do you restore and restart the system when you accidentally delete some files in the / boot directory or simply disappear the entire / boot directory?

The following can solve this problem by loading the disk image file to reload the kernel and the grub2 loader, but the process is a bit complicated.

Experimental environment: rhel7 system in KVM.

1. Simulated deletion of the / boot directory, making the system unable to boot

2.reboot attempts to reboot, confirming that the system has failed

3. Force shutdown of the system

4. Go to the virtual machine configuration page and choose to import the local disk image file in the following click order

Choose to import a disk image file

5. Restart to set the boot order and add CDROM startup, as shown below

6. Restart the system, press F12 to enter the boot menu interface when the system starts

7. Enter the number "3", guide through DVD/CD, and then select "Troubleshooting" in the screenshot below

8. Select "Rescue a Red Hat Enterprise Linux system" in the screenshot below and enter

9. To enter the Recue section, click Continue- "OK-" OK in the screenshot below

10. Change the root directory

11. Mount cdrom to / mnt

twelve。 Configure local software repository files

13. To reinstall the kernel, be sure to use the reinstall command, not install

14. Reinstall grub2

15. Regenerate the grub2 profile grub.cfg

16. Restart after two exit, the system has been successfully restored!

At this point, I believe that the "Linux system / boot directory damage can not start what to do" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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