[anaconda] Add check for Linux HFS+ ESP on Mac (#1010495)
Brian C. Lane
bcl at redhat.com
Tue Oct 29 23:56:59 UTC 2013
From: "Brian C. Lane" <bcl at redhat.com>
On Mac it can be difficult to tell the difference between the hfs+
partition that fedora creates to use as the EFI System Partition and a
normal OSX hfs+ partition.
This switches to using a special filesystem, named macefi, that is hfs+
formatted and has a partition label of 'Linux HFS+ ESP'.
---
anaconda.spec.in | 2 +-
pyanaconda/bootloader.py | 13 +++++++++++++
pyanaconda/kickstart.py | 2 +-
pyanaconda/ui/gui/spokes/custom.py | 2 +-
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 42c6014..bad15b1 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -81,7 +81,7 @@ BuildRequires: s390utils-devel
Requires: anaconda-widgets = %{version}-%{release}
Requires: dnf
-Requires: python-blivet >= 0.23.1
+Requires: python-blivet >= 0.23.3
Requires: gnome-icon-theme-symbolic
Requires: python-meh >= %{mehver}
Requires: libreport-anaconda >= 2.0.21-1
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 869d197..70c8c40 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1713,6 +1713,19 @@ class MacEFIGRUB(EFIGRUB):
super(MacEFIGRUB, self).install()
self.mactel_config()
+ def is_valid_stage1_device(self, device, early=False):
+ valid = super(MacEFIGRUB, self).is_valid_stage1_device(device, early)
+
+ # Make sure we don't pick the OSX root partition
+ if valid and getattr(device.format, "name", "") != "Linux HFS+ ESP":
+ valid = False
+
+ if hasattr(device.format, "name"):
+ log.debug("device.format.name is '%s'", device.format.name)
+
+ log.debug("MacEFIGRUB.is_valid_stage1_device(%s) returning %s", device.name, valid)
+ return valid
+
class YabootBase(BootLoader):
def write_config_password(self, config):
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index c8eaae4..8df0a65 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -957,7 +957,7 @@ class PartitionData(commands.partition.F18_PartData):
ksdata.onPart[kwargs["name"]] = self.onPart
elif self.mountpoint == "/boot/efi":
if blivet.arch.isMactel():
- ty = "hfs+"
+ ty = "macefi"
else:
ty = "EFI System Partition"
self.fsopts = "defaults,uid=0,gid=0,umask=0077,shortname=winnt"
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index b7d2aa4..94c4416 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -144,7 +144,7 @@ device_text_map = {DEVICE_TYPE_LVM: DEVICE_TEXT_LVM,
DEVICE_TYPE_BTRFS: DEVICE_TEXT_BTRFS,
DEVICE_TYPE_LVM_THINP: DEVICE_TEXT_LVM_THINP}
-partition_only_format_types = ["efi", "hfs+", "prepboot", "biosboot",
+partition_only_format_types = ["efi", "macefi", "prepboot", "biosboot",
"appleboot"]
def size_from_entry(entry):
--
1.8.3.1
More information about the anaconda-patches
mailing list