Over on EC2 I am trying to setup AMI's for PLD-Linux that use the new features that allow running custom kernels from inside the AMI using PV-Grub. I've setup custom AMI's many times before but can't get the kernel thing to go.
Basically I have a ebs disk with a grub menu file and custom xenU kernel on it. Registering this and launching it as an instance starts pv-grub from the xen host and pv-grub finds my menu file and tries to boot the config found there. However no matter how I configure the grub menu items or the disc partitions, grub always throws error "Error 21: Selected disk does not exist".
I have tried many permutation of the following:
- Raw volume as disk with filesystem
- 1 partition on volume with filesystem in that
- hd0 and hd00 AKI's (hd0 finds the menu file for the raw disk version, hd00 for the one partition version)
- using no root command from the grub menu
- using root(hd0)
- using root(hd0,0)
- using various rootnoverify()'s
I am using ext3 in all cases. I have no system/device map files to get in the way. Any incorrect combination of partition layout and hd0/hd00 AKI's does lead to a different error, but if I use the right one and it finds the menu file, it invariably throws the error above.
What am I missing?
(Cross posted from EC2 Forum because no answer there, I will take care of making sure the solution is also cross posted)
This is embarrassing but after two days of bashing my head on this, I think I solved it myself.
My grub menu file had commands like
root(hd0,0)
instead ofroot (hd0,0)
. The space is essential, and all my attempts left it out! I found this out by discovering that leaving the root line off and specifying the full path likekernel (hd0,0)/boot/vmlinuz....
worked. The lack of space did not cause any kind of parsing error, but it seems to have just been ignored. As a result it really didn't matter what values I gave it, it was just going on defaults anyway, hence the same result with the line left out entirely.I still don't have a booting system, but I'm past the problem with grub now and onto kernel woes. Hopefully anybody else who runs into the same problem will find this solution helpful!