[PATCH 2/2] Add 'nogpt' cmdline arg to disable creation of gpt disklabels.

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

 



This is for BIOS systems that absolutely cannot boot from GPT disks.
---
 pyanaconda/flags.py    |    2 ++
 pyanaconda/platform.py |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 3871f47..958eb18 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -120,6 +120,8 @@ class Flags:
         if not selinux.is_selinux_enabled():
             self.__dict__['flags']['selinux'] = 0
 
+        self.__dict__['flags']['nogpt'] = self.__dict__['flags']['cmdline'].has_key("nogpt")
+
 global flags
 flags = Flags()
 
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index 82b4b55..844da2f 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -66,6 +66,10 @@ class Platform(object):
            all the methods in this class."""
         self.anaconda = anaconda
 
+        if flags.nogpt and "gpt" in self._disklabel_types and \
+           len(self._disklabel_types) > 1:
+            self._disklabel_types.remove("gpt")
+
     @property
     def diskLabelTypes(self):
         """A list of valid disklabel types for this architecture."""
-- 
1.7.3.4

_______________________________________________
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