Page 1 of 1

grub sees disk, but initrd does not...

Posted: 7. May 2013, 00:00
by danb
This is very likely more a linux question, but I'm hoping someone around here can set me straight..

I have a system I'm working with that boots to linux on live hardware using an initrd. I'm trying to simulate this under VB.

I'm at a point where I can see grub happily loading the initrd and starting the whole boot sequence, but when the initrd want's to access the /dev/sda1 device (which is where grub and the initrd are stored), it gets a failure ("device not found"). I can drop to a shell in my initrd and can clearly see /dev entries for the disk in question, but any access fails.

I strongly suspect that my initrd is missing something important, but am at a loss as it works on physical hardware....

The real hardware uses a SAS interface for the disk and I've configured my VB with that (to no avail). I've also tried several other variants (IDE, SCSI) just to try something really.

Does any of this sound familiar to someone? Thanks.

dan

Re: grub sees disk, but initrd does not...

Posted: 7. May 2013, 11:47
by mpack
We can't know if "sda1" is a valid designation for a VM drive unless we know the VM recipe. Please read Minimum information needed for assistance, and it may help to also include the VMs .vbox file in the zipped attachment.

Re: grub sees disk, but initrd does not...

Posted: 7. May 2013, 14:08
by danb
Sorry, first post. Should have realized..

Here's the info:
* VB rev is 4.2.12, guest additions not installed
* Host is an i7 w/32Gig running Win7 64 bit
* Guest is a WindRiver linux distro assigned 2Gig and a 32Gig SAS disk on port 0

Log follows.

Re: grub sees disk, but initrd does not...

Posted: 7. May 2013, 17:09
by mpack
I see no obvious problem in the log, I see one drive only and since grub sees it I don't see how any VirtualBox problem could explain what you see. I'm no expert on Linux and initrd, so someone else would have to help you with those.

Re: grub sees disk, but initrd does not...

Posted: 7. May 2013, 20:18
by danb
mpack, thanks for checking back in. I have made progress and in the (very small) likelihood that someone runs into this here is what I found.

I initially tried this using IDE interfaces for the disk. I had an existing disk as the IDE master and added my project disk as an IDE slave. When I was done editing the project disk, I restarted the VM with just the project disk attached; however it was still marked IDE slave. It seems that both VB and grub are forgiving and allowed me to boot and even load linux. As soon as linux got around to looking for IDE drives, it did not find a master and likely gave up looking any further.

I later tried moving to a SAS interface and (somewhat oddly) found that when I tried to access the device for a fsck (fsck /dev/sda1), I received an error ("no such device or address" -- same as the IDE case above). Yet, I later found I could still successfully mount the device. I don't have any explanation for that, but it doesn't yet seem to affect function and I can happily ignore an extra message.

Bottom line: make sure you have an IDE master and verify error messages as they may not truly indicate an error.