Created attachment 393572 [details, diff] Patch which fixes this. Install grub:0 (grub2 doesn't work well, or at all, with XenServer 6.2 PVM mode and their 'pygrub' thing) Manually setup device_map to include `(hd0) /dev/xvda` (this is the only way to bypass "BIOS drive does not exist" junk, as Xen domU in PV mode has no BIOS) Run `grub-install /dev/xvda` and it will throw a few expr errors and (falsely) accuse the stage1 file of being corrupt: ``` expr: non-integer argument expr: non-integer argument The file /boot/grub/stage1 not read correctly. ``` This is a lie and the included patch fixes the problem. The script simply doesn't look for the xvd[a-z] pattern and as such doesn't map the drive. Since, on XenServer in PV mode (and in HV mode with native drivers) your disks are all xvd* and none of the many others it looks for. Assuming upstream is sealed on such old software, but also noting that one of the main reasons for running the "ancient" grub is to run under XenServer, I think it would be nice if Gentoo included this hotfix for others in a similar jam (the error/solution was non-obvious, unlike the manual device_map workaround).
Does grub:2 work with XenServer any better now? IE, is it still worth adding this patch or should manual installation and workarounds just be expected?
1. using pygrub I'm almost certain you don't need grub-install since the MBR is not read in the first place; just use grub-mkconfig to generate the config for pygrub to read. 2. pygrub is obsolete now, just use pvgrub 2.