RHEL5 damaged GRUB repair

Source: Internet
Author: User
I keep saying that I have never been to the new data center. This is unfortunate enough. I just went there for two trips. The pipe vulnerability was tested last night and found that the kernel that was last upgraded did not fix the vulnerability. If you are in a hurry, you can upgrade from 2.6.18-128.7.1 to 2.6.18-164.6.1. as a result, the machine cannot be restarted. When people are unlucky, it is often a series of accidents.

I keep saying that I have never been to the new data center. This is unfortunate enough. I just went there for two trips. The pipe vulnerability was tested last night and found that the kernel that was last upgraded did not fix the vulnerability. If you are in a hurry, you can upgrade from 2.6.18-128.7.1 to 2.6.18-164.6.1. as a result, the machine cannot be restarted. When people are unlucky, they often encounter a series of accidents. in addition to this test last night, one redhat9.0 and one RHEL3 were killed. I thought it would be okay to directly go to the data center, that is, to select the old Kernel. (the timeout of grub. conf was changed to 10 before the upgrade, which is usually 0 ). If I didn't bring anything, I went directly to the data center. when I went there, I was dumbfounded. It was found that the machine started directly and died on GRUB. the screen only had four characters, and there was no "> prompt". I didn't select the kernel yet. I had to go home and go to bed first, by the way, we have an ISO 5.4 dial. we are going to update it by the way today. Later, we thought it would be that after RHEL5.2 directly updated to the latest kernel of update 5.4, GRUB was updated. It may have crossed some system version issues. I didn't seem to have updated GRUB in the last update from 5 to 5.2.

Today, GRUB was fixed first, and the result was not smooth. it was very depressing to be stuck on the USB drive. I always thought that the SCSI or SATA driver was a problem. later I found that the data on the two hard disks was fully read. I suddenly thought it was a problem with the USB driver, because I used to directly install the optical drive on the IDE interface of the motherboard, this time we use USB, so we can choose the USB driver to continue. The following describes how to fix GRUB.

1. first, put the RHEL5.4 drive in the optical drive, and change BOIS to start from the USB drive;
2. when "boot:" appears in the last line on the installation interface, enter "linux rescue" and press enter to enter the repair mode. after the SCSI and SATA drivers are loaded;
3. the Select language dialog box appears. English is selected by default, and press enter;
4. in the dialog box that appears, select the default "us" and press enter;
5. because I have less USB flash drive (that is, the driver has been stuck here for a long time), I will select the driver loading address and select Local CDROM, then select the select driver to find the usb-storage from the list. Next step after loading;
6. in the next dialog box, select whether to attach the network interface and press "NO;
7. the following dialog box appears: "Continue", "Read-only", and "Skip". select the default "Continue" and press enter. This is the system that loads the local hard disk. it must not be read-only or skipped; otherwise, we will fix it;
8. in the last OK dialog box, press enter;
9. when the "sh-3.2 #" prompt appears, the repair mode is enabled;
10. enter chroot/mnt/sysimage and press enter chroot to the hard drive system;
11. run The grub-install/dev/sda command to fix GRUB. if a prompt is displayed, the GRUB has been fixed and the system can be restarted.

 

After the fix is OK, update to 5.4 again, select the GRUB update option, and reinstall it to inspire the existing GRUB. However, this is the GRUB> prompt, and the GRUB is started, enter
Root hd (0, 0)
Setup (hd0)
The two commands are as follows:

 


The installation is complete. this is strange. it should be because there are too many cross-version exceptions. Press ctrl + alt + del to restart the system. This time, we upgraded the kernel from 2.6.18-164 (or the pipe vulnerability was not supplemented) to the new 2.6.18-164.6.1 kernel, so there was no exception.

 

This Bo original, such as Reprint please indicate the source: http://blog.vfocus.net, thank you

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.