On Sun, 2006-03-26 at 12:56, Jack Howarth wrote: > As I mentioned before, I have succesfully created matching md partitions > on a second hard drive (hde) and populated them using tar with the contents > of the first (hda) drive. > > https://www.redhat.com/archives/fedora-list/2006-March/msg04521.html > > However I am having problems booting off the md partitions using the grub > booter installed on the hda partition using the approach commonly given > of adding two entries in the front of grub.conf to boot to /dev/md2 > which is the new root partition on hde. > I am wondering if I would be better off attempting to boot from the > linux rescue disk and, while chrooted in /mnt/sysimage for the hde > drives md partitions, reinstall the current kernel rpm. It seems to me > that in such a state, rpm should think the root partition is a md > partition and properly configure the created initrd.img for booting off > of it. The question I have is what does the linux rescue cd do if it > finds two different drives if linux installations on the machine? The > hde drive doesn't have a grub setup on it yet so I am concerned that > if both drive are available, the linux rescue cd will mount the partitions > on the hda one and not the hde one unless I detach the hda drive. > I am also still a bit confused about what grub does if it is installed > on the first drive (hda) which still has normal partitions but has a grub.conf > in the /boot partition on that drive that references md partitions for the > root partition (root=/dev/md2). I assume grub will try to get /dev/md2 from > the hda drive first and might generate and error before ever trying the hde > drive. I have seen at least one reference of converting the partitions on > the first drive to Raid AutoDetect even though the contents of the fstab > on its partitions still reference normal partitions. My question is whether > grub can load linux using normal partitions even if the partitions are set > to fd (Raid Autodetect). That is does the use of the fd ID for partitions > prevent those partitions from being used as normal partitions as well as > md partitions. I suspect not but am unsure. Grub itself doesn't know anything about raid. It happens to work with RAID1 because it can use the underlying /boot partition on either mirror. So, the steps up to loading the kernel are working with normal partitions (and it doesn't care about the FD partition type), and the grub.conf entry root (hd0,0) refers to the partitions as used by the grub loader. After oading the kernel, it will autodetect the raid partitions that are marked with the FD type, so you can have 'root=/dev/md2' in the kernel line in grub.conf. That is just passed to the kernel and grub doesn't have to understand it. You should fix fstab to match the entry that the kernel line uses. > ps I assume in the worse scenario I can detach the hda drive, boot from > the linux rescue cd and setup grub on the hde drive to boot the md > partitions there. However I am unclear how I would ever be able to > reattach the first drive (hda) to use it for the missing spares since > it has grub setup on it. You could, at this point swap the RAID drive into the hda position, and install grub in rescue mode, but you shouldn't have to do it that way. If you do, be sure the fstab entries match what the install/rescue boot will see. -- Les Mikesell lesmikesell@xxxxxxxxx