In this article, the host is a single hard disk, three steps.
The first step:
Use LiveCD or U-disk to boot the computer into Ubuntu. It is best to ensure consistency between the two system version numbers.
Menu System--administration->disk Utility View the root partition number of Ubuntu, such as/dev/sda6.
"Assume that the boot partition is hung independently. Then remember the partition number of the boot partition "
Use the shortcut key ctrl+alt+t to bring up the terminal.
To run the command:
Sudo-i
Mount/dev/sda6/mnt
Write down the results of the following command:
Uname-r
To run the command:
Grub-install--ROOT-DIRECTORY=/MNT/DEV/SDA
Restart your computer.
Step Two:
Assuming that the system is ubuntu9.10, a black screen shell input interface may appear after the system restarts:
Sh:grub>
At this point, run the following command to view the partition, and understand the partition number where the boot is located:
Ls-l
According to the result, then run
Sh:grub> Root (hd0, 6)
Note: The above 6 is based on the details of the view obtained.
Then run:
Sh:grub> Linux/boot/vmlinuz-2.6.35-22-generic Root=/dev/sda6
Note: Here 2.6.35-22-generic is the result of the uname-r mentioned above.
Then run:
Sh:grub> Initrd/boot/inttrd.img-2.6.35-22-generic
Run the following command to enter the system:
sh:grub> Boot
Assumed to be a ubuntu-10.10 system. At this point, you will be able to see the boot menu once the reload system was restarted.
Select Ubuntu System to boot.
Step Three:
Using the shortcut key ctrl+alt+t to bring up the terminal,
To run the command:
sudo update-grub2
Assuming that the system is ubunt-9.10, then continue to run the following command:
sudo grub-install/dev/sda
Here, 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
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
Post-Installation repair guide again dual system XP, Win7, Ubuntu