6cce148
From 2050395b053e4813da20f1c3bc39d74a8e45803f Mon Sep 17 00:00:00 2001
6cce148
From: Peter Robinson <pbrobinson@gmail.com>
6cce148
Date: Thu, 7 Mar 2019 20:57:59 +0000
6cce148
Subject: [PATCH] Support legacy MBR (msdos) as part of UEFI to enable hybrid
6cce148
 builds
6cce148
6cce148
The UEFI spec supports legacy MBR (msdos) in section 5.2 of the UEFI 2.7 spec [1].
6cce148
There's a number of use cases where we might boot on a UEFI device but want to
6cce148
support, but not by default, the creation of images using legacy MBR partitions.
6cce148
One of these use cases is cloud images where we can produce a single image
6cce148
tha will run on UEFI supported, including secure-boot, clouds but also
6cce148
support AWS which only supports MBR partitioning schemes [2] and in the current
6cce148
config anaconda fails the install where this is a perfectly valid and widely
6cce148
supported deployment mechanism.
6cce148
6cce148
So enable the ability to use legacy msdos partitioning schemes, but don't use
6cce148
it for default installs, so people may consume this mechanism using kickstarts
6cce148
rather than having the install fail for a valid use case.
6cce148
6cce148
[1] https://uefi.org/sites/default/files/resources/UEFI%20Spec%202_7_A%20Sept%206.pdf
6cce148
[2] https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html
6cce148
6cce148
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
6cce148
---
6cce148
 blivet/formats/disklabel.py | 2 +-
6cce148
 1 file changed, 1 insertion(+), 1 deletion(-)
6cce148
6cce148
diff --git a/blivet/formats/disklabel.py b/blivet/formats/disklabel.py
6cce148
index 75867d6a..8186d1a1 100644
6cce148
--- a/blivet/formats/disklabel.py
6cce148
+++ b/blivet/formats/disklabel.py
6cce148
@@ -228,7 +228,7 @@ def get_platform_label_types(cls):
6cce148
         elif arch.is_efi() and arch.is_arm():
6cce148
             label_types = ["msdos", "gpt"]
6cce148
         elif arch.is_efi() and not arch.is_aarch64():
6cce148
-            label_types = ["gpt"]
6cce148
+            label_types = ["gpt", "msdos"]
6cce148
         elif arch.is_s390():
6cce148
             label_types = ["msdos", "dasd"]
6cce148