grub2 drops to "grub-rescue" with "unknown filesystem" error

hello,

we cloned a working boot disk image of opensuse 13.1 to another external drive using dd

we started the system with a rescue disk, and, in a chroot environment, ran the various configs & scripts to make the external disk bootable
(edited /boot/grub2/device.map ; changed /etc/default/grub and /etc/default/grub_installdevice ; ran grub2-install , grub2-makecfg, mkinitrd)

when we boot from the internal device, we get “unknown filesystem” and grub drops to the grub-rescue prompt.

> ls shows us the external device partitions (hd0,msdos1)…(hd0,msdos4) and the internal device partitions (hd1,msdos1)…(hd1,msdos3)

hd0,msdos2 and hd1,msdos2 are both btrfs filesystems

> ls (hd0,msdos2)/ gives us “unknown filesystem”

> ls (hd1,msdos1)/ gives us the root directory listing for that filesystem – SLES 11 (not the source image)

any suggestions on what’s going on here?
other cloning of this disk image have gone fine

the only obvious difference is that the external device is much larger than the source (3TB vs 500GB).

what is the root cause of “unknown filesystem” error, and what are possible steps to recover ?

if anyone has a step-by-step for cloning opensuse 13.1 disks that can be run on any system, that would be great!

thanks…

p

Hi,

I hit the very same problem today when I converted my openSUSE 13.1 system filesystem from ext4 to btrfs through btrfs-convert utility. (The filesystem conversion itself was completely OK, by the way.)

I solved the problem:

  1. login to rescue mode from the openSUSE installation CD

  2. mkdir ~/zzz

  3. mount /dev/sdXY ~/zzz # where /dev/sdXY is the system partition

  4. mount --bind /sys ~/zzz/sys

  5. mount --bind /run ~/zzz/run

  6. mount --bind /proc ~/zzz/proc

  7. mount --bind /dev ~/zzz/dev

  8. chroot ~/zzz

  9. yast bootloader # probably not necessary, I just hit OK button without changing anything

  10. grub2-mkconfig

  11. grub2-install /dev/sdX

  12. exit

  13. reboot

On 2014-09-06 21:46, Cohen wrote:
>
> Hi,
>
> I hit the very same problem today when I converted my openSUSE 13.1
> system filesystem from ext4 to btrfs through btrfs-convert utility. (The
> filesystem conversion itself was completely OK, by the way.)
>
> I solved the problem:
>
>
> - login to rescue mode from the openSUSE installation CD
> - mkdir ~/zzz
>
> - mount /dev/sdXY ~/zzz # where /dev/sdXY is the system partition
> - mount --bind /sys ~/zzz/sys
> - mount --bind /run ~/zzz/run
> - mount --bind /proc ~/zzz/proc
> - mount --bind /dev ~/zzz/dev
> - chroot ~/zzz

Here just run “mkinitrd” and reboot :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Well, I think I had tried that and that did not help. I am not sure about that, however.

On 2014-09-07 09:56, Cohen wrote:
>
> robin_listas;2663167 Wrote:

>> Here just run “mkinitrd” and reboot :slight_smile:
>>
>
> Well, I think I had tried that and that did not help. I am not sure
> about that, however.

It should work, because I have done several partition migrations, and
that’s the trick. Backup root, format, restore files, edit fstab, then
run mkinitrd so that the boot ram disk knows about the change.

It is possible, though, that you need to add some new kernel module to
the initial ram disk, that was not needed previously. mkinitrd should do
it, but if it doesn’t, you have to add the module to a list in a file in
sysconfig (I’d have to grep to find the one).

However.

I forgot some thing.

If GRUB was installed in that partition, then you have to reinstall grub
after the formatting, which typically should entail just running YaST as
you did.

In my cases, with a separate /boot partition, you do not need that.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)