error: no such partition.
Entering rescue mode...
grub rescue >
This error probably due to one of the 2 cases:
- Case 1: Created disk partition in Windows.
- Case 2: GRUB damaged by some accidental actions like deleting the partition that contains grub bootloader.
In your case you are in Case 1. Just enter the commands in your rescue window one-by-one:
> ls
(output like (hd0),(hd0,msdos1),(hd0,msdos2))
> ls (hd0,msdos1)
(output like Unknown file system which means grub not found in the device. Retry with other partition. Follow next..)
> ls (hd0,msdos2)
(output like ext2 or ext3 . This is the drive where grub is found)
> set root=(hd0,msdos2)
> set prefix=(hd0,msdos2)/boot/grub
> insmod normal
normal
(You enter into a window that shows list of operating systems)
Then login to Ubuntu and enter the command:
sudo update-grub
Thats it. You are fixed. When you are in a dual boot you must not make disk partitions in Windows.