Loss of content in boot directory causes system to fail to start

Source: Internet
Author: User

Boot loss of content in directory causes system to fail to start

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/89/39/wKiom1gM5xSQ8cDTAAAqG5XhNMQ639.jpg-wh_500x0-wm_3 -wmp_4-s_3946263025.jpg "title=" centos.jpg "style=" FLOAT:RIGHT;WIDTH:100PX;HEIGHT:27PX; "Width=" height= "27" Border= "0" hspace= "0" vspace= "0" alt= "wkiom1gm5xsq8cdtaaaqg5xhnmq639.jpg-wh_50"/>

my friend recently in a learning process inadvertently will be in the virtual machine boot directory content loss, resulting in the system can not start. Of course, he did not know that this is the case, just should be inexplicable popup box error all caused the system to fail to start. Since then friends will tell the author of this fault, the author itself is actually small white just learn Linux, but to these strange sense of fault is very interested, so I fell into the pit for a few hours to 2 o'clock in the morning only to get out the point of the figure. In order to let more learning Linux small white trample pit, the author will fault processing process to write to hope and the next small white to tread less. No offense, everybody.  

1. Cause of accident

    1. One day my friend told me that Linux in the virtual machine could not be started, for unknown reasons. Friends tell inexplicable mistakes do not know what happened.

2. Failure results

    1. 650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/89/37/wKioL1gM43nBmgLwAAA0Q3j4IWE683.jpg-wh_500x0-wm_3 -wmp_4-s_2898989571.jpg "title=" qq20161022150208.jpg "alt=" Wkiol1gm43nbmglwaaa0q3j4iwe683.jpg-wh_50 "/>

    2. Boot fails to start and the Grub interface fails to enter the wrong system.

3, the fault treatment process.

    1. When I see the screen after the Google search problem finally try to try to manually try to boot, unfortunately found that the kernel file is not found at all, so suspect that the kernel file is missing.

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/89/37/wKioL1gM49aC2lMUAAA4qTkmJfw327.jpg-wh_500x0-wm_3 -wmp_4-s_801387178.jpg "title=" qq20161024002223.jpg "alt=" Wkiol1gm49ac2lmuaaa4qtkmjfw327.jpg-wh_50 "/>

b) Now that we've found the problem, we're going to get it. So I'm going to go to rescue mode and see what dead end. The third thing is to get into the rescue mode. Don't tell me you don't know.

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/89/37/wKioL1gM5AzDK4uQAABkN_b2mX0686.jpg-wh_500x0-wm_3 -wmp_4-s_3674977970.jpg "title=" qq20161022150300.jpg "alt=" Wkiol1gm5azdk4uqaabkn_b2mx0686.jpg-wh_50 "/>

c) I was originally on the process of entering the rescue mode, but think or not posted up first I admit that I am a little lazy. Second, everyone is free to try to learn something. Or the words do not understand the place to do it a little bit to know. Is the way to get into the rescue mode.

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/89/39/wKiom1gM4-ziYZP7AABRtVhzOn0018.jpg-wh_500x0-wm_3 -wmp_4-s_3446037691.jpg "title=" qq20161022150657.jpg "alt=" Wkiom1gm4-ziyzp7aabrtvhzon0018.jpg-wh_50 "/>

D) I am ready to start with the rescue mode. The first execution of the cd/mnt/sysimage (the general meaning of this command is to switch to the root partition of the hard disk, do not know you know Google)

Cd/boot look at me to go to unexpectedly there is nothing ......... .....

Well, back to the chase, since everything in the boot directory has been lost, there's nothing to say.

Unload the original kernel directly, although there's nothing left to do. I'll try this one. (Note: If you have this problem in the production environment, you have to think about it. Because the author's fault handling process is in the virtual machine, specific in the actual environment what problems in the next do not know, So you have to weigh it yourself. )

650) this.width=650; "Src=" http://s1.51cto.com/wyfs02/M02/89/39/wKiom1gM5HXAjhMvAACHnuWKNII354.png-wh_5 00x0-wm_3-wmp_4-s_2006396817.png "title=" 1.png "alt=" Wkiom1gm5hxajhmvaachnuwknii354.png-wh_50 "/>

