Can't enter ubuntu solution after reloading Win7 system in notebook

  
                                     

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.

Copyright © Windows knowledge All Rights Reserved