On Fri, Oct 8, 2010 at 9:34 AM, lee <[email protected]> wrote: > On Fri, Oct 08, 2010 at 10:30:23AM -0500, Chris Weber wrote: >> >> Now I can boot from /dev/sdd, but the kernel panics because it can't >> >> mount the root filesystem (/dev/md0p2). Entries in /etc/fstab on md0p2 >> >> are correct. I take it the md-devices aren't up/accessible in time. >> >> >> >> Any idea what's missing? Like there's no RAID support in grub? >> >> >> >> _______________________________________________ >> >> Help-grub mailing list >> >> [email protected] >> >> http://lists.gnu.org/mailman/listinfo/help-grub >> >> >> > >> > Have you made a new initrd that has md and/or raid support? I ran >> >> I'm guessing that you might need an extra module for raid support and >> maybe some extra lines in init, but maybe this will help get you >> started. > > All that's needed for booting is compiled into the kernel, I'm not > using initrd at all. Not using initrd makes things a lot easier ... > > The question probably is why the kernel doesn't seem to know about the > RAID devices. If I understand things correctly, those might be started > only after the root partition has been mounted. If that is true, > having the root partition on a software RAID device would be generally > impossible --- unless grub (or whatever else) does something to make > them available to the kernel so that the root partition can be > mounted. > > Now I can speculate that when having a root partition on a software > RAID device that is not partitioned, the boot process is cheating in > that the kernel first mounts the root partition from one of the > physical disks the RAID device is made from and later somehow changes > to the actual RAID device. That might explain why it's not possible to > boot from a RAID5. > > Does anyone know how this works? > > There have been Debian installers that asked the user who created RAID > devices during the installation which devices would have to be brought > up at boot time. Recent installers don't seem to ask that > anymore. This leads to wondering why the partition type "raid > autodetect" is deprecated and wheather it is nevertheless required > when the root partition is on a RAID device or not. > > In any case, before the root partition is mounted, > /etc/mdadm/mdadm.conf cannot be read. So how can the software RAID > devices be brought up before the root partition is mounted? > > How does one tell grub to bring up the software RAID devices? It seems > that the modules "raid" and "mdraid" are required, and I've put them > into the grub.cnf. Perhaps I also need to put some information into > grub.cnf about what physical devices/partitions to use to bring up the > RAID devices. But how do I do that? > > _______________________________________________ > Help-grub mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-grub >
If you're doing root off of software raid under Linux one of two things is happening: Thing 1: Kernel + initrd; md can be module or compiled in; some method for adding devices to raid arrays (I typically pull in a full mdadm for my custom initrds, but more minimal options exist that don't provide as many disaster recovery tools). Part of the pre-root environment will setup the basic system devices and then transfer control to them when the initrd/initramfs is complete. Thing 2: Older deprecated; using md 0.90 labels in kernel (not as module) auto assembly. _______________________________________________ Help-grub mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-grub
