Page 1 of 1

Grub cannot find root disk

Posted: 17. Jun 2014, 06:45
by jernst
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):

Code: Select all

VBoxManage convertfromraw foo.img foo.vmdk --format VMDK
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":

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.
In that recovery shell:

Code: Select all

# blkid
(nothing)

However, 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"
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:

Code: Select all

ERROR: device '/dev/mapper/loop1p1' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/loop1p1'.
(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?

Re: Grub cannot find root disk

Posted: 30. Jul 2014, 00:08
by jernst
This response on superuser.com explains why:

http://superuser.com/questions/770152/g ... virtualbox