After changing the disk partition, fix the grub startup and the disk partition grub.

Source: Internet
Author: User

After changing the disk partition, fix the grub startup and the disk partition grub.

In order to install Linux Through Hard Drive boot last weekend (see the previous article), we dedicated a 1 GB FAT32 partition. Return to Win7 today and use the disk management tool to undo and merge the partitions. After restarting the partition, it enters the grub rescue terminal and prompts:

Error: unknown filesystem
Grub rescue>

We found a solution from the Internet. Previously, before merging partitions, my Linux partitions were identified as/dev/sda8. In grub rescue, the values were hd0 and msdos8 by running the set command:

Grub rescue> set

Prefix = (hd0, msdos8)/boot/grub

Root = hd0, msdos8

After the partition is merged, the previous Linux partition becomes (hd0, msdos6) (by using the ls command in gurb rescue, from ls (hd0, msdos1) to ls (hd0, msdos6), and (hd0, msdos8) point to an NTFS logical partition, which is not recognized by grub. Therefore, you need to modify grub settings to direct prefix and root to (hd0, msdos6 ):

Grub rescue> set root = (hd0, msdos6)
Grub rescue> set prefix = (hd0, msdos6)/boot/grub
Grub rescue> insmod normal
Grub rescue> normal

Now we can see the grub startup interface again!

 

But it's not over yet. After entering the Linux system, refresh grub on the root terminal:

# Update-grub
# Grub-install/dev/sda

This gives us peace of mind. It's okay to restart it later.

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.