From 92a37087e2c2cab21d68e0328f1408912869e6fa Mon Sep 17 00:00:00 2001 From: srs5694 Date: Fri, 1 Nov 2013 23:03:48 -0400 Subject: [PATCH] Change to install.sh to fix bug when installing to ESP on recent versions of OS X. --- NEWS.txt | 3 +++ docs/refind/drivers.html | 2 ++ docs/refind/index.html | 2 ++ docs/refind/themes.html | 4 +++- install.sh | 3 ++- refind/lib.c | 5 +++++ 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index cc6651d..20bda5a 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,9 @@ 0.7.5 (10/??/2013): ------------------- +- Fixed bug that caused rEFInd to hang on some Macs when multiple EFI + drivers were present. + - Fixed bug that caused clear to default gray screen when launching OSes with 'use_graphics_for' enabled, even when the rEFInd background is not gray. Now rEFInd clears to the same background color used in its menu. diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index cd67781..2550030 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -286,6 +286,8 @@ fs0: map -r
  • Ext2Pkg—This driver, based on bitbucket and with a backup on github, appears to be an ext2fs/ext3fs driver built independently of the driver written by Christoph Pfisterer. The linked-to sites provide access to source code via git but do not provide binaries. When I built binaries, they failed to work. Under VirtualBox, the driver loaded but then hung when I tried to access an ext2 filesystem. On a 32-bit Mac Mini, I got error messages when I tried to access an ext2 filesystem. As I write, the code was last updated in March of 2012. If you check the project and it's been updated more recently, it might be worth trying. Otherwise, I can't recommend this driver. I mention it here only in case it improves in the future.
  • +
  • Paragon's UFSD—According to this blog post, Paragon Software has ported its Universal File System Drivers (UFSD) to EFI, providing "transparent access to NTFS, HFS+, ExFAT, and ExtFS" (sic). The entry doesn't provide any download links, and it's unclear if the product is (or will be) available for free or on a pay basis. I haven't tried these drivers, so I can't comment on their quality.
  • +

    Most of these cross-project drivers appear to be related, and most of them have fed into rEFInd's drivers. I used the Clover package, which in turn was based on the VirtualBox drivers, as a starting point. Everybody else has dropped rEFIt's original ReiserFS driver, but I added that back. Of these drivers, only the Clover EFI Tools NTFS driver is missing from rEFInd. Specific versions can have their own quirks, though. For instance, the Clover (and I suspect VirtualBox) drivers don't return volume labels, which causes rEFInd to display loaders on those volumes as being on a disk called Unknown. (I fixed that bug for rEFInd's version, and it wasn't present in the original rEFIt drivers.) Most of these drivers also suffer from speed problems on some computers. This is worst with the ext2fs drivers under VirtualBox; on my main computer, that combination takes 3 minutes to load a Linux kernel and initial RAM disk file! Most real computers don't suffer nearly so badly, but some can take an extra five seconds or so to boot a kernel. I've fixed the speed problems in rEFInd's drivers as of version 0.7.0.

    diff --git a/docs/refind/index.html b/docs/refind/index.html index b7df704..a094f70 100644 --- a/docs/refind/index.html +++ b/docs/refind/index.html @@ -200,6 +200,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • My own EFI Boot Loaders for Linux page provides information on installing and configuring several common Linux EFI boot loaders and boot managers.
  • +
  • My Linux on UEFI: A Quick Installation Guide page provides helpful tips on how to install Linux on EFI-based systems.
  • +
  • Phoenix Technologies maintains a wiki on EFI topics, including information on many EFI system calls useful to programmers.
  • Matthew J. Garrett, the developer of the shim boot loader to manage Secure Boot, maintains a blog in which he often writes about EFI issues.
  • diff --git a/docs/refind/themes.html b/docs/refind/themes.html index 15c5418..bc5efb3 100644 --- a/docs/refind/themes.html +++ b/docs/refind/themes.html @@ -266,7 +266,7 @@ to be tedious.

    I used icons from the Oxygen Icons project, both from the Oxygen Refit package and from Gentoo's oxygen-icons package. These icons supplemented or replaced icons that rEFIt used; however, many OS icons (such as those for Windows and Mac OS) are carried over from rEFIt. I've also used a handful of icons for individual Linux distributions from other sources—usually documentation associated with the distribution in question.

    -

    In addition to this default icon set, I've received word of two other rEFInd themes:

    +

    In addition to this default icon set, I've received word of three other rEFInd themes:

    If you've created or discovered another rEFInd theme, please tell me about it so that I can provide a link to it from this page.

    diff --git a/install.sh b/install.sh index 2239a72..645c1b4 100755 --- a/install.sh +++ b/install.sh @@ -33,6 +33,7 @@ # # Revision history: # +# 0.7.5 -- Fixed bug when installing to ESP on recent versions of OS X # 0.7.2 -- Fixed code that could be confused by use of autofs to mount the ESP # 0.7.0 -- Added support for the new Btrfs driver # 0.6.12 -- Added support for PreLoader as well as for shim @@ -411,7 +412,7 @@ MountOSXESP() { Temp=`diskutil list | grep " EFI "` Esp=/dev/`echo $Temp | cut -f 5 -d ' '` # If the ESP is mounted, use its current mount point.... - Temp=`df | grep "$Esp"` + Temp=`df -P | grep "$Esp"` InstallDir=`echo $Temp | cut -f 6 -d ' '` if [[ "$InstallDir" == '' ]] ; then mkdir /Volumes/ESP &> /dev/null diff --git a/refind/lib.c b/refind/lib.c index 2e06c96..ee8acd9 100644 --- a/refind/lib.c +++ b/refind/lib.c @@ -201,6 +201,11 @@ EFI_STATUS InitRefitLib(IN EFI_HANDLE ImageHandle) // called before running external programs to close open file handles VOID UninitRefitLib(VOID) { + // This piece of code was made to correspond to weirdness in ReinitRefitLib(). + // See the comment on it there. + if(SelfRootDir == SelfVolume->RootDir) + SelfRootDir=0; + UninitVolumes(); if (SelfDir != NULL) { -- 2.39.2