From 849bd62e3cc11418d8645c067dea5ec088b3c30a Mon Sep 17 00:00:00 2001
From: srs5694
As described later on this page, rEFInd 0.10.0 provides SIP control features, but they're disabled by default—except on the USB flash drive and CD-R images available from the rEFInd downloads page. On these images, the SIP control features are enabled, and can toggle between the two main modes you can set via csrutil enable and csrutil disable in the Recovery HD system. Thus, to disable SIP to install rEFInd, you can:
+As described later on this page, rEFInd 0.10.0 and later provide SIP control features, but they're disabled by default—except on the USB flash drive and CD-R images available from the rEFInd downloads page. On these images, the SIP control features are enabled, and can toggle between the two main modes you can set via csrutil enable and csrutil disable in the Recovery HD system. Thus, to disable SIP to install rEFInd, you can:
Once rEFInd is installed, you can use it to manage SIP features; however, the rEFInd features needed to do this are disabled by default. You must uncomment or add two lines to your refind.conf file:
- +Note that both of these options must be set appropriately. If either of them is missing or misconfigured, rEFInd will not display the new SIP tool. A typical configuration using these features might look like this:
+Note that both of these options must be set appropriately. If either of them is missing or misconfigured, rEFInd will not display the SIP tool. A typical configuration using these features might look like this:
showtools shell,memtest,gdisk,csr_rotate,apple_recovery,windows_recovery,about,shutdown,reboot csr_values 10,77@@ -324,7 +324,7 @@ csr_values 10,77
copyright © 2015 by Roderick W. Smith
+copyright © 2015-2016 by Roderick W. Smith
This document is licensed under the terms of the GNU Free Documentation License (FDL), version 1.3.
diff --git a/refind-install b/refind-install index 84d6615..5005bfe 100755 --- a/refind-install +++ b/refind-install @@ -39,7 +39,9 @@ # Revision history: # -# 0.10.2 -- Improved Secure Boot detection in Linux & fixed --usedefault in OS X. +# 0.10.2 -- Improved Secure Boot detection in Linux, fixed --usedefault in OS X, +# and fixed bug that could cause mountesp to be installed as a FILE +# called /usr/local/bin in OS X. # 0.10.1 -- Improve extraction of default kernel options from /proc/cmdline. # Add support for AMD64 (aka AARCH64, aa64) platform. Added # warning when --alldrivers used without --usedefault. @@ -863,7 +865,8 @@ InstallOnOSX() { DetermineTargetDir CheckForSIP CopyRefindFiles - cp "$ThisDir/mountesp" /usr/local/bin &> /dev/null + mkdir -p /usr/local/bin &> /dev/null + cp "$ThisDir/mountesp" /usr/local/bin/ &> /dev/null if [[ $InstallToEspOnMac == "1" && -z "$TargetPart" ]] ; then bless --mount "$InstallDir" --setBoot --file "$InstallDir/$TargetDir/$Refind" --shortform elif [[ "$TargetDir" != "/EFI/BOOT" ]] ; then diff --git a/refind/legacy.h b/refind/legacy.h index 3da42f2..db29673 100644 --- a/refind/legacy.h +++ b/refind/legacy.h @@ -44,6 +44,7 @@ #include "global.h" +VOID ScanShell(VOID); VOID StartLegacy(IN LEGACY_ENTRY *Entry, IN CHAR16 *SelectionName); VOID StartLegacyUEFI(LEGACY_ENTRY *Entry, CHAR16 *SelectionName); VOID ScanLegacyDisc(VOID); diff --git a/refind/lib.c b/refind/lib.c index 9c7d1f6..f38ac64 100644 --- a/refind/lib.c +++ b/refind/lib.c @@ -1094,12 +1094,12 @@ VOID ScanVolumes(VOID) // get all filesystem handles Status = LibLocateHandle(ByProtocol, &BlockIoProtocol, NULL, &HandleCount, &Handles); - UuidList = AllocateZeroPool(sizeof(EFI_GUID) * HandleCount); if (Status == EFI_NOT_FOUND) { return; // no filesystems. strange, but true... } if (CheckError(Status, L"while listing all file systems")) return; + UuidList = AllocateZeroPool(sizeof(EFI_GUID) * HandleCount); // first pass: collect information about all handles for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++) { -- 2.39.2