View the RPM packages that have been installed about kernel. Then execute rpm–e kernel--nodeps

(If the execution is unsuccessful, rpm-ekernel-2.6.32-642.el6.x86_64)

e) ok ok so let's start with the next step

First Mkdir/mnt/dvd Create a mount point

Mount/dev/sr0/mnt/dvd

Then execute rpm–ivh/mnt/dvd/packages/kernel-2.6.32-642.x86_64

(If the small partners in the previous step of the kernel all about the RPM is removed, then execute the Yum install kernel*-y if you do not know how to use the configuration yum or Google itself. )

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/89/37/wKioL1gM5KSTugaAAADbeiJ_QUg353.png-wh_500x0-wm_3 -wmp_4-s_1138455457.png "title=" 2.png "alt=" Wkiol1gm5kstugaaaadbeij_qug353.png-wh_50 "/>

Ok See the picture everybody knows the file under boot is already there if you don't understand it's okay just know that there's something.

f) The next step is to get to the point where grub is something that can be understood as a boot file.

GRUB-INSTALL/DEV/SDA to execute this command (I don't know the picture.) )

650) this.width=650; "Src=" http://s1.51cto.com/wyfs02/M02/89/39/wKiom1gM5PSBY_B3AADwD8VMNAc299.png-wh_5 00x0-wm_3-wmp_4-s_2931091874.png "title=" 8.png "alt=" wkiom1gm5psby_b3aadwd8vmnac299.png-wh_50 "/>

g) Now is the most important step is to manually write a configuration file grub.conf

Vim grub.conf (remember to write in the/boot/grub directory. and root= back to the content of their own df-ht look at their names are different. )

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/89/39/wKiom1gM5Qrh2MUBAAAxuhCh6BE537.png-wh_500x0-wm_3 -wmp_4-s_459517442.png "title=" 4.png "width=" "height=" 107 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px; height:107px; "alt=" Wkiom1gm5qrh2mubaaaxuhch6be537.png-wh_50 "/>

OK after you finish writing this thing. Just a reboot. (If there is any problem in the again, suggest that you do more to understand it slowly)

And finally a little bit more important almost forgot to write if you encounter this problem in the start-up, we recommend that you will be in the rescue mode to modify the/etc/sysconfig/selinux will be fine.

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/89/37/wKioL1gM5Z-Tap0NAACjfHtfW0k129.png-wh_500x0-wm_3 -wmp_4-s_1909157300.png "title=" 5.png "alt=" Wkiol1gm5z-tap0naacjfhtfw0k129.png-wh_50 "/>

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/39/wKiom1gM5Z_ByjRMAABDw8yvh6g565.png-wh_500x0-wm_3 -wmp_4-s_3510976129.png "title=" 6.png "alt=" Wkiom1gm5z_byjrmaabdw8yvh6g565.png-wh_50 "/>

Change the selinux=disabled will not appear in the situation.

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/89/37/wKioL1gM5c7AKwDzAAAsHsfwSz0959.jpg-wh_500x0-wm_3 -wmp_4-s_94897427.jpg "title=" qq20161024003059.jpg "alt=" Wkiol1gm5c7akwdzaaashsfwsz0959.jpg-wh_50 "/>

Well, the problem has been solved. If this happens to your system, take a look at the above method. (If you have a problem, make it a little bit.) I once again hope to be able to study Linux together with the home to progress, what problems may be studied together.

Because the time problem typesetting is not good, we forgive back to have time to change.


This article is from the "Fall" blog, please be sure to keep this source http://lxlxlx.blog.51cto.com/3363989/1864847

Loss of content in boot directory causes system to fail to start

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.