You are not logged in.

#1 2014-06-17 16:04:13

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 296
Website

Grub cannot find root disk on VirtualBox

I've built myself a custom boot image 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):

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

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:

# blkid

(nothing)

However, if I select grub boot option "fallback initramfs" it boots just fine. If I then say:

# 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:

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 ... that's the loop device used when creating the image)

So why would the fallback initframfs find it, but the default does not? Worse, why would blkid show nothing? Is there some way to debug this?

Last edited by jernst (2014-06-17 16:11:32)

Offline

Board footer

Powered by FluxBB