Linux_grub Boot Fix issues

Source: Internet
Author: User

@font-face {font-family: "Times New Roman";} @font-face {font-family: "Song Body";} P.msonormal {margin:0 0 0; text-align:justify; font-family: "Times New Roman"; font-size:14px;} P.P {margin:7px 0; text-align:left; font-family: "Times New Roman"; font-size:16px;} span.msoins {text-decoration:underline; color:blue;} Span.msodel {text-decoration:line-through; color:red;} Div. Section0 {page:section0;}

test Environment: Virtualbox+Ubuntu 15.10

software version: VirtualBox graphical User Interface

Version 5.0.12 r104815

Virtual machine Run release version:centos-6.7-i386

Time:$---

Test process: Simulated /boot/grub/grub.cfg file corruption, specific operation for delete/boot/grub/ Grub.cfg This file, and then reboot.

Solution: The following is a successful case, step 2 can not add enforcing=0 this option

1. root (hd0,0)

2. kernel/vmlinuz-2.6.32-573.e16.8686 ro root=/dev/dm-0 Quiet RHGB # rear add enforcing=0

3. inid/initramfs-2.6.32-573.e16.i686.img

4. Boot

a) explanation of the parameters in step 2

i. ro Mounts the partition as read-only mode

II. root=/dev/dm-0 is the location of the specified mount root directory, because I chose LVM when I installed the virtual machine system , so instead of the normal /dev/ Sda2(of course, if you are divided into/ boot partitions, this depends on the specific situation)

iii. quiet indicates that only important information is displayed, but still all, messages that resemble hardware self-test are not shown back

iv. rhgb redhat graghic boot, you will see the picture instead of the display file information during the startup process, which can be seen by DMESG After the system is started. Of course, you can also press ESC or the UP and DOWN ARROW keys at startup to view

RHGB = Redhat graphical boot-this is a GUI mode booting screens with mnost of information hidden while the user sees a RO Tating activity icon snipping and brief information as to the computer are doing.

Quiet = Hides the majority of boot messages before RHGB starts. These is supposed to make the common user more comfortable. They get alrmed about seeing the kernel and initializing messages, so they hide them for their comfort.

Detailed configuration is as follows:

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" height= "262" width= "554" alt= "Spacer.gif"/> Problems encountered in the test:

1. There was a problem configuring the kernel leader file and the root directory location, configuring the display Kernel panic-not syncing:attempted to kill init!

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "height=" 157 " Width= "554" alt= "spacer.gif"/> 

Solution: because of the previous backup, so the contents of the original Grub.cfg is viewed, the root of the original configuration file mount location is /dev/mapper/vg_server-logvol01 , so I'm in Grub the interface directly changes this path to root=/dev/mapper/vg_server_logvol01 Quiet RHGB , and then follow the previous, reboot will be no problem.

For example, here is the mount location of my root directory

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" height= "189" width= "554" alt= "Spacer.gif"/>

2.in the configurationkernel/vmlinuz-2.6.32-573.e16.8686 ro root=/dev/sda2Quiet RHGB,inid/initramfs-2.6.32-573.e16.i686.imgafterboot , restart prompt FATAL: Could not load/lib/moudles/2.6.32-573.12.1.316.i686 /moudles.dep:no such file no directory

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" height= "168" width= "554" alt= "Spacer.gif"/>

Solution: The above information can be guessed, because the kernel file corresponding to the driver file is not found, so the system load is not normal.

Since the upgrade kernel was not manually compiled, the file in my boot directory should have been generated when I executed yum update , but because of the forced abort of Yum the Run so Yum The resulting library file for the new kernel cannot be found, so the load is not successful.

Because I currently have a kernel version available on the system, so I edited the /boot/grub/grub.cfg file, the relevant new kernel inside the boot directly killed, and then the corresponding kernel files and the corresponding driver files deleted, You can start the system normally.

rm-f/boog/ vmlinuz-2.6.32-573. 12.1.E16. I 686

rm-rf/lib/modules/2.6.32-573.12.1.e16.i686/

/boot/grub/grub.cfg file modified to be able to

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" height= "172" width= "554" alt= "Spacer.gif"/>

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/themes/ Default/images/word.gif ") no-repeat center;border:1px solid #ddd;" height= "" width= "+ alt=" Spacer.gif "/> Special statement: To develop good habits, please back up the data you think important before the operation!!!

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/themes/ Default/images/word.gif ") no-repeat center;border:1px solid #ddd;" height= "" width= "+ alt=" Spacer.gif "/>


This article from "Frost and Ice to" blog, reproduced please contact the author!

Linux_grub Boot Fix issues

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.