[PATCH] Don't use GPT disklabels on Lenovo BIOS systems. (#749325)

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

 



Lenovo ships broken BIOSes that cannot boot at all if the
only disk has a GPT disklabel.
---
 pyanaconda/platform.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index 844da2f..fa0df8f 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -153,6 +153,10 @@ class X86(Platform):
     # XXX hpfs, if reported by blkid/udev, will end up with a type of None
     _non_linux_format_types = ["vfat", "ntfs", "hpfs"]
 
+    def __init__(self, anaconda):
+        super(X86, self).__init__(anaconda)
+        self.blackListGPT()
+
     def setDefaultPartitioning(self):
         """Return the default platform-specific partitioning information."""
         from storage.partspec import PartSpec
@@ -170,6 +174,13 @@ class X86(Platform):
         else:
             return 0
 
+    def blackListGPT(self):
+        buf = iutil.execWithCapture("dmidecode",
+                                    ["-s", "chassis-manufacturer"],
+                                    stderr="/dev/tty5")
+        if "LENOVO" in buf.splitlines() and "gpt" in self._disklabel_types:
+            self._disklabel_types.remove("gpt")
+
 class EFI(Platform):
     _bootloaderClass = bootloader.EFIGRUB
 
-- 
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