1, first open the Win7 system command prompt window, and then enter the command sudo-i;
2, first find a ubuntu installed in that partition, with the command: The partial output of fdisk -l is as follows:
Device Boot Start End Blocks Id System
/dev/sda1 5 69443 14998528 83 Linux
/dev/sda2 69443 94825 5482496 82 Linux swap /Solaris
/dev/sda3 * 94825 95299 102400 7 HPFS/NTFS
/dev/sda4 95299 271531 38066176 7 HPFS/NTFS
My ubuntu10.04 The partition where the root directory is located is /dev/sda1. If you are not sure, look for the id of 83.
3, the root directory of the original system:
mount /dev/sda1 /mnt /dev/directory /mnt, of course, you can also choose other places.
Here to explain the directory, is to install the system is to select the root partition /resulting directory, for example, I installed the system is sda1
Enter mount /dev/sda1 /mnt here Put /dev/sda1 /mnt under
Here, if you install the system separately, you need to add another step
mount /dev/sda12 /mnt/boot .
sda12 is the partition where the boot is mounted separately when the system is installed.
4, grub-install --root-directory=/mnt /dev/sda
5 , you will see Installation finished.No Error Reported.
6, sudo init 6 Re-system, you can choose to enter the system, if you see the grub> command line, it may be your first Three-step selection of boot partition selection is wrong;
7, go to this step is ok, some users say that may not be able to enter Win7 system, also need the following steps:
sudo update-grub2 update Just grub2 will do.
Enter the password as prompted. If it goes well, a similar statement will appear, which means success.
Generating grub.cfg …
Found linux image: /boot/vmlinuz-2.6.32-22-generic-pae
Found initrd image: /boot/initrd .img-2.6.32-22-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda3
done
After setting up as above, you can enter ubuntu. If you reinstall the system and encounter the same problem, you can solve it by the above method.
First, enter my computer, then open a folder or enter a disk,
Windows 7 will accidentally delete the systems My Computer /Recycle Bin and other icons. How to get
1, how to clean Win7 automatic switch wallpaper function custom folder & mdash; & mdash; After a mo
I use Win8 system, I want to fix the application to the start screen now, how to fix the application
Win7 desktop icon is gone, how to do
Win7 Ultimate system screen how to set up not automatically lock screen
After Win7 sleep wakes up, the host is running on the screen and does not light black screen
Windows 7 is frequently dropped, not necessarily the fault of downloading
Win7 shared printer connected to XP computer
The perfect combination of powerful choice Wintel and then PC new wave
Sharing practical Windows7 comes with screenshots gadgets
5 reasons that affect the effect of Windows 7 to open Aero effect
Win7 32-bit and 64-bit difference
How to uninstall KB2952664/KB3035583 patch in Win7 system
Simple production of your Win10 exclusive avatar website with operating steps and website address
9 repair tips for forgetting passwords in Windows system (3)
How does the windows system delete the system extra boot items?
Creating a Picture Playlist with WMP
Win10 Anniversary 14393.577 Update Cumulative Patch KB3206632 BUG has been fixed
How to query the IP of Vista system
Vmware virtual machine and host sharing method
Win8.1 close uac dialog box does not close uac function method