From f06fd828a5e1a814986707a9f3b233553995d5f2 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Thu, 7 Nov 2013 10:40:13 -0500 Subject: [PATCH] Remove exFAT partitions from boot list under OS X unless they contain a known boot loader. --- NEWS.txt | 8 +++++++- install.sh | 4 ++-- refind/lib.c | 2 +- refind/main.c | 3 +-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 20bda5a..eaea6b4 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,12 @@ -0.7.5 (10/??/2013): +0.7.5 (11/??/2013): ------------------- +- Fixed bug that caused unbootable exFAT partitions to show up as + bootable in OS X. + +- Fixed bug in install.sh that caused installs to the ESP on recent + versions of OS X to fail. + - Fixed bug that caused rEFInd to hang on some Macs when multiple EFI drivers were present. diff --git a/install.sh b/install.sh index 645c1b4..fd7bb1f 100755 --- a/install.sh +++ b/install.sh @@ -409,8 +409,8 @@ MountDefaultTarget() { MountOSXESP() { # Identify the ESP. Note: This returns the FIRST ESP found; # if the system has multiple disks, this could be wrong! - Temp=`diskutil list | grep " EFI "` - Esp=/dev/`echo $Temp | cut -f 5 -d ' '` + Temp=`diskutil list | grep " EFI " | grep -o 'disk.*'` + Esp=/dev/`echo $Temp` # If the ESP is mounted, use its current mount point.... Temp=`df -P | grep "$Esp"` InstallDir=`echo $Temp | cut -f 6 -d ' '` diff --git a/refind/lib.c b/refind/lib.c index ee8acd9..4989076 100644 --- a/refind/lib.c +++ b/refind/lib.c @@ -510,7 +510,7 @@ static VOID ScanVolumeBootcode(REFIT_VOLUME *Volume, BOOLEAN *Bootable) if (!EFI_ERROR(Status)) { Volume->FSType = IdentifyFilesystemType(Buffer, SAMPLE_SIZE); - if (*((UINT16 *)(Buffer + 510)) == 0xaa55 && Buffer[0] != 0) { + if ((*((UINT16 *)(Buffer + 510)) == 0xaa55 && Buffer[0] != 0) && (FindMem(Buffer, 512, "EXFAT", 5) == -1)) { *Bootable = TRUE; Volume->HasBootCode = TRUE; } diff --git a/refind/main.c b/refind/main.c index 7bb69ff..2ceb334 100644 --- a/refind/main.c +++ b/refind/main.c @@ -153,7 +153,7 @@ static VOID AboutrEFInd(VOID) { if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.4.3"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.4.5"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2013 Roderick W. Smith"); @@ -2430,7 +2430,6 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) ReadConfig(CONFIG_FILE_NAME); ScanVolumes(); - PauseForKey(); InitScreen(); WarnIfLegacyProblems(); MainMenu.TimeoutSeconds = GlobalConfig.Timeout; -- 2.39.2