Use an installation disk in Linux to repair GRUB

Source: Internet
Author: User
Article Title: Install a disk in Linux to repair GRUB. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

I. problems to be solved in this solution:

We may installWINWhenGRUBOrLILOSlaveMBR. If there is no system boot floppy disk, only the disk is installed, the solution is adopted.

Common recoveryMBRAnother method is to upgrade the system. This method has been verified and is extremely unreliable. After nearly 20 or 30 practices, it is proved that the effect is very small. This method is used for no installation.GRUBIs feasible. IfGRUBInstall it, And then reinstall it.WINDOWOr other operating systems.LILOThis method becomes invalid because the system cannot be properly guided. Therefore, this solution is the most suitableGRUB.

Ii. Solution Process [RedHat 7.3For example]

1.Place the first disk to the optical drive and restart the machine.BOISThe system is guided by the optical drive.

2.After the installation interface is displayed, press [F4] Key, that isLinux rescueMode.

3.After a series of keyboards and several simple preparations, [continue... This process is simple.

4.Then such a character will appear

Sh #

5.We can operateGRUB... Haha... As long as this happens, it will be small in the future.KISSNo, I just don't Who 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 beSuccessful ......

HereXIf it is a disk, it is0IfLinuxThe root partition of is on the second hard disk.XYes1Now;YIs InstalledLinuxThe root partition of the system.Setup (hd0)IsGRUBWritten to the hard diskMBR.

Let me give you an example. If my hard disk is used as an example. I mounted the first hard disk.XP, In the first hard diskHda9InstalledRH73.I have two hard disks in total. IfGRUBIf it is lost, you can find it in this way. If you do not know yourLinuxWhich partition is installed on? That is to say, you do not know thisYIt doesn't matter. EnterRoot (hdXAnd then use[TAB]To view,I understand it....

The operation is as follows: [instructions for starting the instance above]

Sh # grub

The following words are displayed:

Grub>

Then,If I know myLinuxIt is mounted on the first hard disk, but I don't know which partition it is mounted.Root (hd0,Then use [TAB] Key to complete, and then you will understand.

[Code: 1: 3249bf 1c 31]

Grub> root (hd0, 8)

Grub> setup (hd0)

[/Code: 1: 3249bf 1c 31]

Please read the article and the example carefully.

My first hard disk partition is like this ..

/Dev/hda1Primary PartitionNTFS

/Dev/hda2Extended partition

/Dev/hda5 NTFS

/Dev/hda6 FAT

/Dev/hda7 FAT

/Dev/hda8/boot ext3

/Dev/hda9/ext3

/Dev/hda10/swap ext3

Finally, click [RESET] Key, restartOK.... This step should be the simplest... Haha ....

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.