]> code.delx.au - refind/commitdiff
Fixed filesystem driver bugs.
authorsrs5694 <srs5694@users.sourceforge.net>
Sat, 29 Mar 2014 02:40:18 +0000 (22:40 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Sat, 29 Mar 2014 02:40:18 +0000 (22:40 -0400)
NEWS.txt
docs/refind/configfile.html
docs/refind/features.html
docs/refind/installing.html
filesystems/fsw_btrfs.c
filesystems/fsw_efi.c
refind.conf-sample
refind/config.c
refind/global.h
refind/lib.c
refind/main.c

index ee7d3618445fef2c2d13e0cb7de1f6ea698679d2..a7fab5fa745445dbb6d72802f405aba45debaf0c 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,14 @@
 0.7.9 (?/??/2014):
 ------------------
 
+- Fixed some EFI filesystem driver bugs that could cause lockups under
+  some circumstances. These bugs could affect any of the filesystem
+  drivers.
+
+- Added "gdisk" option to the "showtools" configuration file token. When
+  active, this adds gdisk.efi or gdisk_{arch}.efi, if present in the
+  EFI\tools directory, to the tools row.
+
 - Fixed mistaken identification of the MOK utility as the "MOK utility
   utility."
 
index c246c43439d9f2545df8cf688a5db61d746f0041..95f2cb0e81168553637b6ab4ba080a2fe8e54a39 100644 (file)
@@ -184,9 +184,9 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <li>You can give the filesystem from which the boot loader is loaded a name that matches the OS name component of the icon filename. For instance, if you call your boot filesystem <tt>CentOS</tt>, it matches the <tt>os_centos.icns</tt> icon. This match is performed on a word-by-word basis within the name, with "words" being delimited by spaces, dashes (<tt>-</tt>), and underscores (<tt>_</tt>). Thus, a volume called <tt>Debian-boot</tt> will match <tt>os_debian.icns</tt> or <tt>os_boot.icns</tt>.</li>
 
-<li>Certain boot loaders have hard-coded icons associated with them. For instance, filenames beginning with <tt>vmlinuz</tt> or <tt>bzImage</tt> acquire Linux "Tux" icons and the <tt>bootmgfw.efi</tt> loader acquires a Windows icon. For the most part, these are the associations you want to overcome with the preceding rules, but sometimes renaming a boot loader to a more conventional name is the better approach.</li>
+<li>rEFInd attempts to guess the Linux distribution based on data in the <tt>/etc/os-release</tt> file. This file will only be accessible if a separate <tt>/boot</tt> partition is <i>not</i> used, though. Manually adjusting the <tt>os-release</tt> file to change an OS icon in rEFInd is <i>not</i> recommended.</li>
 
-<li>rEFInd attempts to guess the Linux distribution based on clues in the kernel's filename and data in the <tt>/etc/os-release</tt> file. This file will only be accessible if a separate <tt>/boot</tt> partition is <i>not</i> used, though. Fedora and Red Hat kernels can be identified by the presence of <tt>.fc</tt> or <tt>.el</tt> strings in their filenames, and so acquire suitable icons automatically. Manually adjusting the <tt>os-release</tt> file to change an OS icon in rEFInd is <i>not</i> recommended. Renaming a locally-compiled kernel so that it acquires a Fedora or Red Hat icon is reasonable, but I don't recommend renaming precompiled kernels unless you also manually copy them to the ESP.</li>
+<li>Certain boot loaders have hard-coded icons associated with them. For instance, filenames beginning with <tt>vmlinuz</tt> or <tt>bzImage</tt> acquire Linux "Tux" icon and the <tt>bootmgfw.efi</tt> loader acquires a Windows icon. Fedora and Red Hat kernels can be identified by the presence of <tt>.fc</tt> or <tt>.el</tt> strings in their filenames, and so acquire suitable icons automatically. For the most part, these are the associations you want to overcome with the preceding rules, but sometimes renaming a boot loader to a more conventional name is the better approach. Renaming a locally-compiled kernel so that it acquires a Fedora or Red Hat icon is reasonable, but I don't recommend renaming precompiled kernels unless you also manually copy them to the ESP.</li>
 
 </ul>
 
@@ -270,8 +270,8 @@ timeout 20
 </tr>
 <tr>
    <td><tt>showtools</tt></td>
-   <td><tt>shell</tt>, <tt>memtest</tt>, <tt>gptsync</tt>, <tt>apple_recovery</tt>, <tt>mok_tool</tt>, <tt>about</tt>, <tt>exit</tt>, <tt>shutdown</tt>, <tt>reboot</tt>, and <tt>firmware</tt></td>
-   <td>Specifies which tool tags to display on the second row. <tt>shell</tt> launches an EFI shell, <tt>memtest</tt> (or <tt>memtest86</tt> launches the <a href="http://www.memtest86.com/download.htm">Memtest86</a> program, <tt>gptsync</tt> launches a tool that creates a hybrid MBR, <tt>apple_recovery</tt> boots the OS X Recovery HD, <tt>windows_recovery</tt> boots a Windows recovery tool, <tt>mok_tool</tt> launches a tool to manage Machine Owner Keys (MOKs) on systems with Secure Boot active, <tt>about</tt> displays information about the program, <tt>exit</tt> terminates rEFInd, <tt>shutdown</tt> shuts down the computer (or reboots it, on some UEFI PCs), <tt>reboot</tt> reboots the computer, and <tt>firmware</tt> reboots the computer into the computer's own setup utility. The tags appear in the order in which you specify them. The default is <tt>shell, memtest, apple_recovery, mok_tool, about, shutdown, reboot, firmware</tt>. Note that the <tt>shell</tt>, <tt>memtest</tt>, <tt>apple_recovery</tt>, and <tt>mok_tool</tt> options all require the presence of programs not included with rEFInd. The <tt>gptsync</tt> option requires use of a like-named program which, although it ships with rEFInd 0.6.9 and later, is not installed by default except under OS X. See the <a href="installing.html#addons">"Installing Additional Components"</a> section of the <a href="installing.html">Installing rEFInd</a> page for pointers to the shell, Memtest86, and <tt>gptsync</tt> programs. The <tt>apple_recovery</tt> option will appear only if you've got an Apple Recovery HD partition (which has a boot loader called <tt>com.apple.recovery.boot/boot.efi</tt>). The <tt>firmware</tt> option works only on computers that support this option; on other computers, the option is quietly ignored. See the <a href="secureboot.html">Secure Boot</a> page for information on Secure Boot and MOK management.</td>
+   <td><tt>shell</tt>, <tt>memtest</tt>, <tt>gdisk</tt>, <tt>gptsync</tt>, <tt>apple_recovery</tt>, <tt>mok_tool</tt>, <tt>about</tt>, <tt>exit</tt>, <tt>shutdown</tt>, <tt>reboot</tt>, and <tt>firmware</tt></td>
+   <td>Specifies which tool tags to display on the second row. <tt>shell</tt> launches an EFI shell, <tt>memtest</tt> (or <tt>memtest86</tt>) launches the <a href="http://www.memtest86.com/download.htm">Memtest86</a> program, <tt>gdisk</tt> launches the partitioning tool of the same name, <tt>gptsync</tt> launches a tool that creates a hybrid MBR, <tt>apple_recovery</tt> boots the OS X Recovery HD, <tt>windows_recovery</tt> boots a Windows recovery tool, <tt>mok_tool</tt> launches a tool to manage Machine Owner Keys (MOKs) on systems with Secure Boot active, <tt>about</tt> displays information about the program, <tt>exit</tt> terminates rEFInd, <tt>shutdown</tt> shuts down the computer (or reboots it, on some UEFI PCs), <tt>reboot</tt> reboots the computer, and <tt>firmware</tt> reboots the computer into the computer's own setup utility. The tags appear in the order in which you specify them. The default is <tt>shell, memtest, gdisk, apple_recovery, mok_tool, about, shutdown, reboot, firmware</tt>. Note that the <tt>shell</tt>, <tt>memtest</tt>, <tt>apple_recovery</tt>, and <tt>mok_tool</tt> options all require the presence of programs not included with rEFInd. The <tt>gptsync</tt> option requires use of a like-named program which, although it ships with rEFInd 0.6.9 and later, is not installed by default except under OS X. See the <a href="installing.html#addons">"Installing Additional Components"</a> section of the <a href="installing.html">Installing rEFInd</a> page for pointers to the shell, Memtest86, and <tt>gptsync</tt> programs. The <tt>apple_recovery</tt> option will appear only if you've got an Apple Recovery HD partition (which has a boot loader called <tt>com.apple.recovery.boot/boot.efi</tt>). The <tt>firmware</tt> option works only on computers that support this option; on other computers, the option is quietly ignored. See the <a href="secureboot.html">Secure Boot</a> page for information on Secure Boot and MOK management.</td>
 </tr>
 <tr>
    <td><tt>font</tt></td>
index 44bb0ecaa9992fb86712668b2601f16f06da0d93..30e3258329fc43f8efc76c412a7e9953fa8f642d 100644 (file)
@@ -229,7 +229,7 @@ lack a usable CSM.</li>
 
 <li>Drivers for ISO-9660, HFS+, ext4fs, and Btrfs, which are not included in rEFIt. (The ISO-9660 driver is based on code from the rEFIt project, but was never completed by its original author. It was completed by Oracle for VirtualBox. The ext4fs driver is derived from the rEFIt ext2fs driver, and the Btrfs driver is derived from the rEFIt and GRUB 2.0 driver code.)</li>
 
-<li>Beginning with version 0.5.0, the ability to "talk" to the <a href="http://mjg59.dreamwidth.org/20303.html">shim boot loader</a> to validate binaries supported by shim or its machine owner key (MOK) list when booting with Secure Boot active. As of version 0.6.0, this support is still crude and buggy; it should be considered an alpha-level feature at the moment.</li>
+<li>Beginning with version 0.5.0, the ability to "talk" to the <a href="http://mjg59.dreamwidth.org/20303.html">shim boot loader</a> to validate binaries supported by shim or its machine owner key (MOK) list when booting with Secure Boot active.</li>
 
 <li>The <tt>gptsync</tt> utility, included with rEFInd 0.6.9 and later, has safety checks to prevent creating a fresh hybrid MBR if the MBR side has been adjusted without adjusting the GPT side&mdash;a common source of problems. This update also prioritizes partition inclusion in the hybrid MBR, which can help on disks that have many partitions. OTOH, as of rEFInd 0.6.9, this version of <tt>gptsync</tt> is relatively untested.</li>
 
index b4594363de8d5b589d5212fb878b7583ed67ca16..31d62f59336a8e9f3b9de73a0b0ba0df34301d44 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:
-3/9/2014, referencing rEFInd 0.7.8</p>
+3/23/2014, referencing rEFInd 0.7.8</p>
 
 
 <p>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>
@@ -944,7 +944,9 @@ $ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
 
 <p>Most of the reports of sluggish Macintosh boots I've seen note that the user installed rEFInd to the ESP rather than to the OS X root partition. Some users have reported that re-installing rEFInd to the OS X root partition clears up the problem. This is obviously a straightforward solution to the problem, if it works. Note that rEFInd can launch boot loaders that are stored on any partition that the EFI can read no matter where it's installed; therefore, you'll still be able to launch boot loaders stored on the ESP (or elsewhere) if you install it in this way.</p>
 
-<p>The biggest drawback to this approach is that you won't be able to edit the rEFInd configuration file or move rEFInd-related binaries from an EFI shell if you install it in this way, since Apple's HFS+ driver for EFI is read-only. (The same is true of rEFInd's HFS+ driver, so it won't help you overcome this limitation.) You may also be limited in making changes to your rEFInd configuration from Linux or other OSes, too, since Linux's HFS+ drivers disable write support by default on volumes with an active journal. You can force write access by using the <tt>force</tt> option to <tt>mount</tt>; however, this procedure is noted as being risky in the Linux HFS+ documentation, so I don't recommend doing this on a regular basis. As a compromise, you might try creating a small non-journaled HFS+ volume that's dedicated to holding rEFInd. You could even mount it as the Linux <tt>/boot</tt> partition, in which case it would also hold the Linux kernel and related files. You'll need to install rEFInd manually if you try this.</p>
+<p>A variant of this solution is to create a small (~100MiB) HFS+ volume to be used exclusively by rEFInd. You can then install rEFInd to that volume with the <tt>--ownhfs</tt> option to <tt>install.sh</tt>, as in <tt class="userinput">./install.sh --ownhfs /dev/disk0s6</tt> if the volume is <tt>/dev/disk0s6</tt>. This approach has the advantage that it can be managed via OS X's own Startup Disk tool in System Preferences.</p>
+
+<p>The biggest drawback to storing rEFInd on an HFS+ volume is that you won't be able to edit the rEFInd configuration file or move rEFInd-related binaries from an EFI shell if you install it in this way, since Apple's HFS+ driver for EFI is read-only. (The same is true of rEFInd's HFS+ driver, so it won't help you overcome this limitation.) You may also be limited in making changes to your rEFInd configuration from Linux or other OSes, too, since Linux's HFS+ drivers disable write support by default on volumes with an active journal. You can force write access by using the <tt>force</tt> option to <tt>mount</tt>; however, this procedure is noted as being risky in the Linux HFS+ documentation, so I don't recommend doing this on a regular basis on the OS X boot volume. This isn't as risky if you use a dedicated HFS+ rEFInd partition, though. You could even mount it as the Linux <tt>/boot</tt> partition, in which case it would also hold the Linux kernel and related files. If you use disk encryption, you can't store rEFInd on the OS X root (<tt>/</tt>) partition, but you could still use an (unencrypted) separate HFS+ partition.</p>
 
 <p>A variant of this solution is suggested in <a href="http://www.sparxeng.com/blog/software/fixing-slow-boot-on-a-triple-boot-mountain-lion-mac">this blog post,</a> which recommends placing rEFInd on an HFS+ volume on the first SATA channel. (In the blogger's case, that channel used to hold an optical drive, but that drive was replaced by a hard disk.)</p>
 
index 1cfab95438d57deb418b26ddae17e053aef4afcf..c05547de5006760c5ce6b1862a4d3e0f674ca211 100644 (file)
@@ -406,7 +406,7 @@ static fsw_status_t btrfs_read_superblock (struct fsw_volume *vol, struct btrfs_
             break;
 
         err = fsw_block_get(vol, superblock_pos[i], 0, (void **)&buffer);
-        if (err == FSW_UNSUPPORTED) {
+        if (err) {
             fsw_block_release(vol, superblock_pos[i], buffer);
             break;
         }
@@ -1862,7 +1862,7 @@ out:
 //
 
 struct fsw_fstype_table   FSW_FSTYPE_TABLE_NAME(btrfs) = {
-    { FSW_STRING_TYPE_UTF8, 4, 4, "btrfs" },
+    { FSW_STRING_TYPE_UTF8, 5, 5, "btrfs" },
     sizeof(struct fsw_btrfs_volume),
     sizeof(struct fsw_btrfs_dnode),
 
index 30982c32342d5224ca958351bf84cf4d8dc37400..49eccf9ce60075a8ab6121802c446db5c580befb 100644 (file)
@@ -556,6 +556,7 @@ fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *
    i = 0;
    do {
       if ((Caches[i].Volume == Volume) &&
+         (Caches[i].CacheValid == TRUE) &&
           (StartRead >= Caches[i].CacheStart) &&
           ((StartRead + vol->phys_blocksize) <= (Caches[i].CacheStart + CACHE_SIZE))) {
          ReadCache = i;
@@ -568,6 +569,7 @@ fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *
       if (LastRead == -1)
          LastRead = 1;
       ReadCache = 1 - LastRead; // NOTE: If NUM_CACHES > 2, this must become more complex
+      Caches[ReadCache].CacheValid = FALSE;
       if (Caches[ReadCache].Cache == NULL)
          Caches[ReadCache].Cache = AllocatePool(CACHE_SIZE);
       if (Caches[ReadCache].Cache != NULL) {
@@ -586,7 +588,7 @@ fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *
       } // if cache memory allocated
    } // if (ReadCache < 0)
 
-   if (Caches[ReadCache].Cache != NULL) {
+   if (Caches[ReadCache].Cache != NULL && Caches[ReadCache].CacheValid == TRUE) {
       CopyMem(buffer, &Caches[ReadCache].Cache[StartRead - Caches[ReadCache].CacheStart], vol->phys_blocksize);
    } else {
       ReadOneBlock = TRUE;
index ebca00fad2081916be1f26dc996ad6cba19ee4ae..8fca9fbd07b00a78b170b3ef345708f29426c827 100644 (file)
@@ -157,6 +157,7 @@ timeout 20
 #                     EFI/memtest, EFI/tools/memtest86, or EFI/tools/memtest
 #  gptsync          - the (dangerous) gptsync.efi utility (requires external
 #                     program; see rEFInd documentation for details)
+#  gdisk            - the gdisk partitioning program
 #  apple_recovery   - boots the Apple Recovery HD partition, if present
 #  windows_recovery - boots an OEM Windows recovery tool, if present
 #                     (see also the windows_recovery_files option)
@@ -169,9 +170,9 @@ timeout 20
 #  reboot           - a tag to reboot the computer
 #  firmware         - a tag to reboot the computer into the firmware's
 #                     user interface (ignored on older computers)
-# Default is shell,memtest,apple_recovery,windows_recovery,mok_tool,about,shutdown,reboot,firmware
+# Default is shell,memtest,gdisk,apple_recovery,windows_recovery,mok_tool,about,shutdown,reboot,firmware
 #
-#showtools shell, memtest, mok_tool, about, reboot, exit, firmware
+#showtools shell, gdisk, memtest, mok_tool, about, reboot, exit, firmware
 
 # Boot loaders that can launch a Windows restore or emergency system.
 # These tend to be OEM-specific.
index 58043aee7aff46affc912136cfa2d52fc9e148f8..447638f373f0350a4a08593c70949cdd56e84ae8 100644 (file)
@@ -532,6 +532,8 @@ VOID ReadConfig(CHAR16 *FileName)
                     GlobalConfig.ShowTools[i - 1] = TAG_SHELL;
                 } else if (StriCmp(FlagName, L"gptsync") == 0) {
                     GlobalConfig.ShowTools[i - 1] = TAG_GPTSYNC;
+                } else if (StriCmp(FlagName, L"gdisk") == 0) {
+                   GlobalConfig.ShowTools[i - 1] = TAG_GDISK;
                 } else if (StriCmp(FlagName, L"about") == 0) {
                    GlobalConfig.ShowTools[i - 1] = TAG_ABOUT;
                 } else if (StriCmp(FlagName, L"exit") == 0) {
index c45acda50be19c4d9ab197f62a95eb71f304d4a8..586ff9b5abd5079954562a10034079660c5fe193 100644 (file)
@@ -73,7 +73,8 @@
 #define TAG_MOK_TOOL         (13)
 #define TAG_FIRMWARE         (14)
 #define TAG_MEMTEST          (15)
-#define NUM_TOOLS            (16)
+#define TAG_GDISK            (16)
+#define NUM_TOOLS            (17)
 
 #define NUM_SCAN_OPTIONS 10
 
index dc187c6f8cb36783375a088c7a7539624f4ff4fc..7ee9c4c2cbe5458768eb893da99495b1c2ced934 100644 (file)
@@ -637,7 +637,7 @@ static VOID ScanVolumeBootcode(REFIT_VOLUME *Volume, BOOLEAN *Bootable)
 
         // dummy FAT boot sector (created by iPartition)
         if ((FindMem(Buffer, 512, "Medienfehler", 12) >= 0) &&
-            (FindMem(Buffer, 512, "Neustart: Taste dr\x81" "ken", 22) >= 0))
+            (FindMem(Buffer, 512, "Neustart: Taste dr\x81" "cken", 22) >= 0))
             Volume->HasBootCode = FALSE;
 
         // check for MBR partition table
@@ -709,7 +709,7 @@ static CHAR16 *SizeInIEEEUnits(UINT64 SizeInBytes) {
       SPrint(TheValue, 255, L"%ld%s", SizeInIeee, Units);
    } // if
    return TheValue;
-} // CHAR16 *SizeInSIUnits()
+} // CHAR16 *SizeInIEEEUnits()
 
 // Return a name for the volume. Ideally this should be the label for the
 // filesystem it contains, but this function falls back to describing the
index 566b87ddcc4579abddf55da1da61eef18490d840..4f0b0b7fb6d187e4e67b68673900259ddf404007 100644 (file)
@@ -75,6 +75,7 @@
 #if defined (EFIX64)
 #define SHELL_NAMES             L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellx64.efi,\\shell.efi,\\shellx64.efi"
 #define GPTSYNC_NAMES           L"\\EFI\\tools\\gptsync.efi,\\EFI\\tools\\gptsync_x64.efi"
+#define GDISK_NAMES             L"\\EFI\\tools\\gdisk.efi,\\EFI\\tools\\gdisk_x64.efi"
 #define MEMTEST_NAMES           L"memtest86.efi,memtest86_x64.efi,memtest86x64.efi,bootx64.efi"
 #define DRIVER_DIRS             L"drivers,drivers_x64"
 #define FALLBACK_FULLNAME       L"EFI\\BOOT\\bootx64.efi"
@@ -83,6 +84,7 @@
 #elif defined (EFI32)
 #define SHELL_NAMES             L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellia32.efi,\\shell.efi,\\shellia32.efi"
 #define GPTSYNC_NAMES           L"\\EFI\\tools\\gptsync.efi,\\EFI\\tools\\gptsync_ia32.efi"
+#define GDISK_NAMES             L"\\EFI\\tools\\gdisk.efi,\\EFI\\tools\\gdisk_ia32.efi"
 #define MEMTEST_NAMES           L"memtest86.efi,memtest86_ia32.efi,memtest86ia32.efi,bootia32.efi"
 #define DRIVER_DIRS             L"drivers,drivers_ia32"
 #define FALLBACK_FULLNAME       L"EFI\\BOOT\\bootia32.efi"
@@ -91,6 +93,7 @@
 #else
 #define SHELL_NAMES             L"\\EFI\\tools\\shell.efi,\\shell.efi"
 #define GPTSYNC_NAMES           L"\\EFI\\tools\\gptsync.efi"
+#define GDISK_NAMES             L"\\EFI\\tools\\gdisk.efi"
 #define MEMTEST_NAMES           L"memtest86.efi"
 #define DRIVER_DIRS             L"drivers"
 #define FALLBACK_FULLNAME       L"EFI\\BOOT\\boot.efi" /* Not really correct */
@@ -134,8 +137,8 @@ static REFIT_MENU_SCREEN AboutMenu      = { L"About", NULL, 0, NULL, 0, NULL, 0,
 REFIT_CONFIG GlobalConfig = { FALSE, FALSE, 0, 0, 0, DONT_CHANGE_TEXT_MODE, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0, 0,
                               { DEFAULT_BIG_ICON_SIZE / 4, DEFAULT_SMALL_ICON_SIZE, DEFAULT_BIG_ICON_SIZE }, BANNER_NOSCALE,
                               NULL, NULL, CONFIG_FILE_NAME, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                              { TAG_SHELL, TAG_MEMTEST, TAG_APPLE_RECOVERY, TAG_WINDOWS_RECOVERY, TAG_MOK_TOOL, TAG_ABOUT,
-                                TAG_SHUTDOWN, TAG_REBOOT, TAG_FIRMWARE, 0, 0, 0, 0, 0, 0 }
+                              { TAG_SHELL, TAG_MEMTEST, TAG_GDISK, TAG_APPLE_RECOVERY, TAG_WINDOWS_RECOVERY, TAG_MOK_TOOL,
+                                TAG_ABOUT, TAG_SHUTDOWN, TAG_REBOOT, TAG_FIRMWARE, 0, 0, 0, 0, 0, 0 }
                             };
 
 EFI_GUID GlobalGuid = EFI_GLOBAL_VARIABLE;
@@ -156,7 +159,7 @@ static VOID AboutrEFInd(VOID)
 {
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.8.2");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.8.4");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2014 Roderick W. Smith");
@@ -2297,6 +2300,18 @@ static VOID ScanForTools(VOID) {
             FileName = NULL;
             break;
 
+         case TAG_GDISK:
+            j = 0;
+            while ((FileName = FindCommaDelimited(GDISK_NAMES, j++)) != NULL) {
+               if (FileExists(SelfRootDir, FileName)) {
+                  AddToolEntry(SelfLoadedImage->DeviceHandle, FileName, L"disk partitioning tool",
+                               BuiltinIcon(BUILTIN_ICON_TOOL_PART), 'G', FALSE);
+               } // if
+               MyFreePool(FileName);
+            } // while
+            FileName = NULL;
+            break;
+
          case TAG_APPLE_RECOVERY:
             FileName = StrDuplicate(L"\\com.apple.recovery.boot\\boot.efi");
             for (VolumeIndex = 0; VolumeIndex < VolumesCount; VolumeIndex++) {