]> code.delx.au - refind/commitdiff
Fixed BIOS-booting bugs on Macs. Version 0.7.3 release.
authorsrs5694 <srs5694@users.sourceforge.net>
Wed, 7 Aug 2013 16:07:10 +0000 (12:07 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Wed, 7 Aug 2013 16:07:10 +0000 (12:07 -0400)
19 files changed:
NEWS.txt
docs/refind/bootmode.html
docs/refind/configfile.html
docs/refind/drivers.html
docs/refind/features.html
docs/refind/getting.html
docs/refind/index.html
docs/refind/installing.html
docs/refind/linux.html
docs/refind/revisions.html
docs/refind/secureboot.html
docs/refind/themes.html
docs/refind/todo.html
docs/refind/using.html
mok/mok.h
refind.spec
refind/global.h
refind/lib.c
refind/main.c

index e96870d9f4694237702fd4000c754e1dcdcace4c..5cd1109aced731ba424f4f15daaca7e54e10daab 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,11 @@
+0.7.3 (8/7/2013):
+-----------------
+
+- Fixed bug that caused missing media-type badges on BIOS-mode boot
+  loaders on Macs.
+
+- Fixed bug that caused failure when launching BIOS-mode OSes on Macs.
+
 0.7.2 (8/6/2013):
 -----------------
 
index 0b26addb65f21c8360c10beeb7774631c47128ee..69238b1141b4d2f981d3b5784c74eaadfb8cc1e1 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>\r
 \r
 <p>Originally written: 3/14/2012; last Web page update:\r
-8/6/2013, referencing rEFInd 0.7.2</p>\r
+8/7/2013, referencing rEFInd 0.7.3</p>\r
 \r
 \r
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>\r
index 808876bd0627c26a984d607085cd211245460629..b7e0c05f7aab35afa0d256883b6e6182ee781d58 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index 41cb79bc0c7480c5b8bab526d0271e4a2692b66a..a1e7351a64d37f7a5e50dbb5409a7230289fb0fa 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 4/19/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index aab60eadfd39bc1b6dbf95c7a7b61f3a990c4512..295c71d151fb0c37484d72b7e64109e532ba4043 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
 
index 7ccd3a4bc760ab891b851cc28dbf498324cd284b..7063c973f0c922b358112dc6712b3c31130486b4 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
 
@@ -136,7 +136,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <ul>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.7.2/refind-bin-0.7.2.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.7.3/refind-bin-0.7.3.zip/download">A
     binary zip file</a></b>&mdash;Download this if you want to install
     rEFInd and/or its filesystem drivers on an <i>x</i>86 or <i>x</i>86-64
     computer and have no need to test rEFInd first by booting it on an
@@ -146,14 +146,14 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     href="installing.html">Installing rEFInd</a> page. Some users of Arch
     Linux have reported problems booting some specific Arch Linux kernels
     with rEFInd and some other tools. For them, a <a
-    href="http://sourceforge.net/projects/refind/files/0.7.2/refind-bin-gnuefi-0.7.2.zip/download">variant
+    href="http://sourceforge.net/projects/refind/files/0.7.3/refind-bin-gnuefi-0.7.3.zip/download">variant
     package</a> exists in which the <i>x</i>86-64 binary was compiled with
     GNU-EFI rather than the usual TianoCore EDK2. This change helps some
     users with this problem; but using GNU-EFI also means that this version
     can't launch BIOS-mode OSes.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.7.2/refind-0.7.2-1.x86_64.rpm/download">A
+    href="http://sourceforge.net/projects/refind/files/0.7.3/refind-0.7.3-1.x86_64.rpm/download">A
     binary RPM file</a></b>&mdash;If you use an RPM-based <i>x</i>86-64
     Linux system such as Fedora or openSUSE, you can install the binary RPM
     package rather than use the binary zip file. (I don't provide an
@@ -162,13 +162,13 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     rEFInd</a> page) as part of the installation process. Distribution
     maintainers can examine the <tt>refind.spec</tt> file in the source
     package and tweak it to their needs. The <a
-    href="http://sourceforge.net/projects/refind/files/0.7.2/refind-0.7.2-1.src.rpm/download">source
+    href="http://sourceforge.net/projects/refind/files/0.7.3/refind-0.7.3-1.src.rpm/download">source
     RPM file</a> might or might not build on your system as-is; it relies
     on assumptions about the locations of the GNU-EFI development
     files.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.7.2/refind_0.7.2-1_amd64.deb/download">A
+    href="http://sourceforge.net/projects/refind/files/0.7.3/refind_0.7.3-1_amd64.deb/download">A
     binary Debian package</a></b>&mdash;If you use an <i>x</i>86-64 version
     of Debian, Ubuntu, Mint, or another Debian-based distribution, you can
     install from this package, which was converted from the binary RPM
@@ -190,7 +190,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <p class="sidebar"><b>Note:</b> At the moment, neither the bootable CD-R image file nor the bootable USB flash drive image file supports booting with Secure Boot active.</p>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.7.2/refind-cd-0.7.2.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.7.3/refind-cd-0.7.3.zip/download">A
     CD-R image file</a></b>&mdash;This download contains the same files as
     the binary zip file, but you can burn it to a CD-R to test rEFInd
     (and its filesystem drivers) without installing it first. (It boots on
@@ -214,14 +214,14 @@ on <tt>/dev/sdd</tt>. This procedure should work even on a BIOS-booted
 computer.</p>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.7.2/refind-flashdrive-0.7.2.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.7.3/refind-flashdrive-0.7.3.zip/download">A
     USB flash drive image file</a></b>&mdash;Although you     can create
     your own rEFInd USB flash drive, you may find it easier to download
     this version and copy it to your USB drive with <tt>dd</tt> or some
     other low-level disk copying utility.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.7.2/refind-src-0.7.2.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.7.3/refind-src-0.7.3.zip/download">A
     source code zip file</a></b>&mdash;This is useful if you want to compile
     the software locally. Note that I use Linux with the <a
     href="https://sourceforge.net/projects/tianocore/">TianoCore EFI
index 1f49c5de3740b39cb6af69b4bdaa4c1e3ad04f76..6633a4fb44af47ced44445f5fc5d6f03ce056b7b 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index 1dd87ed7d3b84246888b36aabdcc539eb021e8a9..0e49b6656da3ac398b0d3b6c85342f18fe059702 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index 1e1ec074bea44f45da901f1277865f2a9c963a36..fbfe7badf0b509d91c0fa0f4389b9ccea653e8aa 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/19/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index f5caaa6266324d165ed87da3a665b5627275267d..98485e22d8dc367ae48c7a8b29f040e8720f2bc1 100644 (file)
@@ -14,7 +14,7 @@
 <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-<p>Last Web page update: 7/8/2013</p>
+<p>Last Web page update: 8/7/2013</p>
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
 
@@ -130,6 +130,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
+<li><b>0.7.3 (8/7/2013)</b>&mdash;This version fixes a bug that caused boot failures when launching BIOS-mode OSes on Macs. It also fixes a bug that caused such OSes' disk-type icons to disappear.</li>
+
 <li><b>0.7.2 (8/6/2013)</b>&mdash;This version primarily fixes a number of minor bugs: A display glitch when the second row of icons is empty; improper scanning when a volume specification was used in <tt>also_scan_dirs</tt>; improper reading of volume badges from user-specific icons directory or from <tt>.VolumeBadge.icns</tt> files. Also, This version adds protection against loading invalid files as drivers, which can crash some EFIs, adds an icon for Funtoo Linux, and adds <tt>PreLoader.efi</tt> and <tt>shim-fedora.efi</tt> to the default <tt>dont_scan_files</tt> list.</li>
 
 <li><b>0.7.1 (7/8/2013)</b>&mdash;The most important improvement to this version is a bug fix to the filesystem drivers. In version 0.7.0, drivers could hang the system (the Btrfs driver in particular generated problem reports, although the bug could theoretically affect any driver). Version 0.7.1 fixes this problem. I've also fixed a build problem with development versions of the TianoCore EDK2. In rEFInd proper, I've added a scan for <tt>EFI/Microsoft/Boot/bkpbootmgfw.efi</tt>, which is how recent versions of Ubuntu's Boot Repair utility rename the Windows boot loader. This change enables rEFInd to launch Windows even on systems that have been "repaired" by this overzealous tool. I've also fixed a bug that caused volume specifications in <tt>also_scan_dirs</tt> tokens to be ignored.</li>
index 4be4ca9086f170dd042bd90e83acb4984f584493..f5d83062d5c655409a40aa1572b5eae61078f309 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 11/13/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index a799f4323b5319a43e47df1e390677bafb6ac25b..3396430495ed37db672790aee268758527b4bcff 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 4/19/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index 2dcd4b48671e5e673f41dcaf5a2f09673172d7a6..d52ef62db233537d7950ed3f8c8d5b69ceb9d6b7 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index 8f0ee15d5045a425ebe069b3b30851d8d50c6a1f..a5c4ca6dfb0c2bb85b2d149eda314878564bc5a3 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-8/6/2013, referencing rEFInd 0.7.2</p>
+8/7/2013, referencing rEFInd 0.7.3</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
index eca991b56bd6bb58d332d514e699e75fd090f5bb..7648209d5c2ec787a4a1b6b381381f870df9b31c 100644 (file)
--- a/mok/mok.h
+++ b/mok/mok.h
@@ -27,4 +27,3 @@ typedef struct _SHIM_LOCK
 BOOLEAN ShimLoaded(void);
 BOOLEAN ShimValidate (VOID *data, UINT32 size);
 BOOLEAN secure_mode (VOID);
-VOID disable_secure_boot(VOID);
\ No newline at end of file
index 16c7ba0968a90bb17276265ec663bea67047bbfd..33f6de24e647f18f0d4ff00eb0f68e236be34f56 100644 (file)
@@ -1,6 +1,6 @@
 Summary: EFI boot manager software
 Name: refind
-Version: 0.7.2
+Version: 0.7.3
 Release: 1%{?dist}
 Summary: EFI boot manager software
 License: GPLv3
@@ -157,5 +157,5 @@ fi
 # wiping out the just-updated files.
 
 %changelog
-* Tue Aug 6 2013 R Smith <rodsmith@rodsbooks.com> - 0.7.2
-- Created spec file for 0.7.2 release
+* Wed Aug 7 2013 R Smith <rodsmith@rodsbooks.com> - 0.7.3
+- Created spec file for 0.7.3 release
index 419ed8a8a50bd7960611aac445a0c37606963942..82772f2379f08fe844c7eded222fcb108550554a 100644 (file)
@@ -271,7 +271,6 @@ LOADER_ENTRY * MakeGenericLoaderEntry(VOID);
 LOADER_ENTRY * AddLoaderEntry(IN CHAR16 *LoaderPath, IN CHAR16 *LoaderTitle, IN REFIT_VOLUME *Volume);
 VOID SetLoaderDefaults(LOADER_ENTRY *Entry, CHAR16 *LoaderPath, IN REFIT_VOLUME *Volume);
 LOADER_ENTRY * AddPreparedLoaderEntry(LOADER_ENTRY *Entry);
-VOID disable_secure_boot(VOID);
 
 #endif
 
index f0b0e6f169fd0dd882cf650090d75bd65be1e195..6d09f023872aa845daa69a946a24ac45c781e3d3 100644 (file)
@@ -638,7 +638,7 @@ static VOID ScanVolumeBootcode(REFIT_VOLUME *Volume, BOOLEAN *Bootable)
 } /* VOID ScanVolumeBootcode() */
 
 // Set default volume badge icon based on /.VolumeBadge.{icns|png} file or disk kind
-static VOID SetVolumeBadgeIcon(IN OUT REFIT_VOLUME *Volume)
+VOID SetVolumeBadgeIcon(REFIT_VOLUME *Volume)
 {
    if (Volume->VolBadgeImage == NULL) {
       Volume->VolBadgeImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeBadge", 128);
@@ -853,6 +853,10 @@ VOID ScanVolume(REFIT_VOLUME *Volume)
 
     // open the root directory of the volume
     Volume->RootDir = LibOpenRoot(Volume->DeviceHandle);
+
+    // Set volume icon based on .VolumeBadge icon or disk kind
+    SetVolumeBadgeIcon(Volume);
+
     if (Volume->RootDir == NULL) {
         Volume->IsReadable = FALSE;
         return;
@@ -862,9 +866,6 @@ VOID ScanVolume(REFIT_VOLUME *Volume)
 
     Volume->VolName = GetVolumeName(Volume);
 
-    // Set volume icon based on .VolumeBadge icon or disk kind
-    SetVolumeBadgeIcon(Volume);
-
     // get custom volume icons if present
     if (!Volume->VolIconImage)
        Volume->VolIconImage = egLoadIconAnyType(Volume->RootDir, L"", L".VolumeIcon", 128);
index 4eacebbca8b43bf173aaf3afaaeef2a80ed3cf39..bb400e117f908ebcc77e9cfaafd60614e84f526f 100644 (file)
@@ -66,7 +66,7 @@
 #endif
 
 //
-// variables
+// constants
 
 #define MACOSX_LOADER_PATH      L"System\\Library\\CoreServices\\boot.efi"
 #if defined (EFIX64)
 #define SUBSCREEN_HINT2            L"Insert or F2 to edit options; Esc to return to main menu"
 #define SUBSCREEN_HINT2_NO_EDITOR  L"Esc to return to main menu"
 
+// Load types
+#define TYPE_EFI    1
+#define TYPE_LEGACY 2
+
 static REFIT_MENU_ENTRY MenuEntryAbout    = { L"About rEFInd", TAG_ABOUT, 1, 0, 'A', NULL, NULL, NULL };
 static REFIT_MENU_ENTRY MenuEntryReset    = { L"Reboot Computer", TAG_REBOOT, 1, 0, 'R', NULL, NULL, NULL };
 static REFIT_MENU_ENTRY MenuEntryShutdown = { L"Shut Down Computer", TAG_SHUTDOWN, 1, 0, 'U', NULL, NULL, NULL };
@@ -147,7 +151,7 @@ static VOID AboutrEFInd(VOID)
 
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.2");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.3");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2013 Roderick W. Smith");
@@ -240,7 +244,7 @@ static BOOLEAN IsValidLoader(EFI_FILE *RootDir, CHAR16 *FileName) {
 
 // Launch an EFI binary.
 static EFI_STATUS StartEFIImageList(IN EFI_DEVICE_PATH **DevicePaths,
-                                    IN CHAR16 *LoadOptions, IN CHAR16 *LoadOptionsPrefix,
+                                    IN CHAR16 *LoadOptions, IN UINTN LoaderType,
                                     IN CHAR16 *ImageTitle, IN CHAR8 OSType,
                                     OUT UINTN *ErrorInStep,
                                     IN BOOLEAN Verbose)
@@ -259,7 +263,7 @@ static EFI_STATUS StartEFIImageList(IN EFI_DEVICE_PATH **DevicePaths,
 
     // set load options
     if (LoadOptions != NULL) {
-        if (LoadOptionsPrefix != NULL) {
+        if (LoaderType == TYPE_EFI) {
             MergeStrings(&FullLoadOptions, LoadOptions, L' ');
             if (OSType == 'M') {
                MergeStrings(&FullLoadOptions, L" ", 0);
@@ -284,7 +288,7 @@ static EFI_STATUS StartEFIImageList(IN EFI_DEVICE_PATH **DevicePaths,
        FindVolumeAndFilename(DevicePaths[DevicePathIndex], &Volume, &Filename);
        // Some EFIs crash if attempting to load driver for invalid architecture, so
        // protect for this condition....
-       if (IsValidLoader(Volume->RootDir, Filename)) {
+       if ((LoaderType == TYPE_LEGACY) || IsValidLoader(Volume->RootDir, Filename)) {
           // NOTE: Below commented-out line could be more efficient if file were read ahead of
           // time and passed as a pre-loaded image to LoadImage(), but it doesn't work on my
           // 32-bit Mac Mini or my 64-bit Intel box when launching a Linux kernel; the
@@ -349,7 +353,7 @@ bailout:
 } /* static EFI_STATUS StartEFIImageList() */
 
 static EFI_STATUS StartEFIImage(IN EFI_DEVICE_PATH *DevicePath,
-                                IN CHAR16 *LoadOptions, IN CHAR16 *LoadOptionsPrefix,
+                                IN CHAR16 *LoadOptions, IN UINTN LoaderType,
                                 IN CHAR16 *ImageTitle, IN CHAR8 OSType,
                                 OUT UINTN *ErrorInStep,
                                 IN BOOLEAN Verbose)
@@ -358,7 +362,7 @@ static EFI_STATUS StartEFIImage(IN EFI_DEVICE_PATH *DevicePath,
 
     DevicePaths[0] = DevicePath;
     DevicePaths[1] = NULL;
-    return StartEFIImageList(DevicePaths, LoadOptions, LoadOptionsPrefix, ImageTitle, OSType, ErrorInStep, Verbose);
+    return StartEFIImageList(DevicePaths, LoadOptions, LoaderType, ImageTitle, OSType, ErrorInStep, Verbose);
 } /* static EFI_STATUS StartEFIImage() */
 
 // From gummiboot: Retrieve a raw EFI variable.
@@ -428,7 +432,7 @@ static VOID StartLoader(LOADER_ENTRY *Entry)
     UINTN ErrorInStep = 0;
 
     BeginExternalScreen(Entry->UseGraphicsMode, L"Booting OS");
-    StartEFIImage(Entry->DevicePath, Entry->LoadOptions, Basename(Entry->LoaderPath),
+    StartEFIImage(Entry->DevicePath, Entry->LoadOptions, TYPE_EFI,
                   Basename(Entry->LoaderPath), Entry->OSType, &ErrorInStep, !Entry->UseGraphicsMode);
     FinishExternalScreen();
 }
@@ -1606,7 +1610,7 @@ static VOID StartLegacy(IN LEGACY_ENTRY *Entry)
 
     ExtractLegacyLoaderPaths(DiscoveredPathList, MAX_DISCOVERED_PATHS, LegacyLoaderList);
 
-    Status = StartEFIImageList(DiscoveredPathList, Entry->LoadOptions, NULL, L"legacy loader", 0, &ErrorInStep, TRUE);
+    Status = StartEFIImageList(DiscoveredPathList, Entry->LoadOptions, TYPE_LEGACY, L"legacy loader", 0, &ErrorInStep, TRUE);
     if (Status == EFI_NOT_FOUND) {
         if (ErrorInStep == 1) {
             Print(L"\nPlease make sure that you have the latest firmware update installed.\n");
@@ -1917,7 +1921,7 @@ static VOID ScanLegacyExternal(VOID)
 static VOID StartTool(IN LOADER_ENTRY *Entry)
 {
    BeginExternalScreen(Entry->UseGraphicsMode, Entry->me.Title + 6);  // assumes "Start <title>" as assigned below
-   StartEFIImage(Entry->DevicePath, Entry->LoadOptions, Basename(Entry->LoaderPath),
+   StartEFIImage(Entry->DevicePath, Entry->LoadOptions, TYPE_EFI,
                  Basename(Entry->LoaderPath), Entry->OSType, NULL, TRUE);
    FinishExternalScreen();
 } /* static VOID StartTool() */
@@ -1967,7 +1971,7 @@ static UINTN ScanDriverDir(IN CHAR16 *Path)
         SPrint(FileName, 255, L"%s\\%s", Path, DirEntry->FileName);
         NumFound++;
         Status = StartEFIImage(FileDevicePath(SelfLoadedImage->DeviceHandle, FileName),
-                               L"", DirEntry->FileName, DirEntry->FileName, 0, NULL, FALSE);
+                               L"", TYPE_EFI, DirEntry->FileName, 0, NULL, FALSE);
     }
     Status = DirIterClose(&DirIter);
     if (Status != EFI_NOT_FOUND) {