Support legacy MBR (msdos) as part of UEFI to enable hybrid builds

This commit is contained in:
Vojtech Trefny 2019-03-11 15:13:51 +01:00
parent 311348a8ba
commit 6acd04a9fb
2 changed files with 45 additions and 1 deletions

View File

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

View File

@ -23,13 +23,14 @@ Version: 3.1.3
#%%global prerelease .b2 #%%global prerelease .b2
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
Release: 1%{?prerelease}%{?dist} Release: 2%{?prerelease}%{?dist}
Epoch: 1 Epoch: 1
License: LGPLv2+ License: LGPLv2+
%global realname blivet %global realname blivet
%global realversion %{version}%{?prerelease} %global realversion %{version}%{?prerelease}
Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz
Patch0: 0001-force-lvm-plugin.patch Patch0: 0001-force-lvm-plugin.patch
Patch1: 0002-Support-legacy-MBR-as-part-of-UEFI.patch
# Versions of required components (done so we make sure the buildrequires # Versions of required components (done so we make sure the buildrequires
# match the requires versions of things). # match the requires versions of things).
@ -190,6 +191,9 @@ configuration.
%endif %endif
%changelog %changelog
* Mon Mar 11 2019 Vojtech Trefny <vtrefny@redhat.com> - 3.1.3-2
- Support legacy MBR (msdos) as part of UEFI to enable hybrid builds
* Wed Feb 27 2019 Vojtech Trefny <vtrefny@redhat.com> - 3.1.3-1 * Wed Feb 27 2019 Vojtech Trefny <vtrefny@redhat.com> - 3.1.3-1
- Don't crash if blockdev mpath plugin isn't available. (#1672971) (dlehman) - Don't crash if blockdev mpath plugin isn't available. (#1672971) (dlehman)
- iscsi: Add default value to unused 'storage' argument in 'write' (vtrefny) - iscsi: Add default value to unused 'storage' argument in 'write' (vtrefny)