Linux cannot be started normally. What should I do?

Source: Internet
Author: User
Linux cannot be started normally. What should I do? -- Linux general technology-Linux technology and application information. For details, refer to the following section. For Linux users, sooner or later they may encounter this problem at a certain stage: you are excited to explore your system, adjust, and optimize it to explore its maximum potential. Suddenly, omg, you find that the system cannot be started! If you are used to using Windows before, I bet that this is a regular problem, and the first thought you came out was to format and reinstall the system. For Linux, reinstalling the system is definitely the final choice. This should be considered only after all our other efforts are voided. I personally think that the only thing that can make people have to reinstall the system is that, unfortunately, you have knocked on the unfortunate command rm-rf/as a root /. Well, never imitate it! Although you can use "ctrl c" to terminate this damn suicide operation.

In Linux, when the system cannot be started, you may know where the error is and have a clear direction for fixing, such as adjusting the screen resolution or modifying a script. However, the key to the problem is to be able to start or access the Linux system to fix it. The following describes some emergency measures.

It should be thought of first, perhaps the simplest way, that is, when the boot loader-usually grub-starts execution, adjust the system running level through it. After the menu item appears, press the "e" button on the keyboard. In this way, the menu item displays one or more startup commands, locate the line about the kernel, and move the cursor over it, highlight this line, and then press "e". grub will open this line of content in a simple editor environment, so that we can make changes to it. So how can we change it? It's easy. Just tell the init program that we want to start it at that level. Add the "init X" parameter at the end of the kernel command line. X indicates the desired running level. For example, if you determine that the startup error may be caused by the graphics card driver or resolution, you can start it to the command line mode to fix it. Then, you should change the running level to the command line mode, if it is 4, the changed kernel command line should be similar to this.

/Boot/vmlinuz-2.6.17-11-generic root = UUID = 5cc79966-969d-4cd0-abb2-74a132efbd7c ro vga = 794 quiet splash init 4

In this way, the init program is told that I want to start at runtime level 4, rather than the default runtime level.

However, if you find that all the general running levels do not work, the startup will fail. What should you do? Don't worry, we can also enter a special single-user mode, that is, run level 1. By adding the command "init 1" or "init s", or directly adding "single", they all play the same role, that is, enabling the system to start in single-user mode.

What if none of these moves work? Are we just waiting? No. There is another option for you to use. We know that by default, the init program is executed when the kernel is started, but you can specify different programs for the kernel to execute, you only need to add the parameter "init =/some/program. "/Some/program" usually indicates shell programs such as/bin/bash or/bin/sh. Note that the equivalent symbol is used to tell the kernel that you should not start the init program, but to start any program specified after the waiting number. The command line is as follows:

/Boot/vmlinuz-2.6.17-11-generic root = UUID = 5cc79966-969d-4cd0-abb2-74a132efbd7c ro vga = 794 quiet splash init =/bin/bash

In this way, you can directly start the shell to analyze and fix errors.

If this is the case, it will not work ...... Okay, I think you have a problem! Then, take out the recovery cd, usually your installation cd, which allows you to choose whether to enter the rescue repair mode at startup. After entering this mode, he will automatically find the system installed on your hard disk and mount them to a temporary directory. In this way, you can modify the configuration file or perform other repair operations.

What if the problem persists? Congratulations! Back to the Windows age, please reinstall it honestly.

[ This post was last edited by anopup]
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.