Hi, After reading the current code 3 times, it seems that what we are currently doing when selecting to install into a dmraid1 /boot partition is to install in the MBR of *both* disks containing the partition. Whereas if we select to install into the MBR, we will only install into the MBR of the first disk of the raidset. This second case is my sortof fault, as it is the result of a forward port of a RHEL-4 patch, as in RHEL-4 we actually did as advertised and install into (both) the partitions of the raid set. Since this caused issues with disks without a valid / default msdos MBR, I added the option in RHEL-4 to instead install onto the MBR of the first disk (this was an RFE). I then forward ported this to RHEL-5 (for 5.4, we can still retract that) and to Fedora. So I see 4 options: 1) Remove the install to MBR option I forward ported, and keep things otherwise as is, as when having /boot on mdraid1 it makes sense to install the bootloader in both MBR's (I must admit the UI is confusing here) 2) Keep the install into MBR option in the UI (and still only install to one disk) and fix the install into partition option to acutally do that (for both disks) 3) Fix the install to partition option to install to the partion of both disks and fix the install to MBR option to install to the MBR of both disks when /boot is on mdraid1 (this will not be clear from the UI unless we make changes there) 4) Nuke the entire handling of /boot on mdraid (we've got biosraid for this on most machines now a days) So what shall we do ? Regards, Hans On 07/10/2009 04:45 PM, Radek Vykydal wrote:
In f10, for /boot on md raid 1 we used to have only option to install bootloader on partition but in fact, we installed on MBR. In f11 we added option to instal to MBR in UI, and we are still installing on MBR for both options. In rhel 5 we are always installing bootloader on MBR too. Also grub-install /dev/md0 installs on MBR, so maybe this is not something we want to do at all, but in that case, we should probably remove the option to install bootloader on /dev/md0 raid device from UI. Two issues: * The patch assumes that 'mdX' bootloader target is md raid 1 device with members being partitions. Intel bios raid using mdraid (or whole-disk md devices in general?) need to be handled/considered. * If we allow (start to do) installing on md raid partitions, upgrade should be patched to count with this possibility. A little problem is that up to f11 boot=/dev/md0 we write into /etc/sysconfig/grub or grub.conf means that bootloader was installed on mbr, and after patching it would mean that it is on raid device (partitions). --- booty/x86.py | 17 ++++------------- 1 files changed, 4 insertions(+), 13 deletions(-) diff --git a/booty/x86.py b/booty/x86.py index 3890e69..8527442 100644 --- a/booty/x86.py +++ b/booty/x86.py @@ -112,14 +112,13 @@ class x86BootloaderInfo(efiBootloaderInfo): for bootDev in bootDevs: cmds = [] - gtPart = self.getMatchingPart(bootDev, grubTarget) - gtDisk = self.grubbyPartitionName(getDiskPart(gtPart, self.storage)[0]) + gtDisk = self.grubbyPartitionName(getDiskPart(bootDev, self.storage)[0]) bPart = self.grubbyPartitionName(bootDev) cmd = "root %s\n" % (bPart,) stage1Target = gtDisk if target == "partition": - stage1Target = self.grubbyPartitionName(gtPart) + stage1Target = bPart cmd += "install %s%s/stage1 d %s %s/stage2 p %s%s/grub.conf" % \ (args, grubPath, stage1Target, grubPath, bPart, grubPath) @@ -155,7 +154,8 @@ class x86BootloaderInfo(efiBootloaderInfo): if grubTarget[-2] == 'p' or \ (grubTarget[-2].isdigit() and grubTarget[-3] == 'p'): target = "partition" - elif grubTarget[-1].isdigit() and not path.startswith('md'): + # NOTE: this includes also mdX grub targets + elif grubTarget[-1].isdigit(): target = "partition" f = open(cf, "w+") @@ -362,15 +362,6 @@ class x86BootloaderInfo(efiBootloaderInfo): return 0 - def getMatchingPart(self, bootDev, target): - bootName, bootPartNum = getDiskPart(bootDev, self.storage) - devices = self.getPhysicalDevices(target) - for device in devices: - name, partNum = getDiskPart(device, self.storage) - if name == bootName: - return device - return devices[0] - def grubbyDiskName(self, name): return "hd%d" % self.drivelist.index(name)
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list