Grub cannot find root disk
Posted: 17. Jun 2014, 06:45
I've built myself a boot image of a variant of Arch Linux for writing to USB sticks. It uses grub with default values, and it works just fine when booting a physical box from USB.
Now I'm trying to use the same image with VirtualBox (on a Mac if that matters). First I convert it (still on Linux/Arch):
then I scp it to the Mac, and go through the GUI, selecting "Linux" / "Other Linux (64-bit)", and the .vmdk file as the root disk.
Grub comes up, shows me the right options, then screen blanks (as it is supposed to), thinks for a bit, and then I get some version of "cannot find root disk":
In that recovery shell:
(nothing)
However, if I select grub boot option "fallback initramfs" it boots just fine. If I then say:
which seems to tell me that the UUID it couldn't find is indeed there.
I tried GRUB_DISABLE_LINUX_UUID=true in /etc/default/grub when setting up grub, but then the message is:
(Can't fault it for that one I guess ...)
So why would the fallback initframfs find it, but the default does not. Worse, why would blkid show nothing?
Now I'm trying to use the same image with VirtualBox (on a Mac if that matters). First I convert it (still on Linux/Arch):
Code: Select all
VBoxManage convertfromraw foo.img foo.vmdk --format VMDK
Grub comes up, shows me the right options, then screen blanks (as it is supposed to), thinks for a bit, and then I get some version of "cannot find root disk":
Code: Select all
ERROR: device 'UUID=3d6ee...' not found. Skipping fsck.
ERROR: Unable to find root device 'UUID=3d6ee...'.
You are being dropped to a recovery shell.Code: Select all
# blkidHowever, if I select grub boot option "fallback initramfs" it boots just fine. If I then say:
Code: Select all
# blkid
/dev/sda1: UUID="3d6ee..." TYPE="ext4" PARTUUID="771...-01"
/dev/sda2: UUID="98234..." TYPE="ext4" PARTUUID="771...-02"I tried GRUB_DISABLE_LINUX_UUID=true in /etc/default/grub when setting up grub, but then the message is:
Code: Select all
ERROR: device '/dev/mapper/loop1p1' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/loop1p1'.So why would the fallback initframfs find it, but the default does not. Worse, why would blkid show nothing?