Repair boot XP, Win7, Ubuntu after dual system reinstallation

Source: Internet
Author: User

This article is for a single hard disk host, divided into three steps.

The first step:

Using LiveCD or a U-disk to boot your computer into Ubuntu, it's best to make sure the system versions are the same.

Menu System-Administration->disk Utility See the Ubuntu root partition number, such as/dev/sda6.

"If the boot partition is hung independently, remember the partition number of the boot partition"

Using the shortcut key ctrl+alt+t to bring up the terminal,

Execute command:

Sudo-i
Mount/dev/sda6/mnt
Write down the result of the following command:
Uname-r
Execute command:

Grub-install--ROOT-DIRECTORY=/MNT/DEV/SDA
Restart your computer.

Step Two:

If the system is ubuntu9.10, a black screen shell input interface may appear after the system restarts:

Sh:grub>
At this point, perform the following command to view the partition, and the partition number where the boot is located:

Ls-l
Based on the results, the execution
Sh:grub> Root (hd0, 6)
Note: The above 6 is based on the specific situation to be seen.

Then execute:

Sh:grub> Linux/boot/vmlinuz-2.6.35-22-generic Root=/dev/sda6
Note: Here 2.6.35-22-generic is the execution result of the uname-r mentioned above.

Then execute:

Sh:grub> Initrd/boot/inttrd.img-2.6.35-22-generic
Execute the following command to enter the system:

sh:grub> Boot
If the system is ubuntu-10.10, the boot menu of the previous reload system can be seen at this time of reboot.

Select Ubuntu System to boot.


Step Three:

Using the shortcut key ctrl+alt+t to bring up the terminal,

Execute command:

sudo update-grub2

If it is a ubunt-9.10 system, then continue with the following instruction:

sudo grub-install/dev/sda

To this, the repair is complete.

[email protected]:~$ sudo update-grub[sudo] password for jason:generating grub.cfg ... Found Linux Image:/boot/vmlinuz-2.6.35-22-genericfound initrd Image:/boot/initrd.img-2.6.35-22-genericfound memtest86+ Image:/boot/memtest86+.binfound Windows 7 (loader) On/dev/sda1done


Repair boot XP, Win7, Ubuntu after dual system reinstallation

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.