Get the App
SLTechnology News&Howtos  ›  Servers  › 

The solution to the failure of linux to start

Shulou Source: shulou.com Published: 2022-06-02 23:17:13 09月22日 Update

This article will explain in detail the solutions that can not be started by linux. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

If you accidentally delete your linux or change a file so that linux cannot be started, the method of restarting linux is described below.

Method 1: linux enters single-user mode

Press e before the operating system starts to load the kernel, and if the option appears, select the first one until it appears as shown in the following figure:

Press the up and down arrow keys to select the second one named kernel. Then press e to show the following picture (you may be different but don't worry about it):

Directly add single or Linux single or 1 or S at the end

Press Enter to save, then press b to run

Method 2: rescue mode 1. If you have entered single-user mode, then the next method you can regard as entertainment. If you can't even enter single-user mode, the next step is to enter rescue mode 1 (and, of course, 2):

Then step 2 of method 1, where init=/bin/bash is added at the end

Then press Enter to save and b to run

At this point, you will find that the system has entered (if not, this method 2 is not suitable for you. Please skip it). If you enter, you will find that the system will be in read-only mode.

If your system was normally rebooted last time, then skip to step 5, which checks the system for fsck:

Fsck-a / dev/hdaX handles root partition X is the root partition number such as hda2

Fsck-R-A-a handles other partitions

If the system is read-only, that won't work, so mount the system as read-write:

Mount / proc

Mount /-o remount,rw

Swapon-an opens any swap partition

Source / etc/profile load user environment

After repairing the system, remount the system as ro, and you will be able to restart safely.

Mount /-o remount,ro

On the linux can not start the solution to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: System method mode step single user next following figure content that is article more end knowledge article processing rescue run good safe can not Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Tech Info Redmi OPPO Reno Docker