gentoo grub cant resolve root using raid1
Hi Guys.
Trying to setup a new system on Raid 1. I followed the handbook and This site and now I cant boot the system. I get the error unable to resolve root: UUID XXX The install works as I rsynced it onto a spare HDD with a ext4 partition, plugged it into sda slot (removed other), reconfigured grub and other configs and it boots fine. I am using Grub2 boot loader following instructions from the handbook Quote:
Here are some of my configs (or useful bits) /etc/mdadm.conf Quote:
/etc/fstab Quote:
Quote:
If I change the grub config from UUID to /dev/md0, I get the same results. Any help would be great. Danny |
Are you using grub2 or grub legacy? For grub legacy the line should be
Code:
kernel /vmlinuz-3.18.7-gentoo root=UUID=23b7cbb0-a3c5-4e85-89dd-23e6b9e1c637 ro |
Grub2.
I just followed the handbook which now uses grub2 (which I've never used before). I may have to downgrade grub and try what you said. |
the post you mention is for legacy grub, maybe these will help for grub2. I know they are for other distros, but they may help.
https://ritter.vg/blog-grub2_raid_boot.html https://bbs.archlinux.org/viewtopic.php?id=160322 http://www.howtoforge.com/how-to-set...n-ubuntu-10.04 |
Thanks for the help. Happy to reply that I got it working after many many hours trial and error taking suggestions from those listed links.
In the end I think I needed grub2 emerged with -device-mapper use flag and also the auto config from grub wasn't picking the right UUID. When I manually changed it to what was in mdadm.conf, it booted fine. |
May have spoken too soon
Now during the boot process I can see an error Quote:
Now the operating system loads and works ok but the command cat /proc/mdstat returns Quote:
It seems to be running off an array but isn't aware of it. I think grub must be still missing something. |
Quote:
Quote:
|
Strange that the system will pick up raid devices from other disk if I put them in. Or if I boot the system from a live cd, then mount the md0, it works fine.
My brain is hurting too much now. I'll look at tomorrow after work. May still even give up on grub2 and go back to legacy. |
I have spent so many hours trying to figure this out with no luck
I went back over my kernel config and made sure all drivers for raid were in the kernel. Still no luck so I removed grub2 and went grub legacy. Following above instructions, it boots with the same issues eg. cant find md0 but the operating system still works. I followed these tutorials a few years ago on another machine and it worked great. I cant figure out what I am doing different. I'm running kernel 3.18. I may have to try downgrading to a lower version. |
Bit of an update for anyone interested.
I copied a kernel from another machine I setup a few years ago to this machine (/usr/src/linux-3.3.8) including its config and recompiled it on the new machine. This kernel boots up fine (with no initrd) and everything works fine. (using root=/dev/md0) I tried booting one of the newer kernels (3.18.7) with no initrd and it wont boot. My question is what has changed since 3.3.8 that makes raid behave so differently. |
Config_md_autodetect ?
|
CONFIG_MD_AUTODETECT=y
|
2 Attachment(s)
Not sure what I have done but I copied the .config from the working 3.3.8 kernel to the new 3.18.7 and re rolled the kernel.
Works great with no initrd and root=/dev/md0 /proc/mdstat and mdadm --detail both show working raid arrays. I have attached the working config and non-working config. If anyone can see the difference that stops it booting from raid, I would love to have it pointed out to me for the future. |
All times are GMT -5. The time now is 05:16 PM. |