grub rescue -> no such partition [duplicate]

Solution 1:

The grub rescue> prompt signifies that GRUB 2 has failed to find the grub folder, the grub.cfg file, and/or the associated modules. The rescue prompt is presented so the user can provide the path to the grub folder, load the necessary modules, and provide the proper boot commands. A common reason for the grub rescue> prompt is an incorrect path to the grub folder. Reasons for the prompt also include a failure to update GRUB 2 after certain system or partition operations, improper designation of the grubfolder location, missing linux or initrd.img symlinks in /, or a failed installation. To successfully boot from the grub rescue> prompt:

  1. The grubfolder must exist and contain the necessary GRUB 2 files and modules.
    2. The proper paths must be set via the set prefix command. Many GRUB 2 commands will not work until the correct path is set. If the path to the grubfolder (normally/boot/grub) is not correct, an unknown command or file not found message is likely.
  2. The necessary modules must be loaded. The kernel cannot be loaded until the 'linux' module is loaded.
  3. A Linux kernel and initrd.img must be located and loaded.

In your case the grub folder and grub.cfg is seems to be available but inaccessable because your OS's partition can't be mounted, as the corresponding module is not loaded or it is corrupted during resizing. For the module to load your grub should be completly loaded or prefix should be set. For that do the following:

  1. set prefix=(hdX,Y)/boot/grub
    Use the values determined earlier. Example: If the Ubuntu system is on sda5, enter: set prefix=(hd0,5)/boot/grub
    In your case it most probabily is (hd0,3)
  2. set root=(hdX,Y)
    Confirm the correct X,Y values and press ENTER. Example: If the Ubuntu system is on sda5, enter: set root=(hd0,5)
  3. insmod normal
    Load thenormal module.
    If the module loads there will be no message. If the module fails to load, try the full path: insmod (hdX,Y)/boot/grub/normal.mod
  4. normal Transition to the normal GRUB 2 mode with increased functionality. If the module loads there will be no message. If the module loads, HELP, TAB completion and command recall using the UP/DN keys should be available.
  5. set (Optional) Review the current settings.
  6. insmod linux Load the linux module. An error message usually means the path is incorrect.
  7. configfile /boot/grub/grub.cfg . This should load your configuration file that allow to boot all OSs.

Solution 2:

As stated elsewhere, the correct command is ls (hd0,1)/. Please try to see if that will list the contents of the file system.

To load your system manually in grub

If vmlinuz and initrd.img do not exist at (hd0,3)/, you have to specify their exact location to boot into linux. So, in grub (please adapt vmlinuz and kernel versions to your setup)>

set root=(hd0,3)
linux (hd0,3)/vmlinuz root=/dev/sda3 ro

or if (hd0,3)/vmlinuz does not exist:

linux (hd0,3)/boot/vmlinuz-2.6.32.25-generic root=/dev/sda3 ro

then

initrd (hd0,3)/boot/initrd.img 

or if (hd0,3)/initrd.img does not exist:

initrd (hd0,3)/boot/initrd.img-2.6.33-25-generic 
boot

More info can be found here.