Want to say a few words to grub

Source: Internet
Author: User
I would like to say a few words to grub-general Linux technology-Linux technology and application information. The following is a detailed description. I want to say a few words to grub. It's not easy to love you. The computer suddenly cannot be started in the past few days and it stops at grub>. I 've also encountered this situation before. At that time, the system was reinstalled, well, reinstalling the system is very time-consuming. Besides, there are some useful information in the system. Therefore, you must not reinstall it. But I have no CD-Rom installed at hand. What can I do. When I had a bunch of friends online, I asked, and all the replies I got were vague. So the best way is to search for relevant information on the Internet. Some useful grub commands are also found. First, I declare that my computer is a dual system. At first, I found a way to access the system separately. The command is as follows:

1 to windows

Grub> root (hd0, 0) // note that there is a space between the command and the brackets. If you do not understand it, press the table key.

Grub> chainloader + 1

Grub> boot

2. Go to linux

Grub> root (hd0, table will display the relevant partition information, and I found the linux partition, because when you find the team, it will be said e2f .. File

Grub> root (hd0, 5)

Grub> the kernel/vmlintable key will automatically fill in the name

Grub> initrd/initrd-table

Grub> boot

The above two systems can be entered separately. However, I think it is troublesome to enter many commands in this way every time, So I continue searching on the Internet. Many of them say that the makebootable command can be used, but I have never succeeded. Then I found a setup command to install the grub file information to the hard disk startup information.

Grub> setup (hd0, 5) because I want to put it in the linux partition, in fact, I think setup (hd0) is also possible, because it is placed in mbr. The installation information of this command shows that the relevant file is found in step 1. Step 2: Execute the install command (you can find related information about the install command of grub to see how to use the parameters ).

In this way, grub> reboot restart will be OK.

I don't want to explain some related statements in the grub file one by one. There are a lot of online statements. I think, the most obscure point is that the partition numbers in windows and linux are different, some of which start from 0, but not windows.

Through this experience, at least I am not afraid of grub, and I will not reload it after seeing grub>. Hehe, another one is to prove the importance of standing on the shoulders of giants again.
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.