Use the installation disk to repair GRUB

Source: Internet
Author: User

I. problems to be solved in this solution:
We may clear GRUB or LILO from MBR when installing windows. If there is no system boot floppy disk, only the disk is installed, the solution is adopted. Another common method to recover MBR is to upgrade the system. This method has been verified and is extremely unreliable. After nearly 20 or 30 practices, we have proved that the effect is very small. This method is feasible if GRUB is not installed. If you have installed GRUB, and then re-installed Windows or other operating systems with LILO, resulting in the system being unable to boot normally, this method will become invalid. Therefore, this solution is most suitable for the restoration of GRUB.
Ii. Solution Process[RedHat 7.3 is used as an example]
1. Place the first disk to the optical drive, restart the machine, and use the optical drive to guide the system in BOIS.
2. After the installation interface is installed, press the [F4] key, that is, the linux rescue mode.
3. A series of keyboards and a few simple preparations, and then [continue... This process is simple.
4. Then such a character will appear
Sh #
5. Now we can operate GRUB... Haha... As long as you can see this, it will be a little KISS in the future, I just don't say, everyone can understand, everyone on Earth knows ....
Sh # grub
This character will appear
Grub>
We can enter
Grub> root (hdX, Y)
Grub> setup (hd0)
If it succeeds, there will be a successful ......
X here, if it is a disk, It is 0. If the root partition of the linux installation is on the second hard disk, X is 1; Y, is the root partition where the linux system is installed. Setup (hd0) is to write GRUB to the hard disk MBR.
Let me give you an example. If my hard disk is used as an example. I installed XP on the first hard disk and rh73on the hda9 on the first hard disk. I have two hard disks in total. If I lose GRUB, I can find it in this way. If you do not know the partition to which your linux is installed, that is to say, you do not know the number of Y, it does not matter. First enter root (hdX, and then use [TAB] to view, I understand it now...
The operation is as follows: [instructions for starting the instance above]
Sh # grub
The following words are displayed:
Grub>
Then, if I know that linux is installed on the first hard disk, but I don't know which partition to install, I can enter root (hd0, then use the [TAB] key to complete, and then you will understand.
Grub> root (hd0, 8)
Grub> setup (hd0)
Please read the article and the example carefully.
My first hard disk partition is like this ..
/Dev/hda1 primary partition NTFS
/Dev/hda2 extended partition
/Dev/hda5 NTFS
/Dev/hda6 FAT
/Dev/hda7 FAT
/Dev/hda8/boot ext3
/Dev/hda9/ext3
/Dev/hda10/swap ext3
The last step is to press the [RESET] key and restart it .... This step should be the simplest

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.