So the problem is, grub is likely to assume that because /boot is on /dev/md0 and (hd0) is indicated as /dev/md0 in device.map that the MBR should go on /dev/md0, and then you see an error message because /dev/md0 does not have an MBR. The good news, is that is the the original MBR and bootstrap are still on your bios boot device (probably /dev/sda), which is why your system boots. This lower-level boot-strap code changes rarely, so it is not a huge problem if it is not updated. You may just have to live with this error message, however, there are a couple things you could try/check:
- make sure you don't have another boot partition on the bios boot device, that you simply cannot see, because it is not mounted. This could happen if your /etc/fstab was missing an entry for /boot
- it would show up as an ext2 or ext4 partition, probably less that 500MB.
- rename device.map because grub2 does not really need it and it might be providing mis-information to the post-install script and/or grub-install.
- then, run grub-install /dev/sdX (where sdX is your actual bios boot device).
This will update the MBR and bootstrap code on that device, in case it is out-of-date.
- if that doesn't work, you could do: grub-install --boot-directory=/boot /dev/sdX
You configuration is a little odd, but should be supported ok in grub2. In the end, you may just have to live with the error message and run grub-install manually once a year.