which builds the drivers and places copies in both the filesystems and
drivers_{arch} subdirectories. If you want to build just one driver, you
can change into the "filesystems" directory and type "make {fsname}", where
-{fsname} is a filesystem name -- "ext2", "ext4fs", "reiserfs", "iso9660",
+{fsname} is a filesystem name -- "ext2", "ext4", "reiserfs", "iso9660",
or "hfs".
To install drivers, you can type "make install" in the "filesystems"
* The code for editing boot options (cursor_left(), cursor_right(), and
line_edit() in screen.c) is taken from gummiboot.
+
+* Stefan Agner (stefan@agner.ch) turned the original ext2fs/ext3fs driver
+ into one that can read ext4fs.
0.5.2 (12/??/2012):
-------------------
+- Fixed a memory allocation bug that could cause a program crash when
+ specifying certain values with the "also_scan_dirs", "dont_scan_volumes",
+ "dont_scan_dirs", "dont_scan_files", and "scan_driver_dirs" refind.conf
+ options.
+
+- Modified Linux kernel initrd-finding code so that if an initrd is
+ specified in refind_linux.conf, rEFInd will not add any initrd it finds.
+ This enables an override of the default initrd, and is likely to be
+ particularly helpful to Arch Linux users.
+
- Added ext4fs driver!
-- Made "boot" the default value for "also_scan_dirs.
+- Made "boot" the default value for "also_scan_dirs".
- Added identifying screen header to line editor.
generated by install.sh. This entry boots without the options extracted
from the /etc/default/grub file.
+- Added keys subdirectory to main distribution, to hold public Secure
+ Boot/shim keys from known sources.
+
+- Changed install.sh --drivers option to --alldrivers, added new
+ --nodrivers option, and made the default on Linux to install the one
+ driver that's used on /boot (or the root filesystem if /boot isn't a
+ separate partition). Of course, this won't install a non-existent driver,
+ and it also won't work properly if run from an emergency disk unless you
+ mount a separate /boot partition at that location.
+
- Fixed bug in install.sh that prevented creation of refind_linux.conf file
on Linux systems.
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>\r
\r
<p>Originally written: 3/14/2012; last Web page update:\r
-12/11/2012, referencing rEFInd 0.5.1</p>\r
+12/16/2012, referencing rEFInd 0.6.0</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
\r
<p>A casual reader might easily overlook this option, or misinterpret it to mean that the feature is much less important than it is. In fact, this particular motherboard offers very poor control over its EFI vs. BIOS booting features. (See <a href="http://www.rodsbooks.com/gb-hybrid-efi/">my Web page on this EFI implementation</a> for details.)</p>\r
\r
-<p>Some manuals omit even mention of EFI, and instead refer to "legacy boot" or some similar term, referring to BIOS-style booting. Such references may imply that the firmware supports EFI booting if the "legacy boot" mode is disabled or restricted in some way.</p>\r
+<p>Some manuals omit even mention of EFI, and instead refer to "legacy boot" or some similar term, referring to BIOS-style booting. The firmware for my ASUS P8H77-I motherboard uses the technical term <i>CSM,</i> which of course will be baffling to the uninitiated. (I referred to it earlier. It's the <i>Compatibility Support Module</i>—in other words, the BIOS support code.) Such references may imply that the firmware supports EFI booting if the "legacy boot" mode is disabled or restricted in some way.</p>\r
\r
<p>Understated EFI features often indicate a slapdash approach to EFI. Such systems sometimes implement EFI as a layer atop a conventional BIOS. More modern EFIs, though, completely replace the BIOS. Some manufacturers, such as ASUS and its sibling ASRock, are now actively promoting their more advanced EFI implementations. Such products often come with flashy new GUIs in their firmware.</p>\r
\r
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/11/2012, referencing rEFInd 0.5.1</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
</tr>
<tr>
<td><tt>scan_delay</tt></td>
- <td>Numeric (integer) value</td>
+ <td>numeric (integer) value</td>
<td>Imposes a delay before rEFInd scans for disk devices. Ordinarily this is not necessary, but on some systems, some disks (particularly external drives and optical discs) can take a few seconds to become available. If some of your disks don't appear when rEFInd starts but they <i>do</i> appear when you press the Esc key to re-scan, try uncommenting this option and setting it to a modest value, such as <tt>2</tt>, <tt>5</tt>, or even <tt>10</tt>. The default is <tt>0</tt>.</td>
</tr>
<tr>
<td><tt>also_scan_dirs</tt></td>
<td>directory path(s)</td>
- <td>Adds the specified directory or directories to the directory list that rEFInd scans for EFI boot loaders when <tt>scanfor</tt> includes the <tt>internal</tt>, <tt>external</tt>, or <tt>optical</tt> options. Directories are specified relative to the filesystem's root directory. If this option is used, it's applied to <i>all</i> the filesystems that rEFInd scans. If a specified directory doesn't exist, rEFInd ignores it (no error results).</td>
+ <td>Adds the specified directory or directories to the directory list that rEFInd scans for EFI boot loaders when <tt>scanfor</tt> includes the <tt>internal</tt>, <tt>external</tt>, or <tt>optical</tt> options. Directories are specified relative to the filesystem's root directory. If this option is used, it's applied to <i>all</i> the filesystems that rEFInd scans. If a specified directory doesn't exist, rEFInd ignores it (no error results). The default value is <tt>boot</tt>, which is useful for locating Linux kernels when you have an EFI driver for your Linux root (<tt>/</tt>) filesystem.</td>
+</tr>
+<tr>
+ <td><tt>dont_scan_volumes</tt> or <tt>don't_scan_volumes</tt></td>
+ <td>filesystem label(s)</td>
+ <td>Adds the specified volume or volumes to a volume "blacklist"—these filesystems are <i>not</i> scanned for EFI boot loaders. This may be useful to keep unwanted EFI boot entries, such as for a Macintosh recovery partition, from appearing on the main list of boot loaders.</td>
</tr>
<tr>
<td><tt>dont_scan_dirs</tt> or <tt>don't_scan_dirs</tt></td>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-12/11/2012, referencing rEFInd 0.5.1</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
<li><b>Ext4fs</b>—Stefan Agner modified the rEFIt/rEFInd ext2fs
driver so that it could handle ext4fs. I'm including this as a separate
- driver from the ext2fs driver, although the ext4fs version seems to be
- able to handle ext2fs and ext3fs, too.</li>
+ driver from the ext2fs driver, although the ext4fs version can handle
+ ext2fs and ext3fs, too. (I may eventually retire the original ext2fs
+ driver, but I want to be conservative about this in case there's an
+ undiscovered problem with the new driver.) This driver has some
+ limitations. Most notably, for various reasons it maxes out at 16TiB
+ and won't mount any ext4 filesystem that's larger than this. It also
+ doesn't support the <tt>meta_bg</tt> option flag; if your filesystem
+ uses this flag, this driver refuses to read it. You can learn about
+ your ext2/3/4 filesystem features by typing <tt
+ class="userinput">dumpe2fs <i>/dev/sda2</i> | grep features</tt>,
+ changing <tt class="userinput"><i>/dev/sda2</i></tt> to your
+ filesystem's device.</li>
<li><b>ISO-9660</b>—This driver originated with rEFIt's author, but
he never released a final version. Its code was improved by Oracle for
<p>All of these drivers rely on filesystem wrapper code written by rEFIt's author, Christoph Phisterer. They all suffer from speed problems on some systems, as described later in <a href="#notes">"Notes on Specific Drivers;"</a> however, these problems are very minor on most systems.</p>
-<p class="sidebar"><b>Note:</b> rEFInd's <tt>install.sh</tt> script does not install drivers by default. It does if you pass it the <tt>--drivers</tt> option, though. If you installed manually, you may also have installed rEFInd's drivers. See the <a href="installing.html">Installing rEFInd</a> page for details.</p>
+<p class="sidebar"><b>Note:</b> rEFInd's <tt>install.sh</tt> script does not install drivers by default on OS X, but on Linux, it installs the driver required to read the <tt>/boot</tt> directory, if one is available. The script installs all the available drivers if you pass it the <tt>--drivers</tt> option. See the <a href="installing.html">Installing rEFInd</a> page for details.</p>
<p>If you want to use one or more of these drivers, you can install them from the rEFInd binary package from the <tt>refind/drivers_<tt class="variable">arch</tt></tt> directory, where <tt class="variable">arch</tt> is a CPU architecture code—<tt>x64</tt> or <tt>ia32</tt>. The files are named after the filesystems they handle, such as <tt>ext2_x64.efi</tt> for the 64-bit ext2fs driver. You should copy the files for the filesystems you want to use to the <tt>drivers</tt> or <tt>drivers_<tt class="variable">arch</tt></tt> subdirectory of the main rEFInd installation directory. (You may need to create this subdirectory.) Be careful to install drivers only for your own architecture. Attempting to load drivers for the wrong CPU type will cause a small delay at best, or may cause the computer to crash at worst. I've placed rEFInd's drivers in directories that are named to minimize this risk, but you should exercise care when copying driver files.</p>
<h2>Notes on Specific Drivers</h2>
</a>
-<p>I've tested several of the drivers described on this page on a handful of systems. The Pfisterer ext2fs driver (from any source) works on both ext2fs and ext3fs, but not on ext4fs—but Agner's derivative ext4fs driver handles ext4fs, so that's not a problem. The ReiserFS driver is obviously useful only on ReiserFS partitions. (Reiser4 is not supported, as far as I know.) Given that ext2fs, ext3fs, and ReiserFS are getting a bit on in age by Linux standards, you might do well to use them on a separate Linux <tt>/boot</tt> partition; however, if you're willing to use ext3fs or ReiserFS on your root (<tt>/</tt>) filesystem, you can use the EFI drivers to read your kernel from it. If you use ext4fs on your root (<tt>/</tt>) filesystem, you can use the ext4fs driver rather than a separate <tt>/boot</tt> partition. Note that this assumes you use conventional partitions; to the best of my knowledge, there's no EFI driver for Linux's Logical Volume Manager (LVM) or Redundant Array of Independent Disks (RAID) configurations, so the EFI can't access filesystems stored in these ways.</p>
+<p>I've tested several of the drivers described on this page on a handful of systems. The Pfisterer ext2fs driver (from any source) works on both ext2fs and ext3fs, but not on ext4fs—but Agner's derivative ext4fs driver handles ext4fs, so that's not a problem. The ReiserFS driver is obviously useful only on ReiserFS partitions. (Reiser4 is not supported, as far as I know.) Given that ext2fs, ext3fs, and ReiserFS are getting a bit on in age by Linux standards, you might do well to use them on a separate Linux <tt>/boot</tt> partition; however, if you're willing to use ext3fs, ext4fs, or ReiserFS on your root (<tt>/</tt>) filesystem, you can use the EFI drivers to read your kernel from it. Note that this assumes you use conventional partitions; to the best of my knowledge, there's no EFI driver for Linux's Logical Volume Manager (LVM) or Redundant Array of Independent Disks (RAID) configurations, so the EFI can't access filesystems stored in these ways.</p>
<p>The Pfisterer ReiserFS and ext2fs drivers work, but they are a bit sluggish—particularly the ext2fs driver. The Agner ext4fs driver, when handling an actual ext4 filesystem, is in-between these two drivers in speed. The extent of the problem depends on the computer. In my tests so far, VirtualBox has fared the worst. On it, loading a Linux kernel with EFI stub loader from a FAT partition takes 2 seconds, from the moment of selecting the OS in rEFInd to the moment the kernel messages begin to appear. The equivalent time using ReiserFS or HFS+ is 20 seconds, with ext4fs it's 75 seconds, and with ext2fs it's 200 seconds (that is, 3 minutes and 20 seconds). On a 32-bit Mac Mini, though, the speed problem is much less pronounced—my kernel loads in just 3 seconds from a ReiserFS partition and in 13 seconds from an ext2 filesystem. Speeds were similar with my newest computer, an ASUS P8H77-I board. Times with ext2fs on a UEFI PC with an Intel motherboard are in the 2–4 second range. If you try the ext2fs driver and it seems to hang, be patient; it may finally boot up. If so, and if the delay is too great for you to accept, you might consider using ext4fs or ReiserFS instead of ext2fs or ext3fs, at least if a change is practical. (For a <tt>/boot</tt> partition, it almost certainly is practical; you can back it up quite easily, create a fresh filesystem on it, and restore it. You may need to adjust your <tt>/etc/fstab</tt> entry for a new UUID value, though. As noted earlier, be sure to use <tt>notail</tt> as an option in <tt>/etc/fstab</tt> for ReiserFS if you want to read it from EFI.) You can even use HFS+ on a Linux <tt>/boot</tt> partition, although this makes the most sense on a Mac, which has its own EFI HFS+ driver. Of course, you can also create a FAT <tt>/boot</tt> partition and not deal with drivers at all. Mounting your ESP at <tt>/boot</tt> is a practical solution for many users.</p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/11/2012, referencing rEFInd 0.5.1</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
<li>Inclusion of drivers for the Linux ReiserFS and ext2 filesystems in the
main package. (These drivers are absent from rEFInd prior to version
- 0.4.0; and the rEFInd versions don't work on at least some Macs.)</li>
+ 0.4.0.)</li>
</ul>
<li>The ability to specify additional directories to scan for boot loaders and drivers (as of version 0.2.7).</li>
-<li>The ability to specify directories to <i>not</i> be scanned for boot loaders, even if they would ordinarily be scanned (as of version 0.4.2).</li>
+<li>The ability to specify volumes and directories to <i>not</i> be scanned for boot loaders, even if they would ordinarily be scanned (as of version 0.6.0 for volumes and 0.4.2 for directories).</li>
<li>The ability to re-scan boot loaders, to assist when changing removable media or after making a change to the configuration file with an EFI shell (as of version 0.3.5).</li>
<li>The ability to specify an additional icon storage directory, to assist in efforts to customize rEFInd's appearance (as of version 0.3.4).</li>
-<li>The ability to set the screen's resolution, within limits imposed by the EFI (as of rEFInd 0.3.0).</li>
+<li>The ability to set the screen's graphics resolution, within limits imposed by the EFI (as of rEFInd 0.3.0). Similarly, as of version 0.6.0, you can specify the text-mode resolution.</li>
<li>Proper handling of more OS options than can fit on the screen. (rEFIt displays an empty list in graphical mode when it detects too many OSes.)</li>
<li>An "exit" option (disabled by default), so that you can return to whatever shell or boot manager you used to launch rEFInd, should this ability be desirable. (This feature first appeared in rEFInd 0.2.4.)</li>
-<li>Drivers for ISO-9660 and HFS+, 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.)</li>
+<li>Drivers for ISO-9660, HFS+, and ext4fs, 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.)</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 in EFI mode. As of version 0.5.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. 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>
</ul>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/12/2012, referencing rEFInd 0.5.1.1</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
<ul>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.5.1.1/refind-src-0.5.1.1.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.0/refind-src-0.6.0.zip/download">A
source code zip file</a></b>—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
possible, but I've not attempted it.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.5.1.1/refind-bin-0.5.1.1.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.0/refind-bin-0.6.0.zip/download">A
binary zip file</a></b>—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
<p class="sidebar"><b>Tip:</b> If you want a bootable USB flash drive, download the binary zip file or CD-R image file, prepare a USB flash drive with a FAT32 ESP, and then use the <tt>install.sh</tt> program's <tt>--usedefault</tt> option, as in <tt class="userinput">bash install.sh --usedefault /dev/sdd1</tt> to install to the first partition 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.5.1.1/refind-cd-0.5.1.1.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.0/refind-cd-0.6.0.zip/download">A
CD-R image file</a></b>—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
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/11/2012, referencing rEFInd 0.5.1</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/13/2012, referencing rEFInd 0.5.1.2</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
<p class="sidebar"><b>Important:</b> A rEFInd zip file, when uncompressed, creates a directory called <tt>refind-<i>version</i></tt>, where <tt><i>version</i></tt> is the version number. This directory includes a subdirectory called <tt>refind</tt> that holds the boot loader, along with another that holds documentation, as well as miscellaneous files in <tt>refind-<i>version</i></tt> itself. When I refer to "the <tt>refind</tt> directory" on this page, I mean the directory with that precise name, not the <tt>refind-<i>version</i></tt> directory that is its parent.</p>
-<p>Once you've uncompressed a rEFInd binary zip file, you must install it to your computer's ESP (or conceivably to some other location). The details of how you do this depend on your OS and your computer (UEFI-based PC vs. Macintosh). The upcoming sections provide details. For Linux and Mac OS X, you can use the installation script, <a href="#installsh"><tt>install.sh</tt>,</a> which provides easy one-command installation on most systems. Occasionally this script will fail, though, so I also provide explicit instructions for <a href="#linux">Linux</a> and <a href="#osx">Mac OS X.</a> Installation under <a href="#windows">Windows</a> also must be done manually. In some cases, you'll have to deviate from the default naming conventions, as described in <a href="#naming">a section on this topic.</a> If you're upgrading rEFInd, see the <a href="#upgrading">section on upgrading.</a> Finally, I describe how to install some <a href="#addons">additional components</a> you might find useful.</a> Note that this page describes installing the main rEFInd program; if you want to use the EFI filesystem drivers included with rEFInd, you should consult the <a href="drivers.html">page on using drivers with rEFInd.</a></p>
+<p>Once you've uncompressed a rEFInd binary zip file, you must install it to your computer's ESP (or conceivably to some other location). The details of how you do this depend on your OS and your computer (UEFI-based PC vs. Macintosh). The upcoming sections provide details. For Linux and Mac OS X, you can use the installation script, <a href="#installsh"><tt>install.sh</tt>,</a> which provides easy one-command installation on most systems. Occasionally this script will fail, though, so I also provide explicit instructions for <a href="#linux">Linux</a> and <a href="#osx">Mac OS X.</a> Installation under <a href="#windows">Windows</a> also must be done manually. In some cases, you'll have to deviate from the default naming conventions, as described in <a href="#naming">a section on this topic.</a> If you're upgrading rEFInd, see the <a href="#upgrading">section on upgrading.</a> Finally, I describe how to install some <a href="#addons">additional components</a> you might find useful.</a></p>
<a name="installsh">
<h2>Installing rEFInd Using <tt>install.sh</tt> under Linux or Mac OS X</h2>
though; because of the popularity of dual boots with Windows on Macs,
the BIOS/legacy scans are enabled by default on Macs.</li>
+<li>On Linux, <tt>install.sh</tt> checks the filesystem type of the
+ <tt>/boot</tt> directory and, if a matching filesystem driver is
+ available, installs it. Note that the "<tt>/boot</tt> directory" may be
+ on a separate partition or it may be part of your root (<tt>/</tt>)
+ filesystem, in which case the driver for your root filesystem is
+ installed. If <tt>install.sh</tt> detects that the filesystem in
+ question is ext2fs or ext3fs, it installs the ext4fs driver, which can
+ handle all three of these filesystem types. This feature is unlikely to
+ work properly from an emergency system, although it might if you have a
+ separate <tt>/boot</tt> partition and if you mount that partition at
+ <tt>/boot</tt> in your emergency system, and the ESP at
+ <tt>/boot/efi</tt>.</li>
+
<li>If you run <tt>install.sh</tt> on Linux and if
<tt>/boot/refind_linux.conf</tt> doesn't already exist,
- <tt>install.sh</tt> creates this file and populates it with a couple of
+ <tt>install.sh</tt> creates this file and populates it with a few
sample entries. If <tt>/boot</tt> is on a FAT partition (or HFS+ on a
- Mac), or if it's on an ext2fs, ext3fs, ReiserFS, or HFS+ partition and
- you install an appropriate driver (as <tt>install.sh</tt> does
- automatically when run from your working Linux installation), the
+ Mac), or if it's on an ext2fs, ext3fs, ext4fs, ReiserFS, or HFS+
+ partition and you install an appropriate driver, the
result is that rEFInd will detect your kernel and will probably boot it
correctly. Some systems will require manual tweaking to
<tt>refind_linux.conf</tt>, though—for instance, to add
<li>Type <tt><b>rm refind_ia32.efi</b></tt> to remove the IA32 binary if you're using an <i>x</i>86-64 (64-bit) system; or type <tt><b>rm refind_x64.efi</b></tt> to remove the <i>x</i>86-64 binary if you're using an <i>x</i>86 (32-bit) system. You can optionally rename the binary you keep as <tt>refind.efi</tt>, but this isn't required. (Note that you must keep the version that's the correct bit width for your EFI; if you've installed a 32-bit Linux on a 64-bit PC with a 64-bit EFI, you'd keep <tt>refind_x64.efi</tt>.</li>
-<li>Optionally, type <tt class="userinput">rm -r drivers_ia32</tt> to remove the <i>x</i>86 drivers from an <i>x</i>86-64 system, or <tt class="userinput">rm -r drivers_x64</tt> to remove the <i>x</i>86-64 drivers from a 32-bit <i>x</i>86 system. You may also want to remove some or all of the drivers for the architecture you are using; if you don't need them, they'll slow down the start process. See the <a href="drivers.html">page on drivers</a> for more on this topic.</li>
+<li>Optionally, type <tt class="userinput">rm -r drivers_ia32</tt> to remove the <i>x</i>86 drivers from an <i>x</i>86-64 system, or <tt class="userinput">rm -r drivers_x64</tt> to remove the <i>x</i>86-64 drivers from a 32-bit <i>x</i>86 system. You may also want to remove some or all of the drivers for the architecture you are using. If you don't need them, they'll slow down the start process, and worse, if you're using Secure Boot, rEFInd can load just one shim/MOK-signed driver. See the <a href="drivers.html">page on drivers</a> for more on this topic.</li>
<li>Rename the configuration file by typing <tt><b>mv refind.conf-sample refind.conf</b></tt>. Consult the <a href="configfile.html">Editing the rEFInd Configuration File</a> page for information on how to adjust your options.</li>
<li><b>Drivers</b>—You can install drivers to extend the capabilities
of the EFI. rEFInd ships with filesystem drivers for ext2fs and
ReiserFS, which can enable you to boot a Linux kernel with EFI stub
- support from an ext2fs, ext3fs, or ReiserFS partition. (rEFInd also
+ support from an ext2fs, ext3fs, ext4fs, or ReiserFS partition. (rEFInd also
provides ISO-9660 and HFS+ drivers.) You can find additional drivers
from other sources, although they're still on the scarce side. See the
<a href="drivers.html">Using EFI Drivers</a> page for more on this
</ol>
+<p>Some sources suggest that delayed launches of rEFInd on Macs are more common when installing rEFInd to the ESP, so if you've done this, you could try re-installing it to your OS X boot partition.</p>
+
<a name="uninstalling">
<h2>Uninstalling rEFInd</h2>
</a>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/19/2012; last Web page update:
-12/12/2012, referencing rEFInd 0.5.1</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
<h2>Using the EFI Stub Loader: A Quick Setup Guide</h2>
</a>
-<p>The EFI stub loader is basic and reliable, but it requires some setup to use it. I describe both <a href="#testing">a quick test configuration</a> and <a href="#longterm">a long-term setup.</a></p>
+<p>The EFI stub loader is basic and reliable, but it requires some setup to use it on some computers. I describe three methods of using it: an <a href="#easiest">easiest method</a> for those with compatible partition and filesystem layouts, a <a href="#testing">quick test configuration</a> for those without such a layout, and <a href="#longterm">a long-term setup</a> for those without the ideal setup.</p>
+
+<a name="easiest">
+<h3>For Those With Foresight or Luck: The Easiest Method</h3>
+</a>
+
+<p>This method requires that your <tt>/boot</tt> directory, whether it's on a separate partition or is a regular directory in your root (<tt>/</tt>) filesystem, be readable by the EFI. At the moment, all EFI implementations can read FAT and Macs can read HFS+. By using <a href="drivers.html">drivers,</a> you can make any EFI read HFS+, ISO-9660, ReiserFS, ext2fs, ext3fs, or ext4fs. Thus, if you use any of these filesystems on a regular partition (not an LVM or RAID configuration) that holds your kernels in <tt>/boot</tt>, you qualify for this easy method. The default partition layouts used by Ubuntu, Fedora, and many other distributions qualify, because they use one of these filesystems (usually ext4fs) in a normal partition or on a separate <tt>/boot</tt> partition. You must also have a 3.3.0 or later Linux kernel with EFI stub support, of course.</p>
+
+<p>If you installed rEFInd 0.6.0 or later with its <tt>install.sh</tt> script from your regular Linux installation, chances are everything's set up; you should be able to reboot and see your Linux kernels as boot options. If you installed manually, from OS X, or from an emergency system, though, you may need to do a couple of things manually:
+
+<ol>
+
+<li>Copy the relevant driver file for your filesystem and architecture to
+ the <tt>drivers</tt> or <tt>drivers_<tt class="variable">arch</tt></tt>
+ subdirectory of the rEFInd installation directory on the ESP. You may
+ need to create this subdirectory, too.</li>
+
+<li>Create a <tt>refind_linux.conf</tt> file in your <tt>/boot</tt>
+ directory. The <tt>mkrlconf.sh</tt> script that comes with rEFInd
+ should do this job, or you can do it manually as described <a
+ href="#efistub">later.</a></li>
+
+</ol>
+
+<p>When you reboot, you should see rEFInd options for your Linux kernels. If they work, your job is done, although you might want to apply some of the tweaks described in the <a href="#longterm">maintenance-free setup</a> section. If you have problems, you may need to adjust the <tt>refind_linux.conf</tt> file, as described in the <a href="#efistub">detailed configuration section.</a></p>
<a name="testing">
<h3>Testing the EFI Stub Loader</h3>
<h3>Configuring a Maintenance-Free Setup</h3>
</a>
-<p>The ideal configuration for use of the EFI stub loader involves giving rEFInd the ability to load your kernels directly from <tt>/boot</tt>. The main obstacle to doing so is that this directory is frequently on an XFS, JFS, Btrfs, or ext4 filesystem that the EFI can't read, or it's tucked away in an LVM or RAID configuration that the EFI can't read. Fortunately, this problem can be overcome with relatively little fuss. Several variant procedures are possible, but I begin by describing one that will almost always work, although it's got some important caveats (described at the end). You should perform the following steps as <tt>root</tt>, or precede each of these commands with <tt>sudo</tt>:</p>
+<p>If your <tt>/boot</tt> directory happens to be on an XFS, JFS, or Btrfs partition that the EFI can't read, or it's tucked away in an LVM or RAID configuration that the EFI can't read, you won't be able to use the <a href="#easiest">easiest solution.</a> Fortunately, this problem can be overcome with relatively little fuss. Several variant procedures are possible, but I begin by describing one that will almost always work, although it's got some important caveats (described at the end). You should perform the following steps as <tt>root</tt>, or precede each of these commands with <tt>sudo</tt>:</p>
<ol>
<p>Once this task is done, updates to your kernel will automatically be stored in the root directory of your ESP, where rEFInd will automatically detect them. Thus, the boot configuration becomes maintenance-free. The procedure as just described has some drawbacks, though. By placing your kernels in the root directory of your ESP, you render them vulnerable to any other OS with which you might be dual-booting. Your ESP must also be large enough to hold all your kernels. If you dual-boot with multiple Linux distributions, they might conceivably overwrite each others' kernels, and distinguishing one from another becomes more difficult.</p>
-<p>For these reasons, a variant of this procedure is desirable on some systems. Most of the steps are similar, but in this variant, you create a separate <tt>/boot</tt> partition that's independent of the ESP. This partition can use FAT, HFS+, ReiserFS, ext2fs, or ext3fs; but if you use any of the last four filesystems (three on Macs), you must install the matching EFI filesystem driver that ships with rEFInd. Creating the filesystem will normally require you to shrink an existing partition by a suitable amount (200–500MiB). Mount your new <tt>/boot</tt> partition at a temporary location, copy or move the current <tt>/boot</tt> files into it, unmount it, and add it to <tt>/etc/fstab</tt> as <tt>/boot</tt>.</p>
-
+<p>For these reasons, a variant of this procedure is desirable on some systems. Most of the steps are similar, but in this variant, you create a separate <tt>/boot</tt> partition that's independent of the ESP. This partition can use FAT, HFS+, ReiserFS, ext2fs, ext3fs, or ext4fs; but if you use any of the last five filesystems (four on Macs), you must install the matching EFI filesystem driver that ships with rEFInd. Creating the filesystem will normally require you to shrink an existing partition by a suitable amount (200–500MiB). Mount your new <tt>/boot</tt> partition at a temporary location, copy or move the current <tt>/boot</tt> files into it, unmount it, and add it to <tt>/etc/fstab</tt> as <tt>/boot</tt>.</p>
-<p>If your distribution already uses a separate <tt>/boot</tt> partition (as Fedora 17 does by default), but if it uses ext4fs or some other unsuitable filesystem, you can back it up, create a fresh FAT, HFS+, ReiserFS, ext2, or ext3 filesystem on it, and restore the original files. You'll probably need to adjust the UUID value in <tt>/etc/fstab</tt> to ensure that the computer mounts the new filesystem when you boot. If you use a separate non-ESP <tt>/boot</tt> partition, you'll probably want to continue mounting the ESP at <tt>/boot/efi</tt>.</p>
+<p>If your distribution already uses a separate <tt>/boot</tt> partition, but if it uses XFS or some other unsuitable filesystem, you can back it up, create a fresh FAT, HFS+, ReiserFS, ext2, ext3, or ext4 filesystem on it, and restore the original files. You'll probably need to adjust the UUID value in <tt>/etc/fstab</tt> to ensure that the computer mounts the new filesystem when you boot. If you use a separate non-ESP <tt>/boot</tt> partition, you'll probably want to continue mounting the ESP at <tt>/boot/efi</tt>.</p>
<a name="efistub">
<h2>EFI Stub Loader Support Technical Details</h2>
<a name="refind_linux">
<pre class="listing">
-"Boot with defaults" "root=/dev/sda3 ro quiet splash vt.handoff=7"
+"Boot using default options" "root=/dev/sda3 ro quiet splash vt.handoff=7"
"Boot into single-user mode" "root=UUID=1cd95082-bce0-494c-a290-d2e642dd82b7 ro single"
"Boot without graphics" "root=UUID=1cd95082-bce0-494c-a290-d2e642dd82b7 ro"
# "Boot alternate install" "root=/dev/sdb9 ro quiet splash vt.handoff=7"
a refind_linux.conf file in the Linux kernel's directory."
border=2></center><br />
-<p>Note that the first entry shown here takes a name that's set in rEFInd rather than the one specified in the <tt>refind_linux.conf</tt> file. The remaining names match those specified in the file, though.</p>
-
-<p>To assist in initial configuration, rEFInd's <tt>install.sh</tt> script creates a sample <tt>refind_linux.conf</tt> file in <tt>/boot</tt>. This sample file defines two entries that use the default GRUB options defined in <tt>/etc/default/grub</tt>. The first entry boots normally and the second boots into single-user mode. If you want to create a new file, you can use the <tt>mkrlconf.sh</tt> script that comes with rEFInd. If you pass it the <tt>--force</tt> option, it will overwrite the existing <tt>/boot/refind_linux.conf</tt> file; otherwise it will create the file only if one doesn't already exist.</p>
+<p>To assist in initial configuration, rEFInd's <tt>install.sh</tt> script creates a sample <tt>refind_linux.conf</tt> file in <tt>/boot</tt>. This sample file defines three entries, the first two of which use the default GRUB options defined in <tt>/etc/default/grub</tt> and the last of which uses minimal options. The first entry boots normally and the second boots into single-user mode. If you want to create a new file, you can use the <tt>mkrlconf.sh</tt> script that comes with rEFInd. If you pass it the <tt>--force</tt> option, it will overwrite the existing <tt>/boot/refind_linux.conf</tt> file; otherwise it will create the file only if one doesn't already exist.</p>
<p>From a user's perspective, the submenus defined in this way work just like submenus defined via the <tt>submenuentry</tt> options in <tt>refind.conf</tt>, or like the submenus that rEFInd creates automatically for Mac OS X or ELILO. There are, however, limitations in what you can accomplish with this method:</p>
<p class="subhead">by Roderick W. Smith, <a
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
-<p>Last Web page update: 12/12/2012</p>
+<p>Last Web page update: 12/16/2012</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>
<ul>
+<li><b>0.6.0 (12/16/2012)</b>—The donation of a working ext4fs driver from Stefan Agner has prompted another big jump in the rEFInd version number, since this driver will greatly simplify installation on many systems: You may be able to simply run the <tt>install.sh</tt> script to get a working rEFInd that boots your Linux kernels directly, bypassing GRUB or ELILO. Other improvements in this version include bug fixes and minor changes to <tt>install.sh</tt>, the addition of hint text to the rEFInd main menu, the ability to disable the options editor via the <tt>editor</tt> option to <tt>hideui</tt> in <tt>refind.conf</tt>, a new <tt>textmode</tt> option to <tt>refind.conf</tt> to set the size of the text-mode display, a change to the code that adds your initial RAM disk to the boot options so that if you specify one manually (via <tt>refind_linux.conf</tt>), it will take precedence, and assorted obscure bug fixes. The <tt>NEWS.txt</tt> file goes into more details about many of these changes, as do the relevant pages of this HTML documentation.</li>
+
<li><b>0.5.1.1 (12/12/2012)</b>—This is a micro-update to fix a bug in the <tt>install.sh</tt> script that prevented it from working under OS X. Aside from that, and a few small documentation changes, this version changes nothing in rEFInd.</li>
<li><b>0.5.1 (12/11/2012)</b>—The most important changes to this version are to the <tt>install.sh</tt> script. It now supports two options, <tt>--shim</tt> and <tt>--localkeys</tt>, to aid in installation on a Secure Boot system. See the <a href="installing.html">Installing rEFInd</a> and <a href="secureboot.html">Managing Secure Boot</a> pages for details. The script also now creates a sample <tt>/boot/refind_linux.conf</tt> file to assist in setting up boots via the Linux EFI stub loader. All of these <tt>install.sh</tt> improvements work only in Linux. A separate <tt>mkrlconf.sh</tt> script creates a <tt>/boot/refind_linux.conf</tt> file if it doesn't exist, for help in post-installation configuration. In rEFInd itself, I've fixed the bug that caused ELILO to be unable to locate its configuration file when launched in Secure Boot mode and fixed a couple of more obscure bugs. I've also added an <tt>include</tt> token to <tt>refind.conf</tt>, to enable you to create a secondary configuration file (say, one managed by scripts while leaving the main file untouched; or one dedicated to manual boot stanzas).</li>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 11/13/2012; last Web page update:
-12/12/2012, referencing rEFInd 0.5.1</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
<p>At this point the computer may boot into its default OS, reboot, or perhaps even hang. When you reboot it, though, rEFInd should start up in Secure Boot mode. (You can verify this by selecting the <i>About rEFInd</i> tool in the main menu. Check the <i>Platform</i> item in the resulting screen; it should verify that Secure Boot is active.) You should now be able to launch any boot loader signed with a key recognized by the firmware or by shim (including any MOKs you've enrolled). If you want to manage keys in the future, rEFInd displays a new icon in the second (tools) row you can use to launch MokManager. (This icon appears by default if MokManager is installed, but if you edit <tt>showtools</tt> in <tt>refind.conf</tt>, you must be sure to include <tt>mok_tool</tt> as an option in order to gain access to it.)</p>
-<p>If you're using Ubuntu 12.10, you can't use its version of shim, but you can replace it with Garrett's shim. If you do so, though, you'll have to add Ubuntu's public key as a MOK, at least if you intend to launch Ubuntu's version of GRUB or launch Ubuntu-provided signed kernels. Ubuntu's public key is available in the <a href="http://archive.ubuntu.com/ubuntu/pool/main/s/shim/shim_0~20120906.bcd0a4e8-0ubuntu4.debian.tar.gz">shim_0~20120906.bcd0a4e8-0ubuntu4.debian.tar.gz</a> tarball, as <tt>canonical-uefi-ca.der</tt>. (The filename extensions <tt>.cer</tt> and <tt>.der</tt> are interchangeable for most purposes.) To use it, copy <tt>canonical-uefi-ca.der</tt> to your ESP and enroll it with MokManager. See <a href="http://falstaff.agner.ch/2012/12/12/secure-boot-implementation-of-ubuntu-12-10-quantal-quetzal/">this blog post</a> for further details on Ubuntu 12.10's handling of Secure Boot. In principle, you should be able to use shim 0.2 or later from future distributions that include it; but you must be sure that whatever you use supports MokManager.</p>
+<p>If you're using Ubuntu 12.10, you can't use its version of shim, but you can replace it with Garrett's shim. If you do so, though, you'll have to add Ubuntu's public key as a MOK, at least if you intend to launch Ubuntu's version of GRUB or launch Ubuntu-provided signed kernels. Ubuntu's public key is available in the <a href="http://archive.ubuntu.com/ubuntu/pool/main/s/shim/shim_0~20120906.bcd0a4e8-0ubuntu4.debian.tar.gz">shim_0~20120906.bcd0a4e8-0ubuntu4.debian.tar.gz</a> tarball, as <tt>canonical-uefi-ca.der</tt>. (The filename extensions <tt>.cer</tt> and <tt>.der</tt> are interchangeable for most purposes.) I've also included this key with rEFInd, in the <tt>refind/keys</tt> subdirectory of its package file. To use this key, copy it to your ESP and enroll it with MokManager. See <a href="http://falstaff.agner.ch/2012/12/12/secure-boot-implementation-of-ubuntu-12-10-quantal-quetzal/">this blog post</a> for further details on Ubuntu 12.10's handling of Secure Boot. In principle, you should be able to use shim 0.2 or later from future distributions that include it; but you must be sure that whatever you use supports MokManager.</p>
<a name="mok">
<h2>Managing Your MOKs</h2>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-12/11/2012, referencing rEFInd 0.5.1</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/6/2012, referencing rEFInd 0.5.0</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
<ul>
- <li>Drivers for additional filesystems are required. Given the recent
- shift to ext4fs, that should be the priority; however, other Linux
- filesystems, UDF, and perhaps others would all be welcome
+ <li>Drivers for additional filesystems are desirable. Given the talk of
+ shifting to Btrfs, that should be the priority; however, other
+ Linux filesystems, UDF, and perhaps others would all be welcome
additions. Also along these lines, adding drivers for Linux LVM and
RAID setups would be useful, too.</li>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/11/2012, referencing rEFInd 0.5.1</p>
+12/16/2012, referencing rEFInd 0.6.0</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>
/** Helper macro for stringification. */
#define FSW_EFI_STRINGIFY(x) #x
/** Expands to the EFI driver name given the file system type name. */
-#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.5.0 " FSW_EFI_STRINGIFY(t) L" File System Driver"
+#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.0 " FSW_EFI_STRINGIFY(t) L" File System Driver"
// function prototypes
#
# Revision history:
#
-# 0.5.2 -- Changed --drivers to --alldrivers and added --nodrivers option;
+# 0.6.0 -- Changed --drivers to --alldrivers and added --nodrivers option;
# changed default driver installation behavior in Linux to install
# the driver needed to read /boot (if available)
# 0.5.1.2 -- Fixed bug that caused failure to generate refind_linux.conf file
# Copy the public keys to the installation medium
CopyKeys() {
if [[ $LocalKeys == 1 ]] ; then
- cp $EtcKeysDir/$LocalKeysBase.cer $InstallDir/$TargetDir
- cp $EtcKeysDir/$LocalKeysBase.crt $InstallDir/$TargetDir
- else
- cp $ThisDir/refind.cer $InstallDir/$TargetDir
- cp $ThisDir/refind.crt $InstallDir/$TargetDir
+ mkdir -p $InstallDir/$TargetDir/keys/
+ cp $EtcKeysDir/$LocalKeysBase.cer $InstallDir/$TargetDir/keys/
+ cp $EtcKeysDir/$LocalKeysBase.crt $InstallDir/$TargetDir/keys/
+# else
+# cp $ThisDir/refind.cer $InstallDir/$TargetDir/keys/
+# cp $ThisDir/refind.crt $InstallDir/$TargetDir/keys/
fi
} # CopyKeys()
BootFS=`blkid -o export $BootPart 2> /dev/null | grep TYPE= | cut -f 2 -d =`
DriverType=""
case $BootFS in
- ext2 | ext3) DriverType="ext2"
+ ext2 | ext3 | ext4) DriverType="ext4"
;;
- ext4) DriverType="ext4"
- ;;
reiserfs) DriverType="reiserfs"
;;
hfsplus) DriverType="hfs"
if [[ $LocalKeys == 0 ]] ; then
echo "Storing copies of rEFInd Secure Boot public keys in $EtcKeysDir"
mkdir -p $EtcKeysDir
- cp $ThisDir/refind.cer $EtcKeysDir
- cp $ThisDir/refind.crt $EtcKeysDir
+ cp $ThisDir/keys/refind.cer $EtcKeysDir
+ cp $ThisDir/keys/refind.crt $EtcKeysDir
fi
fi
else
if [[ $? != 0 ]] ; then
Problems=1
fi
+ cp -rf $ThisDir/keys $InstallDir/$TargetDir/
if [[ -f $InstallDir/$TargetDir/refind.conf ]] ; then
echo "Existing refind.conf file found; copying sample file as refind.conf-sample"
echo "to avoid overwriting your customizations."
cp $RefindDir/refind_ia32.efi $TempDir
cp -a $RefindDir/drivers_ia32 $TempDir 2> /dev/null
cp -a $ThisDir/drivers_ia32 $TempDir 2> /dev/null
- SignOneBinary $RefindDir/refind_x64.efi $ThisDir/refind_x64.efi
+ SignOneBinary $RefindDir/refind_x64.efi $TempDir/refind_x64.efi
for Driver in `ls $RefindDir/drivers_x64/*.efi $ThisDir/drivers_x64/*.efi 2> /dev/null` ; do
TempName=`basename $Driver`
SignOneBinary $Driver $TempDir/drivers_x64/$TempName
#define LibLocateProtocol EfiLibLocateProtocol
#endif
+// Scan for at least this many text-mode and graphics-mode display modes, even
+// if the first modes are invalid. The number of text modes scanned must be at
+// least 3 on some computers to properly list all the available modes when the
+// user specifies an invalid value, since mode 1 (numbered from 0) is often
+// invalid, but mode 2 (the third one) is usually valid. AFAIK, gaps never
+// occur in graphics modes, although I've heard of one case that makes me think
+// some exceptions may occur.
+#define MIN_SCAN_TEXT_MODES 3
+#define MIN_SCAN_GRAPHICS_MODES 1
+
// Console defines and variables
static EFI_GUID ConsoleControlProtocolGuid = EFI_CONSOLE_CONTROL_PROTOCOL_GUID;
Status = refit_call2_wrapper(GraphicsOutput->SetMode, GraphicsOutput, ModeNum);
ModeSet = (Status == EFI_SUCCESS);
} // if
- } while (((ModeNum++ < 10) || (Status == EFI_SUCCESS)) && !ModeSet);
+ } while (((++ModeNum < MIN_SCAN_GRAPHICS_MODES) || (Status == EFI_SUCCESS)) && !ModeSet);
// while ((Status == EFI_SUCCESS) && (!ModeSet)) {
// Status = refit_call4_wrapper(GraphicsOutput->QueryMode, GraphicsOutput, ModeNum, &Size, &Info);
// if ((Status == EFI_SUCCESS) && (Size >= sizeof(*Info)) &&
if ((Status == EFI_SUCCESS) && (Info != NULL)) {
Print(L"Mode %d: %d x %d\n", ModeNum, Info->HorizontalResolution, Info->VerticalResolution);
} // else
- } while ((ModeNum++ < 10) || (Status == EFI_SUCCESS));
+ } while ((++ModeNum < MIN_SCAN_GRAPHICS_MODES) || (Status == EFI_SUCCESS));
// Status = EFI_SUCCESS;
// while (Status == EFI_SUCCESS) {
// Status = refit_call4_wrapper(GraphicsOutput->QueryMode, GraphicsOutput, ModeNum, &Size, &Info);
Status = refit_call4_wrapper(ST->ConOut->QueryMode, ST->ConOut, i, &Width, &Height);
if (Status == EFI_SUCCESS)
Print(L"Mode: %d: %d x %d\n", i, Width, Height);
- } while ((i++ < 2) || (Status == EFI_SUCCESS));
+ } while ((++i < MIN_SCAN_TEXT_MODES) || (Status == EFI_SUCCESS));
PauseForKey();
SwitchToGraphics();
# Prepare a place and copy files there....
mkdir -p ../snapshots/$1/refind-$1/icons
cp --preserve=timestamps icons/*icns ../snapshots/$1/refind-$1/icons/
-cp -a docs images include EfiLib libeg refind filesystems install.sh mkrlconf.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1
-if [[ SignIt == 1 ]] ; then
- cp $KeysDir/refind.cer $KeysDir/refind.crt ../snapshots/$1/refind-$1/
-fi
+cp -a docs images keys include EfiLib libeg refind filesystems install.sh mkrlconf.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1
# Go there and prepare a souce code zip file....
cd ../snapshots/$1/
cp refind/refind_x64.efi refind-bin-$1/refind/refind_x64.efi
fi
cp refind-bin-$1/refind/refind_x64.efi $StartDir
-cp -a COPYING.txt LICENSE.txt README.txt docs CREDITS.txt install.sh mkrlconf.sh refind-bin-$1
+cp -a docs keys COPYING.txt LICENSE.txt README.txt CREDITS.txt install.sh mkrlconf.sh refind-bin-$1
# Prepare the final .zip file and clean up
if [[ $SignIt == 1 ]] ; then
- cp $KeysDir/refind.cer $KeysDir/refind.crt refind-bin-$1/
umount $KeysDir
fi
zip -9r ../refind-bin-$1.zip refind-bin-$1
# Directories are specified relative to the volume's root directory. This
# option applies to ALL the volumes that rEFInd scans. If a specified
# directory doesn't exist, it's ignored (no error condition results).
-# The default is to scan no additional directories.
+# The default is to scan the "boot" directory in addition to various
+# hard-coded directories.
#
#also_scan_dirs boot,EFI/linux/kernels
+# Partitions to omit from scans. You must specify a volume by its
+# label, which you can obtain in an EFI shell by typing "vol", from
+# Linux by typing "blkid /dev/{devicename}", or by examining the
+# disk's label in various OSes' file browsers.
+# The default is an empty list (all volumes are scanned).
+#
+#dont_scan_volumes
+
# Directories that should NOT be scanned for boot loaders. By default,
# rEFInd doesn't scan its own directory or the EFI/tools directory.
# You can "blacklist" additional directories with this option, which
if (StriCmp(FileName, CONFIG_FILE_NAME) == 0) {
MyFreePool(GlobalConfig.AlsoScan);
GlobalConfig.AlsoScan = StrDuplicate(ALSO_SCAN_DIRS);
+// MyFreePool(GlobalConfig.DontScanVolumes);
+// GlobalConfig.DontScanVolumes = StrDuplicate(L" ");
MyFreePool(GlobalConfig.DontScanDirs);
GlobalConfig.DontScanDirs = StrDuplicate(SelfDirPath);
MyFreePool(GlobalConfig.DontScanFiles);
} else if (StriCmp(TokenList[0], L"also_scan_dirs") == 0) {
HandleStrings(TokenList, TokenCount, &(GlobalConfig.AlsoScan));
+ } else if ((StriCmp(TokenList[0], L"don't_scan_volumes") == 0) || (StriCmp(TokenList[0], L"dont_scan_volumes") == 0)) {
+ HandleStrings(TokenList, TokenCount, &(GlobalConfig.AlsoScan));
+ // Note: Don't use HandleStrings() because it modifies slashes, which might be present in volume name
+ MyFreePool(GlobalConfig.DontScanVolumes);
+ GlobalConfig.DontScanVolumes = NULL;
+ for (i = 1; i < TokenCount; i++) {
+ MergeStrings(&GlobalConfig.DontScanVolumes, TokenList[i], L',');
+ }
+
} else if ((StriCmp(TokenList[0], L"don't_scan_dirs") == 0) || (StriCmp(TokenList[0], L"dont_scan_dirs") == 0)) {
HandleStrings(TokenList, TokenCount, &(GlobalConfig.DontScanDirs));
CHAR16 *Title = NULL;
UINTN TokenCount, size;
LOADER_ENTRY *Entry;
-// REFIT_MENU_SCREEN *SubScreen;
if (FileExists(SelfDir, CONFIG_FILE_NAME)) {
Status = ReadFile(SelfDir, CONFIG_FILE_NAME, &File, &size);
CHAR16 *SelectionBigFileName;
CHAR16 *DefaultSelection;
CHAR16 *AlsoScan;
+ CHAR16 *DontScanVolumes;
CHAR16 *DontScanDirs;
CHAR16 *DontScanFiles;
CHAR16 *DriverDirs;
//
// Converts forward slashes to backslashes, removes duplicate slashes, and
-// removes slashes from the end of the pathname.
+// removes slashes from both the start and end of the pathname.
// Necessary because some (buggy?) EFI implementations produce "\/" strings
// in pathnames, because some user inputs can produce duplicate directory
// separators, and because we want consistent start and end slashes for
UINTN i, FinalChar = 0;
BOOLEAN LastWasSlash = FALSE;
- NewName = AllocateZeroPool(sizeof(CHAR16) * (StrLen(PathName) + 4));
+ NewName = AllocateZeroPool(sizeof(CHAR16) * (StrLen(PathName) + 2));
if (NewName != NULL) {
for (i = 0; i < StrLen(PathName); i++) {
if ((PathName[i] == L'/') || (PathName[i] == L'\\')) {
- if ((!LastWasSlash) /* && (FinalChar != 0) */)
+ if ((!LastWasSlash) && (FinalChar != 0))
NewName[FinalChar++] = L'\\';
LastWasSlash = TRUE;
} else {
- if (FinalChar == 0) {
- NewName[FinalChar++] = L'\\';
- }
NewName[FinalChar++] = PathName[i];
LastWasSlash = FALSE;
} // if/else
} // for
NewName[FinalChar] = 0;
- if ((FinalChar > 1) && (NewName[FinalChar - 1] == L'\\'))
+ if ((FinalChar > 0) && (NewName[FinalChar - 1] == L'\\'))
NewName[--FinalChar] = 0;
if (FinalChar == 0) {
NewName[0] = L'\\';
} // if allocation OK
} // CleanUpPathNameSlashes()
+// VOID CleanUpPathNameSlashes(IN OUT CHAR16 *PathName) {
+// CHAR16 *NewName;
+// UINTN i, FinalChar = 0;
+// BOOLEAN LastWasSlash = FALSE;
+//
+// NewName = AllocateZeroPool(sizeof(CHAR16) * (StrLen(PathName) + 4));
+// if (NewName != NULL) {
+// for (i = 0; i < StrLen(PathName); i++) {
+// if ((PathName[i] == L'/') || (PathName[i] == L'\\')) {
+// if ((!LastWasSlash) /* && (FinalChar != 0) */)
+// NewName[FinalChar++] = L'\\';
+// LastWasSlash = TRUE;
+// } else {
+// if (FinalChar == 0) {
+// NewName[FinalChar++] = L'\\';
+// }
+// NewName[FinalChar++] = PathName[i];
+// LastWasSlash = FALSE;
+// } // if/else
+// } // for
+// NewName[FinalChar] = 0;
+// if ((FinalChar > 1) && (NewName[FinalChar - 1] == L'\\'))
+// NewName[--FinalChar] = 0;
+// if (FinalChar == 0) {
+// NewName[0] = L'\\';
+// NewName[1] = 0;
+// }
+// // Copy the transformed name back....
+// StrCpy(PathName, NewName);
+// FreePool(NewName);
+// } // if allocation OK
+// } // CleanUpPathNameSlashes()
+
// Splits an EFI device path into device and filename components. For instance, if InString is
// PciRoot(0x0)/Pci(0x1f,0x2)/Ata(Secondary,Master,0x0)/HD(2,GPT,8314ae90-ada3-48e9-9c3b-09a88f80d921,0x96028,0xfa000)/\bzImage-3.5.1.efi,
// this function will truncate that input to
StrCat(NewString, *First);
if (AddChar) {
NewString[Length1] = AddChar;
- NewString[Length1 + 1] = 0;
+ NewString[Length1 + 1] = '\0';
} // if (AddChar)
} // if (*First != NULL)
if (Second != NULL)
} // VOID EjectMedia()
-// Return the GUID as a string, suitable for display to the user. Note that the calling
-// function is responsible for freeing the allocated memory.
-CHAR16 * GuidAsString(EFI_GUID *GuidData) {
- CHAR16 *TheString;
-
- TheString = AllocateZeroPool(42 * sizeof(CHAR16));
- if (TheString != 0) {
- SPrint (TheString, 82, L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
- (UINTN)GuidData->Data1, (UINTN)GuidData->Data2, (UINTN)GuidData->Data3,
- (UINTN)GuidData->Data4[0], (UINTN)GuidData->Data4[1], (UINTN)GuidData->Data4[2],
- (UINTN)GuidData->Data4[3], (UINTN)GuidData->Data4[4], (UINTN)GuidData->Data4[5],
- (UINTN)GuidData->Data4[6], (UINTN)GuidData->Data4[7]);
- }
- return TheString;
-} // GuidAsString(EFI_GUID *GuidData)
+// // Return the GUID as a string, suitable for display to the user. Note that the calling
+// // function is responsible for freeing the allocated memory.
+// CHAR16 * GuidAsString(EFI_GUID *GuidData) {
+// CHAR16 *TheString;
+//
+// TheString = AllocateZeroPool(42 * sizeof(CHAR16));
+// if (TheString != 0) {
+// SPrint (TheString, 82, L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+// (UINTN)GuidData->Data1, (UINTN)GuidData->Data2, (UINTN)GuidData->Data3,
+// (UINTN)GuidData->Data4[0], (UINTN)GuidData->Data4[1], (UINTN)GuidData->Data4[2],
+// (UINTN)GuidData->Data4[3], (UINTN)GuidData->Data4[4], (UINTN)GuidData->Data4[5],
+// (UINTN)GuidData->Data4[6], (UINTN)GuidData->Data4[7]);
+// }
+// return TheString;
+// } // GuidAsString(EFI_GUID *GuidData)
BOOLEAN EjectMedia(VOID);
-CHAR16 * GuidAsString(EFI_GUID *GuidData);
+//CHAR16 * GuidAsString(EFI_GUID *GuidData);
#endif
\ No newline at end of file
//
// variables
-#define MACOSX_LOADER_PATH L"\\System\\Library\\CoreServices\\boot.efi"
+#define MACOSX_LOADER_PATH L"System\\Library\\CoreServices\\boot.efi"
#if defined (EFIX64)
#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\shellx64.efi"
#define DRIVER_DIRS L"drivers,drivers_x64"
static REFIT_MENU_SCREEN AboutMenu = { L"About", NULL, 0, NULL, 0, NULL, 0, NULL };
REFIT_CONFIG GlobalConfig = { FALSE, FALSE, 0, 0, 0, 20, 0, 0, GRAPHICS_FOR_OSX, LEGACY_TYPE_MAC, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
{TAG_SHELL, TAG_APPLE_RECOVERY, TAG_MOK_TOOL, TAG_ABOUT, TAG_SHUTDOWN, TAG_REBOOT, 0, 0, 0, 0, 0 }};
// Structure used to hold boot loader filenames and time stamps in
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
- AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.5.1.6");
+ AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.0");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
// set load options
if (LoadOptions != NULL) {
if (LoadOptionsPrefix != NULL) {
- MergeStrings(&FullLoadOptions, LoadOptionsPrefix, 0);
+// MergeStrings(&FullLoadOptions, LoadOptionsPrefix, 0);
MergeStrings(&FullLoadOptions, LoadOptions, L' ');
if (OSType == 'M') {
MergeStrings(&FullLoadOptions, L" ", 0);
// Returns a pointer to a new string. The calling function is responsible for
// freeing its memory.
static CHAR16 *AddInitrdToOptions(CHAR16 *Options, CHAR16 *InitrdPath) {
- CHAR16 *NewOptions;
+ CHAR16 *NewOptions = NULL;
- NewOptions = StrDuplicate(Options);
+ if (Options != NULL)
+ NewOptions = StrDuplicate(Options);
if ((InitrdPath != NULL) && !StriSubCmp(L"initrd=", Options)) {
MergeStrings(&NewOptions, L"initrd=", L' ');
MergeStrings(&NewOptions, InitrdPath, 0);
// default entry
SubEntry = InitializeLoaderEntry(Entry);
if (SubEntry != NULL) {
- SubEntry->me.Title = L"Boot using default options";
+ SubEntry->me.Title = StrDuplicate(L"Boot using default options");
MainOptions = SubEntry->LoadOptions;
SubEntry->LoadOptions = AddInitrdToOptions(MainOptions, SubEntry->InitrdPath);
MyFreePool(MainOptions);
VOID GenerateSubScreen(LOADER_ENTRY *Entry, IN REFIT_VOLUME *Volume) {
REFIT_MENU_SCREEN *SubScreen;
LOADER_ENTRY *SubEntry;
- CHAR16 *InitrdOption = NULL, *Temp;
+ CHAR16 *InitrdName;
CHAR16 DiagsFileName[256];
REFIT_FILE *File;
UINTN TokenCount;
} // not single-user
// check for Apple hardware diagnostics
- StrCpy(DiagsFileName, L"\\System\\Library\\CoreServices\\.diagnostics\\diags.efi");
+ StrCpy(DiagsFileName, L"System\\Library\\CoreServices\\.diagnostics\\diags.efi");
if (FileExists(Volume->RootDir, DiagsFileName) && !(GlobalConfig.HideUIFlags & HIDEUI_FLAG_HWTEST)) {
SubEntry = InitializeLoaderEntry(Entry);
if (SubEntry != NULL) {
} else if (Entry->OSType == 'L') { // entries for Linux kernels with EFI stub loaders
File = ReadLinuxOptionsFile(Entry->LoaderPath, Volume);
if (File != NULL) {
- Temp = FindInitrd(Entry->LoaderPath, Volume);
- TokenCount = ReadTokenLine(File, &TokenList); // read and discard first entry, since it's
- FreeTokenLine(&TokenList, &TokenCount); // set up by InitializeSubScreen(), earlier....
+ InitrdName = FindInitrd(Entry->LoaderPath, Volume);
+ TokenCount = ReadTokenLine(File, &TokenList);
+ // first entry requires special processing, since it was initially set
+ // up with a default title but correct options by InitializeSubScreen(),
+ // earlier....
+ if ((SubScreen->Entries != NULL) && (SubScreen->Entries[0] != NULL)) {
+ MyFreePool(SubScreen->Entries[0]->Title);
+ SubScreen->Entries[0]->Title = StrDuplicate(TokenList[0]);
+ } // if
+ FreeTokenLine(&TokenList, &TokenCount);
while ((TokenCount = ReadTokenLine(File, &TokenList)) > 1) {
SubEntry = InitializeLoaderEntry(Entry);
SubEntry->me.Title = StrDuplicate(TokenList[0]);
MyFreePool(SubEntry->LoadOptions);
- SubEntry->LoadOptions = AddInitrdToOptions(TokenList[1], Temp);
+ SubEntry->LoadOptions = AddInitrdToOptions(TokenList[1], InitrdName);
FreeTokenLine(&TokenList, &TokenCount);
SubEntry->UseGraphicsMode = GlobalConfig.GraphicsFor & GRAPHICS_FOR_LINUX;
AddMenuEntry(SubScreen, (REFIT_MENU_ENTRY *)SubEntry);
} // while
- MyFreePool(InitrdOption);
- MyFreePool(Temp);
+ MyFreePool(InitrdName);
MyFreePool(File);
} // if Linux options file exists
INT64 Time1InSeconds, Time2InSeconds;
// Following values are overestimates; I'm assuming 31 days in every month.
- // This is fine for the purpose of this function, which has a limited
- // purpose.
+ // This is fine for the purpose of this function, which is limited
Time1InSeconds = Time1->Second + (Time1->Minute * 60) + (Time1->Hour * 3600) + (Time1->Day * 86400) +
(Time1->Month * 2678400) + ((Time1->Year - 1998) * 32140800);
Time2InSeconds = Time2->Second + (Time2->Minute * 60) + (Time2->Hour * 3600) + (Time2->Day * 86400) +
CHAR16 FileName[256], *Extension;
struct LOADER_LIST *LoaderList = NULL, *NewLoader;
- if ((!SelfDirPath || !Path || ((StriCmp(Path, SelfDirPath) == 0) && Volume->DeviceHandle != SelfVolume->DeviceHandle) ||
- (StriCmp(Path, SelfDirPath) != 0)) && (!IsIn(Path, GlobalConfig.DontScanDirs))) {
+ if ((!SelfDirPath || !Path || ((StriCmp(Path, SelfDirPath) == 0) && (Volume->DeviceHandle != SelfVolume->DeviceHandle)) ||
+ (StriCmp(Path, SelfDirPath) != 0)) &&
+ (!IsIn(Path, GlobalConfig.DontScanDirs)) &&
+ (!IsIn(Volume->VolName, GlobalConfig.DontScanVolumes))) {
// look through contents of the directory
DirIterOpen(Volume->RootDir, Path, &DirIter);
while (DirIterNext(&DirIter, 2, Pattern, &DirEntry)) {
continue; // skip this
if (Path)
- SPrint(FileName, 255, L"\\%s\\%s", Path, DirEntry->FileName);
+ SPrint(FileName, 255, L"\\%s\\%s", Path, DirEntry->FileName);
else
- SPrint(FileName, 255, L"\\%s", DirEntry->FileName);
+ SPrint(FileName, 255, L"\\%s", DirEntry->FileName);
CleanUpPathNameSlashes(FileName);
NewLoader = AllocateZeroPool(sizeof(struct LOADER_LIST));
if (NewLoader != NULL) {
if ((Volume->RootDir != NULL) && (Volume->VolName != NULL)) {
// check for Mac OS X boot loader
- if (!IsIn(L"\\System\\Library\\CoreServices", GlobalConfig.DontScanDirs)) {
+ if (!IsIn(L"System\\Library\\CoreServices", GlobalConfig.DontScanDirs)) {
StrCpy(FileName, MACOSX_LOADER_PATH);
if (FileExists(Volume->RootDir, FileName) && !IsIn(L"boot.efi", GlobalConfig.DontScanFiles)) {
AddLoaderEntry(FileName, L"Mac OS X", Volume);
}
// check for XOM
- StrCpy(FileName, L"\\System\\Library\\CoreServices\\xom.efi");
+ StrCpy(FileName, L"System\\Library\\CoreServices\\xom.efi");
if (FileExists(Volume->RootDir, FileName) && !IsIn(L"boot.efi", GlobalConfig.DontScanFiles)) {
AddLoaderEntry(FileName, L"Windows XP (XoM)", Volume);
}
} // if Mac directory not in GlobalConfig.DontScanDirs list
// check for Microsoft boot loader/menu
- StrCpy(FileName, L"\\EFI\\Microsoft\\Boot\\Bootmgfw.efi");
- if (FileExists(Volume->RootDir, FileName) && !IsIn(L"\\EFI\\Microsoft\\Boot", GlobalConfig.DontScanDirs) &&
+ StrCpy(FileName, L"EFI\\Microsoft\\Boot\\Bootmgfw.efi");
+ if (FileExists(Volume->RootDir, FileName) && !IsIn(L"EFI\\Microsoft\\Boot", GlobalConfig.DontScanDirs) &&
!IsIn(L"bootmgfw.efi", GlobalConfig.DontScanFiles)) {
AddLoaderEntry(FileName, L"Microsoft EFI boot", Volume);
}
while (DirIterNext(&EfiDirIter, 1, NULL, &EfiDirEntry)) {
if (StriCmp(EfiDirEntry->FileName, L"tools") == 0 || EfiDirEntry->FileName[0] == '.')
continue; // skip this, doesn't contain boot loaders
- SPrint(FileName, 255, L"\\EFI\\%s", EfiDirEntry->FileName);
+ SPrint(FileName, 255, L"EFI\\%s", EfiDirEntry->FileName);
ScanLoaderDir(Volume, FileName, MatchPatterns);
} // while()
Status = DirIterClose(&EfiDirIter);
break;
case TAG_GPTSYNC:
MyFreePool(FileName);
- FileName = NULL;
- MergeStrings(&FileName, L"\\efi\\tools\\gptsync.efi", 0);
+ FileName = StrDuplicate(L"\\efi\\tools\\gptsync.efi");
+// MergeStrings(&FileName, L"\\efi\\tools\\gptsync.efi", 0);
if (FileExists(SelfRootDir, FileName)) {
AddToolEntry(SelfLoadedImage->DeviceHandle, FileName, L"Make Hybrid MBR", BuiltinIcon(BUILTIN_ICON_TOOL_PART), 'P', FALSE);
}
break;
case TAG_APPLE_RECOVERY:
MyFreePool(FileName);
- FileName = NULL;
- MergeStrings(&FileName, L"\\com.apple.recovery.boot\\boot.efi", 0);
+ FileName = StrDuplicate(L"\\com.apple.recovery.boot\\boot.efi");
+// MergeStrings(&FileName, L"\\com.apple.recovery.boot\\boot.efi", 0);
for (VolumeIndex = 0; VolumeIndex < VolumesCount; VolumeIndex++) {
if ((Volumes[VolumeIndex]->RootDir != NULL) && (FileExists(Volumes[VolumeIndex]->RootDir, FileName))) {
SPrint(Description, 255, L"Apple Recovery on %s", Volumes[VolumeIndex]->VolName);
} else {
DrawMenuText(L"Use arrow keys to move cursor; Enter to boot;", 0,
(UGAWidth - (45 * FONT_CELL_WIDTH)) / 2, UGAHeight - (FONT_CELL_HEIGHT * 3));
- DrawMenuText(L"Insert or F2 to edit options", 0,
- (UGAWidth - (28 * FONT_CELL_WIDTH)) / 2, UGAHeight - (FONT_CELL_HEIGHT * 2));
+ DrawMenuText(L"Insert or F2 to edit options; Esc to return to main menu", 0,
+ (UGAWidth - (56 * FONT_CELL_WIDTH)) / 2, UGAHeight - (FONT_CELL_HEIGHT * 2));
} // if/else
} // if
break;
if (!(GlobalConfig.HideUIFlags & HIDEUI_FLAG_HINTS)) {
DrawMainMenuText(L"Use arrow keys to move cursor; Enter to boot;",
(UGAWidth - LAYOUT_TEXT_WIDTH) / 2, UGAHeight - (FONT_CELL_HEIGHT * 3));
- DrawMainMenuText(L"Insert or F2 for more options",
+ DrawMainMenuText(L"Insert or F2 for more options; Esc to refresh",
(UGAWidth - LAYOUT_TEXT_WIDTH) / 2, UGAHeight - (FONT_CELL_HEIGHT * 2));
} // if
} // static VOID PaintAll()