I'm using Gentoo on my HomeServer. My HDDs are raid1 mirrored with mdadm.
My problem is how to boot the /boot partition correct?
/dev/md1 consists of /dev/sdc2 & /dev/sdd2 mounted on /boot
In my grub.cfg I have the uuid of /dev/md1 but at boot time the array is of course not ready.
simplest way would be to un-raid the /boot partitions, but that is not what I want to do.
so, how do i find out the UUID of the raid members? ls -l /dev/disk/by-uuid only shows me the uuid of /dev/md1.
And when I unraid the disks, I cannot mount them to get their UUID mount: unknown filesystem type 'linux_raid_member'
so how can I let Grub2 boot those disks, will it be able to determine the contents before they are in raid? (they are in fact ext2).
I should maybe add that I use gpt partition tables, therefore I have a small partition /dev/sdc1 and /dev/sdd1 on both drives to host the bios_grub partition. those are not raided atm.
As pointed out in the comments below Gilles' answer my problem persists. Grub won't find the device, telling me
error: no such device: 9f81a-(device uuid)-5580.
entering rescue mode...
grub rescue>
afterwards I added the lines
insmod part_msdos
insmod part_gpt
insmod raid
insmod mdraid
to my grub.cfg, just above the line where root is defined root='(md0)'
I still get the same error.
I did some more research and i really guess its an error related to the uuids:
# grub-probe -d --target=fs_uuid /dev/md1
9f81a35d-0813-481f-9ae0-e4fba57c5580
# blkid
/dev/sdc2: UUID="11adb545-0e80-61d1-61f6-565f18e8c3f0" UUID_SUB="88826c5e-d12b-307d-6e54-556d1ebb2458" LABEL="livecd:1" TYPE="linux_raid_member"
/dev/sdd2: UUID="11adb545-0e80-61d1-61f6-565f18e8c3f0" UUID_SUB="15150fb2-5066-edba-d39b-08b63219453c" LABEL="livecd:1" TYPE="linux_raid_member"
/dev/md1: UUID="9f81a35d-0813-481f-9ae0-e4fba57c5580" TYPE="ext2"
(I cut away the other drives here)
as you can see both partitions have the same UUID, so I edited the UUID of the drives in my grub.cfg and did grub-install /dev/sdx again, but I still get the error with the "old" /dev/md1 UUID.