diff options
author | Matthew Garrett <mjg@redhat.com> | 2012-02-14 12:52:18 -0500 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2012-02-14 11:12:38 -0800 |
commit | ae94f79bc90fefe65813acf54566ecfbaa93b77e (patch) | |
tree | 3d74cc5bf2c70fafcb078aa55cf0f5bfe53bc2f6 /pyanaconda | |
parent | 4d79d8a6e52363ed0e42b147f2dab9f84404bcfe (diff) | |
download | anaconda-ae94f79bc90fefe65813acf54566ecfbaa93b77e.tar.gz anaconda-ae94f79bc90fefe65813acf54566ecfbaa93b77e.tar.xz anaconda-ae94f79bc90fefe65813acf54566ecfbaa93b77e.zip |
Add support for UEFI Mac installs
Macs are slightly special in terms of their UEFI implementation. The
easiest way to handle boot choice is via the firmware boot picker menu,
which doesn't make use of EFI boot variables. In order for something to
show up here, the filesystem needs to be HFS+ and have some magic done
to it. Handle this case by detecting that we're on a Mac and using an HFS+
/boot/efi partition rather than a FAT one. That lets us then install the
mactel-boot package which will deal with configuring the bootloader.
Diffstat (limited to 'pyanaconda')
-rw-r--r-- | pyanaconda/kickstart.py | 9 | ||||
-rw-r--r-- | pyanaconda/platform.py | 19 |
2 files changed, 24 insertions, 4 deletions
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py index 27cf6d145..5484c8269 100644 --- a/pyanaconda/kickstart.py +++ b/pyanaconda/kickstart.py @@ -855,9 +855,12 @@ class PartitionData(commands.partition.F12_PartData): self.anaconda.ksdata.onPart[kwargs["name"]] = self.onPart self.mountpoint = "" elif self.mountpoint == "/boot/efi": - type = "EFI System Partition" - self.fsopts = "defaults,uid=0,gid=0,umask=0077,shortname=winnt" - kwargs["weight"] = self.anaconda.platform.weight(fstype="efi") + kwargs["weight"] = self.anaconda.platform.weight(mountpoint="/boot/efi") + if iutil.isMactel(): + type = "hfs+" + else: + type = "EFI System Partition" + self.fsopts = "defaults,uid=0,gid=0,umask=0077,shortname=winnt" else: if self.fstype != "": type = self.fstype diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py index 9840f03e7..c57c76e7e 100644 --- a/pyanaconda/platform.py +++ b/pyanaconda/platform.py @@ -215,6 +215,20 @@ class EFI(Platform): else: return 0 +class MacEFI(EFI): + _boot_stage1_format_types = ["hfs+"] + _boot_efi_description = N_("Apple EFI Boot Partition") + _non_linux_format_types = ["hfs+"] + _packages = ["mactel-boot"] + + def setDefaultPartitioning(self): + from storage.partspec import PartSpec + ret = Platform.setDefaultPartitioning(self) + ret.append(PartSpec(mountpoint="/boot/efi", fstype="hfs+", size=20, + maxSize=200, + grow=True, weight=self.weight(mountpoint="/boot/efi"))) + return ret + class PPC(Platform): _ppcMachine = iutil.getPPCMachine() _bootloaderClass = bootloader.Yaboot @@ -338,7 +352,10 @@ def getPlatform(anaconda): elif iutil.isSparc(): return Sparc(anaconda) elif iutil.isEfi(): - return EFI(anaconda) + if iutil.isMactel(): + return MacEFI(anaconda) + else: + return EFI(anaconda) elif iutil.isX86(): return X86(anaconda) else: |