[PATCH] Enable support for bootloader on md RAID1 partitions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Patch is tested to work, but feels a bit lame to me, maybe it calls for
bigger cleanup of booty. Also there may be coming some changes in md devices
naming.

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 partitions.

---
 booty/x86.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/booty/x86.py b/booty/x86.py
index d0972c8..09eb665 100644
--- a/booty/x86.py
+++ b/booty/x86.py
@@ -120,7 +120,7 @@ class x86BootloaderInfo(efiBootloaderInfo):
 
             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)
@@ -158,6 +158,8 @@ class x86BootloaderInfo(efiBootloaderInfo):
                     target = "partition"
         elif grubTarget[-1].isdigit() and not path.startswith('md'):
             target = "partition"
+        elif path.startswith('md') and not flags.cmdline.has_key("iswmd"):
+            target = "partition"
 
         f = open(cf, "w+")
 
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux