[PATCH 2/2] Stop user if we have no /boot and / is an LV

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

 



This is related to the /boot on LVM support.  If the user does custom
partitioning and fails to create /boot and puts / on a logical volume,
we need to have them correct that situation.  Force the user to have
/boot on LVM, /boot on a regular partition, or / on a regular partition.

Related: rhbz#618376
---
 storage/__init__.py |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index b3e9f8f..e5f6e46 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -188,6 +188,31 @@ def storageComplete(anaconda):
     else:
         warning = ""
 
+    # Prevent users from installing on s390x with (a) no /boot volume, (b) the
+    # root volume on LVM, and (c) the root volume not restricted to a single
+    # PV
+    # NOTE: There is not really a way for users to create a / volume
+    # restricted to a single PV.  The backend support is there, but there are
+    # no UI hook-ups to drive that functionality, but I do not personally
+    # care.  --dcantrell
+    if iutil.isS390() and \
+       not anaconda.id.storage.mountpoints.has_key('/boot') and \
+       anaconda.id.storage.mountpoints['/'].type == 'lvmlv' and \
+       not anaconda.id.storage.mountpoints['/'].singlePV:
+        rc = anaconda.intf.messageWindow(_("Missing /boot Volume"),
+                                         _("This platform requires /boot on "
+                                           "a dedicated partition or logical "
+                                           "volume.  If you do not want a "
+                                           "/boot volume, you must place / "
+                                           "on a dedicated non-LVM "
+                                           "partition."),
+                                         type="custom", custom_icon="error",
+                                         custom_buttons=[_("Go _back"),
+                                                         _("_Exit installer")],
+                                         default=0)
+        if rc == 0:
+            return DISPATCH_BACK
+        sys.exit(1)
 
     rc = anaconda.intf.messageWindow(_("Writing storage configuration to disk"),
                                 _("The partitioning options you have selected "
-- 
1.7.1

_______________________________________________
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