menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os {
insmod gzio
insmod raid
insmod mdraid1x
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(mduuid/e165b8a7ac19f29e8800e7b4f7fb3a5c)'
search --no-floppy --fs-uuid --set=root 5871e838-3d53-47a6-8ec8-6edeb6998faf
linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=5871e838-3d53-47a6-8ec8-6edeb6998faf ro quiet
initrd /boot/initrd.img-3.2.0-4-amd64
}
The mduuid can be found in "/dev/disk/by-id/md-uuid-" (in this file delete the ":" of mduuid's) The UUID can be found in "/dev/disk/by-uuid/"
In order to set up grub2, i used chroot as follow (the copy must allready have been done):
mount -t proc none /mnt/md0/proc
mount -o bind /dev /mnt/md0/dev
mount -o bind /sys /mnt/md0/sys
chroot /mnt/md0
grub2-install /dev/sda
grub2-install /dev/sdb