Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the steps to fix boot errors in CentOS 6.x?

Shulou Source: shulou.com Published: 2022-06-01 08:02:05 10月04日 Update

This article is to share with you about CentOS 6.x boot error repair steps, the editor feels very practical, so share with you to learn, I hope you can learn something after reading this article, say no more, follow the editor to have a look.

5.X generally, you can enter single-user mode by adding a word "single" at the end of the following line in grub.

The code is as follows:

Kernel / vmlinuz-2.6.18-8.el5 single ro root=LABEL=/ rhgb quiet

Then 6.x goes like this:

The code is as follows:

Kernel / vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=eb7b1e63-5e8c-4e6c-b87c-140a310e8224 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM

Add "single" directly to the back and still can't get into the system. The result is as follows:

Later, it was changed to kernel / vmlinuz-2.6.18-8.el5 single ro root=LABEL=/ rhgb quiet following the example of 5.x.

The following figure prompts:

A hint means there must be a way! To be a live horse doctor, change the kernel line in grub to

The code is as follows:

Kernel / vmlinuz-2.6.18-8.el5 single ro root=LABEL=/ rhgb quiet rdshell

The system can actually give a debug shell, as shown in the figure:

That's easy. It is perfectly normal to restore etc/passwd decisively.

Steps:

The code is as follows:

# mount dev/sda2 tmp first needs to know how your system is partitioned and where to put the etc

# cd tmp

/ etc#cat passwd- > passwd

OK, restart the system directly and run the system normally.

The above is what the CentOS 6.x boot error repair steps are, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Code system step error one line more knowledge article hint practical decisive following figure practice word that is work meeting meaning article time is in Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Linux Redmi Xiaomi Docker