1, first with LiveCD into the UBUNTU2, open the terminal, input: Fdisk-l to see their own Linux partition situation, I divided 4 areas, swap,boot,/,home, corresponding to the respective is:/dev/sda9 swap/dev/sda10 Boot/dev/sda11//dev/sda12 Home 3, start mount, root directory/and boot directory must be mounted well, as follows: #mount/dev/sda11/mnt#mount/ Dev/sda10/mnt/boot#mount/dev/sda12/mnt/home when the mount is not wrong, perform the following, and also the most critical: #grub-install--ROOT-DIRECTORY=/MNT/DEV/SDA (Note that this command has two minus bars in front of root)
After execution, you will be prompted: installation finished. No Error reported. The instructions are successful.
Because in rescue mode, only a small number of basic commands are available, a normal module must be loaded with certain actions before it enters normal mode.
The commands you can use in rescue mode are: Set,ls,insmod,root,prefix (set boot path)
First assume that the GRUB2 core file is in the (hd0,8) partition, and then look at how to enter the normal mode from the rescue mode (hd0,8) boot.
The search command is not available in rescue mode, and it is not clear which partition the Grub2 file is in and can be viewed with the LS command, such as
LS (hd0,8)/view (hd0,8) partition root directory to see if there is a boot folder
LS (hd0,8)/boot/view (hd0,8) partition's/boot directory file
LS (hd0,8)/boot/grub/view (hd0,8) partition/boot/grub directory file
With file viewing, you can determine which partition the GRUB2 core file is in, and then you can move from rescue to normal:
First LS look at the partition, according to the partition list, guess down/partition of the number again LS (hd0,x)/Look at the partition directory file to determine the Find/partition, not to continue to find. Found/partitioned (HD0,X) continue
Grub rescue>root= (HD0,X)
Grub Rescue>prefix=/boot/grub
Grub Rescue>set root= (hd0,x)
Grub Rescue>set prefix= (hd0,x)/boot/grub
Grub Rescue>insmod Normal
Rescue>normal--------> If a boot menu appears, press C to enter command line mode
Sh:grub>set root= (hd0,x)
Sh:grub>set prefix= (hd0,x)/boot/grub
Sh:grub>linux/boot/vmlinuz-xxx-xxx Root=/dev/sdax
Sh:grub>initrd/boot/initrd.img-xxx-xxx
Sh:grub>boot
Kernel version number-xxx-xxx You can press the TAB key to view and then manually complete the
Ubuntu option disappears after dual system reinstall Windows