Restoration of corrupted Linux Startup File grub. conf

Source: Internet
Author: User
Install Xen4.0 on the lab server and update the Linux kernel (the RHEL kernel version is 2.6.18-128. el5, and 2.6.31.8 is required for installation ). After the installation is complete, the startup file cannot be found at startup. It turns out that the startup boot file grub. conf has an error. I want to save the job in linuxrescue mode. However, I deleted the kernel of 2.6.18-128. el5 and failed to move the kernel in the new version. Busy for a day, early today

Start to install Xen 4.0 on the lab server and update the Linux kernel (the RHEL kernel version of the server is 2.6.18-128. el5, and 2.6.31.8 is required for installation ). After the installation is complete, the startup file cannot be found at startup. It turns out that the startup boot file grub. conf has an error. I want to save my work in linux rescue mode. However, I deleted the kernel of 2.6.18-128. el5, and the new version failed to get in again, so it was really troublesome. After a busy day, I tried to reinstall the system this morning and found an article, which was a great help. The steps are as follows:

Start with the RedHat installation cd, upgrade the system, and reinstall the kernel file;

Restart and restart cd. Select linux rescue;

# Chroot/mnt/sysimages;

Mount the partition device/dev/sda1 to/boot;

Run # grub-install/dev/sda under/sbin/to install grub (very important, this step was omitted yesterday );

Modify the/boot/grub. conf file;

Root (hd0, 0)
Kernel/vmlinuz-2.6.18-128.el5 ro root =/dev/VolGroup00/LogVol00 rhgb quiet
Initrd/initrd-2.6.18-128.e15.img
Boot

Re-add the volume label: # e2label/dev/sda1/boot (also critical)

Reboot, successfully enters the system.

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.