# Problem reading my drive...while partially booted from it?

## johnalexrob

After hearing about how Gentoo wasn't for beginners, I decided to try it. The first time, I made it through the whole install and it failed on rebooting, most likely my fault for misreading the guide. After a while (and a failed LFS install, can't I do anything right?), I decided to try it again. I installed it on my external hard drive and everything worked fine. Finally, I rebooted it for the first time in a virtual machine. It worked perfectly, except that it did not mount my filesystems automatically. that wasn't a problem, I knew  I had configured my fstab knowing it would be a second HD at sdb, not sda as it was handled in vbox. So I decide to boot it for real, and on booting, I received a kernel panic saying that it couldn't mount my VFS from the unknown partition I had passed it. It then listed all available partitions, none of which were on my external drive, but were on my internal drive. 

My confusion is this: GRUB handles my external drive as the main HD. The kernel, however, does not read any of my external drive's partitions (although it is located on one!). How can the kernel not recognize the partition it is on at all? It will still boot just as fine in vbox but not on its own. I know I compiled built-in support for my main partition type, so what's the problem? If the full panic is needed I can provide it, but from what I can tell, it seems like my kernel is refusing to read its own filesystem. How do I fix this?

----------

## DirtyHairy

The kernel is loaded into memory by grub, and until it mounts / and starts init, it runs from there. The device enumeration on your real system will be different from the virtual machine, and therefore, it fails. You'll have to make sure that the drivers for handling the external drive are compiled into the kernel and that you pass the correct root device to the kernel. Depending on the type of external drive, the kernel might need to wait a bit longer for the drive to be scanned before mounting /; in this case, you can use the "rootdelay" option.

----------

## johnalexrob

alright, I'll try that. I should have remembered that it was loaded into memory first.

----------

## johnalexrob

Thank you very much. That was exactly the problem. Now it boots just fine and I can say I finally got something to work on my computer.

----------

