From 42476313b78e83c4390a265d2230b81041f45015 Mon Sep 17 00:00:00 2001 From: srs5694 Date: Fri, 5 Jul 2013 18:32:48 -0400 Subject: [PATCH] Detect Boot Repair's backed-up Windows boot loader. --- NEWS.txt | 9 +++++++++ docs/refind/todo.html | 18 ++++++++++++++---- refind/main.c | 31 ++++++++++++++++++++++--------- 3 files changed, 45 insertions(+), 13 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index da8c281..bdc1a33 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,3 +1,12 @@ +0.7.1 (?/??/2013): +------------------ + +- Fixed build problem with recent development versions of EDK2. + +- Added scan for Boot Repair's backup of the Windows boot loader + (bkpbootmgfw.efi). If found, give separate entries for it and for + bootmgfw.efi, each with its own descriptive text label. + 0.7.0 (6/27/2013): ------------------ diff --git a/docs/refind/todo.html b/docs/refind/todo.html index 01cf946..e7e6b53 100644 --- a/docs/refind/todo.html +++ b/docs/refind/todo.html @@ -228,10 +228,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • I've been receiving reports of blank screens when using rEFInd on some recent Mac models. I've investigated this with the help of one user, and I suspect that Apple has made changes to its firmware - that are likely to affect just about any EFI program. I don't know - how to fix the problem at the moment, though; I need both - documentation and access to an afflicted computer to do the - necessary work, and I have neither.
  • + that are likely to affect just about any EFI program. I don't have + a definitive solution, but at least one user has reported that + removing rEFInd's drivers has caused the problem to go into + remission.
  • The Gigabyte Hybrid EFI has a bug that causes the allegedly case-insensitive @@ -300,6 +300,16 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    adding a check for duplicate filesystem UUIDs to the partition-scanning code.
  • +
  • Some Macs experience problems with waking up from suspend states + when rEFInd is installed. Unfortunately, I lack the hardware to + test and experiment with this (my only Intel-based Mac doesn't + exhibit this problem), so I can't fix this myself. Using + pmset to disable the autopoweroff option is + claimed + by some to at least partially fix the problem, though.
  • +
  • New features I'd like to add: diff --git a/refind/main.c b/refind/main.c index 2c3b18d..47588ee 100644 --- a/refind/main.c +++ b/refind/main.c @@ -147,7 +147,7 @@ static VOID AboutrEFInd(VOID) if (AboutMenu.EntryCount == 0) { AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT); - AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.0"); + AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.0.2"); AddMenuInfoLine(&AboutMenu, L""); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer"); AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2013 Roderick W. Smith"); @@ -926,7 +926,8 @@ VOID SetLoaderDefaults(LOADER_ENTRY *Entry, CHAR16 *LoaderPath, REFIT_VOLUME *Vo Entry->UseGraphicsMode = GlobalConfig.GraphicsFor & GRAPHICS_FOR_GRUB; } else if (StriCmp(FileName, L"cdboot.efi") == 0 || StriCmp(FileName, L"bootmgr.efi") == 0 || - StriCmp(FileName, L"bootmgfw.efi") == 0) { + StriCmp(FileName, L"bootmgfw.efi") == 0 || + StriCmp(FileName, L"bkpbootmgfw.efi") == 0) { MergeStrings(&OSIconName, L"win", L','); Entry->OSType = 'W'; ShortcutLetter = 'W'; @@ -1273,6 +1274,7 @@ static VOID ScanEfiFiles(REFIT_VOLUME *Volume) { CHAR16 FileName[256], *Directory, *MatchPatterns, *VolName = NULL, *SelfPath; UINTN i, Length; BOOLEAN ScanFallbackLoader = TRUE; + BOOLEAN FoundBRBackup = FALSE; MatchPatterns = StrDuplicate(LOADER_MATCH_PATTERNS); if (GlobalConfig.ScanAllLinux) @@ -1298,13 +1300,24 @@ static VOID ScanEfiFiles(REFIT_VOLUME *Volume) { } // if should scan Mac directory // check for Microsoft boot loader/menu - StrCpy(FileName, L"EFI\\Microsoft\\Boot\\bootmgfw.efi"); - if (FileExists(Volume->RootDir, FileName) && ShouldScan(Volume, L"EFI\\Microsoft\\Boot") && - !IsIn(L"bootmgfw.efi", GlobalConfig.DontScanFiles)) { - AddLoaderEntry(FileName, L"Microsoft EFI boot", Volume); - if (DuplicatesFallback(Volume, FileName)) - ScanFallbackLoader = FALSE; - } + if (ShouldScan(Volume, L"EFI\\Microsoft\\Boot")) { + StrCpy(FileName, L"EFI\\Microsoft\\Boot\\bkpbootmgfw.efi"); + if (FileExists(Volume->RootDir, FileName) && !IsIn(L"bkpbootmgfw.efi", GlobalConfig.DontScanFiles)) { + AddLoaderEntry(FileName, L"Microsoft EFI boot (Boot Repair backup)", Volume); + FoundBRBackup = TRUE; + if (DuplicatesFallback(Volume, FileName)) + ScanFallbackLoader = FALSE; + } + StrCpy(FileName, L"EFI\\Microsoft\\Boot\\bootmgfw.efi"); + if (FileExists(Volume->RootDir, FileName) && !IsIn(L"bootmgfw.efi", GlobalConfig.DontScanFiles)) { + if (FoundBRBackup) + AddLoaderEntry(FileName, L"Supposed Microsoft EFI boot (probably GRUB)", Volume); + else + AddLoaderEntry(FileName, L"Microsoft EFI boot", Volume); + if (DuplicatesFallback(Volume, FileName)) + ScanFallbackLoader = FALSE; + } + } // if // scan the root directory for EFI executables if (ScanLoaderDir(Volume, L"\\", MatchPatterns)) -- 2.39.2