Windows overwrites grub and fixes grub.

Source: Internet
Author: User

Recently, my mind is getting hot. I want to test a newly burned XP disk and reload the XP on my computer. Maybe I want to restart my computer after installing XP. Linux (cenots) on the computer cannot enter. XP is enabled by default.

After searching some information on the Internet, we know that this is because grub was overwritten during the installation of XP. You need to re-install grub in Linux.

Steps:

1. Use Linux to install disks to enter the Rescure Mode Terminal

2. Use the fdisk-l command to find out which partition Linux is installed in.

2. Enter grub in the terminal

# Grub

# Grub> boot (hdx, Y) (Note: There is a space between boot and later)

# Grub> setup (hdx) (Note: There is a space between setup and the backend)

(Or:

# Grub> boot (sdax, Y) (Note: There is a space between boot and the backend)

# Grub> setup (sdax) (Note: There is a space between setup and the backend)

)

(Note: X indicates the hard disk. If you only have one hard disk, the values of X are 0, and the values of Y are the partitions of Linux/root, this can be found using fdisk)

 

Use fdisk-L to find all information, such

/Dev/sda6*1 3824 4327894823 + 7 Linux

.......

This indicates that sda6 indicates the sixth partition on the hard disk. But in grub, it starts from 0. Therefore, the Y value in grub should be 5 instead of 6.

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.