Problem: continually getting "grub rescue" with "unknown filesystem" at boot. Attempted update-grub (see below) and boot-repair (see below) to no avail.
History: I am attempting a transfer of the contents from a small drive with dual-boot to a larger drive. The original drive was composed of 3 primary partitions:
sda1 windows XP sda2 ubuntu 14.04.5 sda3 swap
My objective was to increase the windows partition size, and the ubuntu partition size. Doing this required moving the ubuntu partition.
Operations So Far: I dd'd directly from my old drive sda to the new drive sdb, shutdown, detached the original drive from the system leaving the new drive attached, rebooted to Live CD. The new drive is now sda. Using Live CD Gpartd, I first ONLY moved the swap partition sda3 to the end of the drive. I rebooted and verified that both Windows and Ubuntu booted successfully.
At this point, my drive looks like this:
sda1 windows sda2 ubuntu unallocated space sda3 swap
Next, with Live CD Gpartd, I moved the ubuntu partition (sda2) to the right and increased its size (it retained its UUID).
sda1 windows unallocated space sda2 ubuntu sda3 swap
In this state Ubuntu isnt bootable, but I tried anyway and got "grub rescue" with "unknown filesystem". Then I booted Live CD and performed the following:
sudo mount /dev/sda2 /mnt sudo mount --bind /dev /mnt/dev sudo mount --bind /sys /mnt/sys sudo mount --bind /proc /mnt/proc sudo chroot /mnt << verified /boot/grub contained grub.cfg, grubenv >> sudo update-grub << completed successfully >> exit sudo umount /mnt/dev sudo umount /mnt/sys sudo umount /mnt/proc sudo umount /mnt/ << reboot >>
Got "grub rescue" with "unknown filesystem". An "ls" showed expected partitions, but querying each returned "unknown filesystem".
I attempted boot-repair and my results are at: http://paste.ubuntu.com/24087678/
I also tried stepping over the newly moved and resized ubuntu partition with a clean ubuntu install on top of the ubuntu partition. As part of the install, I reformatted sda2 to ext4, kept the same swap partition. This also failed and booting returned "grub rescue" with "unknown filesystem".
When booting from Live CD or from my old drive, and inspecting the new drive, both the windows partition and ubuntu partition have coherent file systems and all files are present and readable.
I'm not using UEFI.
** Update ** Then I tried re-installing XP to sda1 in order to get the Windows bootloader. XP boot was successful. Then I dd'd my old sda1 to the new drive's sda1. Again XP boot was successful. I used GParted from a Live CD to increase sda1 by the adjacent unallocated space. XP boot was successful. Now my new drive layout is as desired but Ubuntu not bootable yet:
sda1 windows XP sda2 ubuntu 14.04.5 << not bootable -- only have XP bootloader >> sda3 swap
I installed Ubuntu 16.04.2 to sda2 and expected to get the dual-boot menu but again FAIL!!! Instead I get "grub rescue" with "unknown filesystem". In grub rescue, "ls" shows all expected partitions (including 2 other IDE drives I have attached).
(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos2) (hd1,msdos1) (hd2) (hd2,msdos1)
When I "ls" each one, it reports "Filesystem is unknown".
Thanks for the help.