How to fix GRUB in Ubuntu8.04

Source: Internet
Author: User
After Ubuntu8.04 and windowsxp are installed, they constitute a dual system and run well. in windows, I Format and merge an ext3 to fat32 partition with PM, and then shut down the partition. I was depressed when I started the system today and encountered another problem. (sometimes, if you don't solve the problem, it will follow you ~) : The GRUB boot cannot be started, and the error "error22." is displayed. I don't understand the meaning of this error either. But with the previous experience, I know that grub can be indirectly repaired by installing another system.

After Ubuntu8.04 and windows xp are installed, they constitute a dual system and run well. in windows, I Format and merge an ext3 to fat32 partition with PM, and then shut down the partition. I was depressed when I started the system today and encountered another problem. (sometimes, if you don't solve the problem, it will follow you ~) : The GRUB boot cannot be started, and the error "error22." is displayed. I don't understand the meaning of this error either. But with the previous experience, I know that installing another system will indirectly repair grub. but I don't want to be so troublesome. It's actually vomiting blood... so I checked it online and found that Baidu is so handsome. I have not tried all of the following methods on the Internet, but I have tried the first method and fixed my GRUB successfully. haha...

Several methods are similar:

1) Use Ubuntu8.04 live cd to enter the graphic interface and open the terminal

Run the following command:

$ Sudo su

$ Grub

Grub> boot (hdx, y)

Grub> setup (hdx)

/* Here I will explain: x represents the hard disk. If you only have one hard disk, it is usually the same, then fill in x 0 and y is the partition where your Ubuntu system/root is located, if you do not know which partition */

/* You can replace it with the Tab key, and then it will be displayed. Enter the correct value. The following x value is equal to the x value .*/

2) Start With Ubuntu8.04 livecd, enter the desktop system, and enter

Grub update

Enter the grub command line and enter

Root (hd0, x)

Setup (hd0)

Hd0 refers to the first hard disk (no serial port SATA or parallel port PATA). x is the Partition Number of the linux main directory "/". The serial number starts from 0, 1 is smaller than the partition number displayed in linux. For example, if the hard disk partition number is hda5 in linux, x is 4. The partition number can be used in the menu. If you do not know the number of disks, try it one by one. When grub prompts that the partition format is ex2fs. Note that root (hd0, x) must have spaces behind root. The root command specifies the boot partition, And the setup command writes the boot information to the hard disk MBR.

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.