Cannot install grub on a second disk in a PVM
I'm trying to build a bootable disk, from within a PVM, as some research into how I might recreate a VM from just file backups. That doesn't sound like a difficult thing to try to do, but I can't get grub to install onto the second disk. I don't know much about grub, yet, but I've been fooling with it for a few hours now, and Googling hasn't helped much.
Details:
I started from an OEL 6 template. Just to test feasiibility of making a bootable disk, here's what I did:
Added a second disk (/dev/xvdb) to the VM.
Partitioned it to match xvda, and marked partition 1 as bootable.
Made filesystems to match /boot and /.
Ran mkswap on the 3rd partition.
Copied all the files from /boot and / on xvda to the corresponding partitions on xvdb.
At this point, I think I'm about done, except for installing grub on it. After some research, I tried this:
# grub-install /dev/xvdb
/dev/xvdb does not have any corresponding BIOS drive.
I checked /boot/grub/device.map. It says:
# this device map was generated by anaconda
(hd0) /dev/xvda
I tried adding this line to device.map:
(hd1) /dev/xvdb
Then I got anothre error:
# grub-install /dev/xvdb
expr: non-numeric argument
expr: non-numeric argument
The file /boot/grub/stage1 not read correctly.
I tried simple things, like this:
# grub
Probing devices to guess BIOS drives. This may take a long time.
grub> root (hd0,0)
root (hd0,0)
Error 21รท: Selected disk does not exist
Am I making some silly mistake? What do I need to do to make this second disk bootable?