-0.6.3 (?/?/2013):
+0.6.3 (1/6/2013):
-----------------
- Added the ability to specify a volume name or number in the
burned to USB flash disks.
- New mvrefind.sh script to move a rEFInd installation between a standard
- location (typically EFI/refind) or one of the fallback locations
+ location (typically EFI/refind) and one of the fallback locations
(EFI/BOOT or EFI/Microsoft/Boot). It can also do more exotic locations.
- The install.sh script now installs to EFI/BOOT/bootx64.efi or
refind/icons/ Subdirectory containing icons
refind/drivers_ia32/ Subdirectory containing IA32 drivers
refind/drivers_x64/ Subdirectory containing x86-64 drivers
+ keys/ Subdirectory containing MOKs
install.sh Linux/MacOS installation script
+ mkrlconf.sh A script to create refind_linux.conf
+ mvrefind.sh A script to move a rEFInd installation
README.txt This file
+ NEWS.txt A summary of program changes
LICENSE.txt The original rEFIt license
COPYING.txt The rEFInd license
CREDITS.txt Acknowledgments of code sources
script; however, you must be running under Linux or OS X to do this. If
you're using either of those OSes, simply typing "./install.sh" will
generally install rEFInd. If you have problems with this method, though,
-you'll have to do a manual installation.
+you'll have to do a manual installation. The install.sh script supports a
+number of options that you might want to use; consult the
+docs/refind/installing.html file for details.
To install the binary package manually, you must first access your EFI
System Partition (ESP). You can then place the files from the refind
<p class="subhead">by Roderick W. Smith, <a\r
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>\r
\r
-<p>Originally written: 3/14/2012; last Web page update:\r
-12/30/2012, referencing rEFInd 0.6.2</p>\r
+<p>Originally written: 3/14/2013; last Web page update:\r
+1/6/2012, referencing rEFInd 0.6.3</p>\r
\r
\r
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>\r
\r
<hr />\r
\r
+<div style="float:right; width:55%">\r
+\r
<p>Before you invest time in downloading and trying to install rEFInd, you may want to verify that you can actually use the program at all. rEFInd is useful only on EFI-based computers, not older BIOS-based computers. In fact, most EFI-based <i>x</i>86-64 computers provide a Compatibility Support Module (CSM), which is essentially a BIOS emulation mode. Some EFI implementations are in fact built atop a conventional BIOS, and retain BIOS's boot abilities via this underlying code. Thus, it's possible that you're currently booting a modern EFI-capable computer in BIOS mode.</p>\r
\r
+</div>\r
+\r
+<div class="navbar">\r
+\r
+<h4 class="tight">Contents</h4>\r
+\r
+<ul>\r
+\r
+<li class="tight"><a href="#identifying">Identifying Your Hardware's Capabilities</li>\r
+\r
+<li class="tight"><a href="#linux">Identifying Your Linux Boot Mode</a></li>\r
+\r
+<li class="tight"><a href="#windows">Identifying Your Windows Boot Mode</a></li>\r
+\r
+</ul>\r
+\r
+</div>\r
+\r
<p>Unfortunately, determining which mode you're using can be tricky; the clues are subtle or hidden in ways that require specialized knowledge to extract. This page will help you figure it out. I first present general information on identifying your hardware's capabilities. I then describe ways to identify your current boot mode in both Linux and Windows.</p>\r
\r
+<a name="identifying">\r
<h2>Identifying Your Hardware's Capabilities</h2>\r
+</a>\r
\r
<p>Let's get the easy case out of the way: If you have a Macintosh with an Intel CPU, it's got EFI capabilities, and you'll be able to use rEFInd. Earlier Macs with PowerPC CPUs use OpenFirmware, and rEFInd can't be used with them.</p>\r
\r
\r
<p>Positive identification of EFI support in your firmware does <i>not</i> guarantee that your current OSes are booting in EFI mode. (Mac OS X booting on a Mac is an exception to this rule, though.) For that, you'll need to run some tests in your running OSes.</p>\r
\r
+<a name="linux">\r
<h2>Identifying Your Linux Boot Mode</h2>\r
+</a>\r
\r
<p>Identifying your boot mode in Linux is relatively straightforward. The simplest way is to check for the presence of a <tt>/sys/firmware/efi</tt> directory. The mere existence of this directory indicates that the computer has booted in EFI mode. Its absence suggests a BIOS-mode boot—but see below for an important caveat.</p>\r
\r
\r
<p>One caveat exists to these tests: It's possible to boot Linux in EFI mode but disable the EFI features that create the <tt>/sys/firmware/efi</tt> directory and the copious EFI output in <tt>dmesg</tt>. This can happen because your kernel was compiled without EFI support or because you've added the <tt>noefi</tt> line to your existing BIOS boot loader configuration. To the best of my knowledge, no major Linux distribution ships with EFI support disabled in either of these ways, so chances are your tests won't mislead you to thinking you're using BIOS mode unless you've recompiled your kernel or deliberately added a <tt>noefi</tt> parameter to your boot loader configuration.</p>\r
\r
+<a name="windows">\r
<h2>Identifying Your Windows Boot Mode</h2>\r
+</a>\r
\r
<p>The easiest way to determine your boot mode in Windows is probably to use the <tt>bcdedit</tt> program to examine your boot loader configuration. To do so, launch an administrative Command Prompt (by right-clicking a Command Prompt icon and selecting Run As Administrator from the context menu) and then type <tt class="userinput">bcdedit</tt> in the window. The result will include two blocks of information, on the boot manager and the boot loader. The latter is more diagnostic. On an EFI-booted system, it will resemble the following:</p>\r
\r
\r
<hr />\r
\r
-<p>copyright © 2012 by Roderick W. Smith</p>\r
+<p>copyright © 2012–2013 by Roderick W. Smith</p>\r
\r
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>\r
\r
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/30/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<hr />
+<div style="float:right; width:55%">
+
<p>Many casual users will be able to use rEFInd without making changes to its settings; in its default configuration, the boot manager automatically detects all the EFI boot loader programs you have on your ESP (or your OS X boot partition, in the case of Macs) and displays icons for them. On Macs, rEFInd also presents legacy BIOS boot options by default. Sometimes, though, you may want to tweak rEFInd's configuration. Sometimes you can obtain your desired results by adjusting the filenames of your boot loaders. Other times, you can edit rEFInd's configuration file, <tt>refind.conf</tt>, which resides in the same directory as its binary file (<tt>refind.efi</tt> or whatever you've renamed it).</p>
+</div>
+
+<div class="navbar">
+
+<h4 class="tight">Contents</h4>
+
+<ul>
+
+<li class="tight"><a href="#hiding">Hiding and Displaying EFI Boot Loaders</li>
+
+<li class="tight"><a href="#adjusting">Adjusting the Global Configuration</a></li>
+
+<li class="tight"><a href="#stanzas">Creating OS Stanzas</a></li>
+
+<li class="tight"><a href="#submenu">Creating Submenu Entries</a></li>
+
+</ul>
+
+</div>
+
<p>Broadly speaking, rEFInd's configuration file is broken down into two sections: <i>global options</i> and <i>OS stanzas.</i> The global options section sets options that apply globally—to set the timeout period, enable graphics or text mode, and so on. OS stanzas are optional, but if present, they enable you to add new boot options or replace the auto-detected options with customized ones. Both sections include configuration lines and comment lines, the latter being denoted by a leading hash mark (<tt>#</tt>). rEFInd ignores comment lines, so you can add explanatory text. The default configuration file includes numerous comments explaining each of the options.</p>
+<a name="hiding">
<h2>Hiding and Displaying EFI Boot Loaders</h2>
+</a>
<p class="sidebar">ESPs use the FAT filesystem, which is case-insensitive. Unfortunately, at least one EFI implementation (Gigabyte's <a href="http://www.rodsbooks.com/gb-hybrid-efi/">Hybrid EFI</a>) contains a bug that causes string comparisons that should be case-insensitive to actually be done in a case-sensitive way. This can cause files that are present to appear to be missing. rEFInd includes code to work around this bug in some situations, but not in all of them. If boot loaders appear to be missing, try changing the case on their filenames or on the <tt>EFI</tt> directory in the ESP. (It's coded as uppercase in rEFInd; but EFI loader filename extensions are coded as lowercase <tt>.efi</tt>. I made these choices because they seem to be the most common uses on real-world installations.)</p>
<p>In addition to the main OS tag icon, you can set the <i>badge</i> icon for a volume by creating a file called <tt>.VolumeBadge.icns</tt> in the root directory of a partition. This icon file must include a 32x32 bitmap. If present, it replaces the disk-type icons that are overlaid on the main OS icon. If you use this feature, the badge is applied to all the boot loaders read from the disk, not just those stored in the root directory or the Apple boot loader location. You could use this feature to set a custom badge for different specific disks or to help differentiate multiple OS X installations on one computer. If you don't want any badges, you can replace the three badge icons in the rEFInd <tt>icons</tt> subdirectory (<tt>vol_external.icns</tt>, <tt>vol_internal.icns</tt>, and <tt>vol_optical.icns</tt>) with a completely transparent badge. The <tt>transparent.icns</tt> file in the rEFInd <tt>icons</tt> directory may be used for this purpose.</p>
+<a name="adjusting">
<h2>Adjusting the Global Configuration</h2>
+</a>
<p>You can adjust many of rEFInd's options by editing its <tt>refind.conf</tt> file. You can use any text editor you like for the job, but be sure it saves the file in plain ASCII text, not in a word processing format. (In theory, a UTF-16 encoding should also work, but I've not tried that myself.) Note that the EFI shell includes its own editor. If you need to make a change before you launch an OS, you can launch a shell, change to the rEFInd directory, and type <b><tt>edit refind.conf</tt></b> to edit the file. This EFI editor is quite primitive, but it gets the job done. After editing, you'll need to reboot for rEFInd to read the changed configuration file.</p>
<p>This example sets a timeout of 5 seconds; loads a custom graphic file called <tt>custom.bmp</tt> from the directory in which <tt>refind.efi</tt> resides; scans the <tt>drivers</tt> and <tt>EFI/tools/drivers</tt> directories for EFI drivers; uses manual boot loader configuration but also scans for external EFI boot loaders and EFI boot loaders on optical discs; and sets the default boot loader to the first loader found that includes the string <tt>elilo</tt>. Of course, since this file specifies use of manual boot loader configuration, it's not complete; you'll need to add at least one OS stanza to be able to boot from anything but an external disk or optical drive, as described shortly.</p>
+<a name="stanzas">
<h2>Creating OS Stanzas</h2>
+</a>
<p>OS stanzas in rEFInd are similar to those in GRUB Legacy, GRUB 2, or ELILO. You can use them to add configuration options to those that are auto-detected. You cannot modify the auto-detected options, though; if you just want to tweak one OS's configuration, you have several options, none of which is ideal:</p>
<p>You can combine these OS stanzas with the global <tt>refind.conf</tt> options presented earlier. The result would contain just two entries on the rEFInd boot menu (for Gentoo and Windows, since the Ubuntu entry is disabled), unless rEFInd found other boot options on an external or optical disk.</p>
+<a name="submenu">
<h2>Creating Submenu Entries</h2>
+</a>
<p>As described on the <a href="using.html">Using rEFInd</a> page, rEFInd can present a menu of options for certain loader tags when you press the Insert, F2, or + key. rEFInd does this automatically when it detects Mac OS X or ELILO boot loaders, or when you set the OS type via the <tt>ostype</tt> option. The Mac OS X boot loader, in particular, accepts various options that you can use to boot in various ways.</p>
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-12/30/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<hr />
+<div style="float:right; width:55%">
+
<p>Beginning with version 0.2.7, rEFInd has been able to load EFI drivers, and as of version 0.4.0, it has shipped with some EFI filesystem drivers. Although EFI implementations should be able to load drivers prior to rEFInd's launch, in my experience, most EFI implementations offer such poor control over EFI driver loading that they can't be counted on to do this. Thus, if you want to use EFI drivers, rEFInd's ability to do so can be useful. This page tells you why you might want to use drivers, how you can install and use rEFInd's own drivers, where you can go to find other drivers, and provides tips on a few specific drivers.</p>
+</div>
+
+<div class="navbar">
+
+<h4 class="tight">Contents</h4>
+
+<ul>
+
+<li class="tight"><a href="#why">Why Should You Use Drivers?</li>
+
+<li class="tight"><a href="#using">Using rEFInd's EFI Drivers</a></li>
+
+<li class="tight"><a href="#finding">Finding Additional Drivers</a></li>
+
+<li class="tight"><a href="#notes">Notes on Specific Drivers</a></li>
+
+</ul>
+
+</div>
+
+<br/>
+<a name="why">
<h2>Why Should You Use EFI Drivers?</h2>
+</a>
<p>EFI supports drivers, which can activate hardware or filesystems in the pre-boot environment. At the moment, EFI drivers are few and far between; but you can or might want to use them for various reasons:</p>
<ul>
+<!-- <p class="sidebar"><b>Tip:</b> Some Linux installation media come as <i>hybrid ISO</i> files, which can be written to either optical discs or USB flash drives for installation. Some of these media, though, are useless for installing to EFI systems from USB flash drives—unless your computer supports ISO-9660 on non-optical media. rEFInd's ISO-9660 driver provides this support. To use such a hybrid image from USB flash drive, you must boot using rEFInd on another disk that has the ISO-9660 driver installed. rEFInd should then provide an option to boot from the USB flash drive. I cannot guarantee that the installer will boot at this point, but it might.</p> -->
+
<li>You can load a filesystem driver to gain access to files on a filesystem other than FAT (or HFS+ on Macs or ISO-9660 on some systems). This is most likely to be useful on a Linux installation, since a filesystem driver can enable you to store a Linux kernel with EFI stub loader or for use by ELILO on a Linux-native filesystem if your ESP is getting crowded.</li>
<li>You can load a driver for a plug-in disk controller to give the EFI access to its disks. Note that this is <i>not</i> required if you place your boot loader (and perhaps your OS kernel) on another disk, or if the plug-in disk controller includes EFI-capable firmware. It could be handy, perhaps in conjunction with a filesystem driver, to enable the EFI to read a boot loader or kernel from a disk on a plug-in controller, though.</li>
<p>As a side note, using an ISO-9660 driver can theoretically help you keep the size of a custom Linux boot CD/DVD down to a reasonable value. This is because EFI systems normally boot from optical discs by reading a FAT image file in El Torito format and treating that file as an ESP. If you need to store the kernel both in that file and directly in the ISO-9660 filesystem (to maintain bootability on BIOS systems), that can represent an unwanted extra space requirement. Placing rEFInd and an ISO-9660 driver in the FAT image file should enable you to store the kernel on the disc only once. Unfortunately, this doesn't work in practice. When the ISO-9660 driver is loaded from the El Torito image, the driver discovers that the optical disc is in use and refuses to access it. It's possible to use EFI shell commands to give the ISO-9660 driver access to the shell device, but this causes the El Torito access to go away, which means that anything loaded from the El Torito image (such as rEFInd) is likely to malfunction. Also, some EFI implementations include ISO-9660 drivers, so you might not need a separate ISO-9660 driver if you're building a disc for a particular computer.</p>
+<a name="using">
<h2>Using rEFInd's EFI Drivers</h2>
+</a>
<p class="sidebar"><b>Note:</b> If you want to use the drivers with a Mac, be sure to use at least version 0.4.3. Earlier versions were incompatible with the Mac's EFI 1.x firmware. Alternatively, you can use the drivers that came with <a href="http://refit.sourceforge.net">rEFIt,</a> which work on Macs.</p>
fs0: <tt class="userinput">map -r</tt>
</pre>
+<a name="finding">
<h2>Finding Additional EFI Drivers</h2>
+</a>
<p>As already noted, I know of no EFI drivers for EFI hardware, aside from those that are built into motherboards' EFI implementations. I do, however, know of a few EFI filesystem drivers, in addition to those provided with rEFInd:</p>
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/30/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/31/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<ul>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.6.2/refind-src-0.6.2.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.3/refind-src-0.6.3.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
development tools are also supported.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.6.2/refind-bin-0.6.2.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.3/refind-bin-0.6.3.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
href="installing.html">Installing rEFInd</a> page.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.6.2/refind-0.6.2-2.x86_64.rpm/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.3/refind-0.6.3-1.x86_64.rpm/download">A
binary RPM file</a></b>—If you use an RPM-based <i>x</i>86-64
Linux system such as Fedora or openSUSE, you can install the binary RPM
package rather than use the binary zip file. (I don't provide an
rEFInd</a> page) as part of the installation process. Distribution
maintainers can examine the <tt>refind.spec</tt> file in the source
package and tweak it to their needs. The <a
- href="http://sourceforge.net/projects/refind/files/0.6.2/refind-0.6.2-2.src.rpm/download">source
+ href="http://sourceforge.net/projects/refind/files/0.6.3/refind-0.6.3-1.src.rpm/download">source
RPM file</a> might or might not build on your system as-is; it relies
on assumptions about the locations of the GNU-EFI development
files.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.6.2/refind_0.6.2-2_amd64.deb/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.3/refind_0.6.3-1_amd64.deb/download">A
binary Debian package</a></b>—If you use an <i>x</i>86-64 version
of Debian, Ubuntu, Mint, or another Debian-based distribution, you can
install from this package, which was converted from the binary RPM
<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 partition, and then use the <tt>install.sh</tt> program's <tt>--usedefault</tt> option, and perhaps the <tt>--alldrivers</tt> option, as in <tt class="userinput">bash install.sh --usedefault /dev/sdd1 --alldrivers</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.6.2/refind-cd-0.6.2.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.3/refind-cd-0.6.3.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
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/30/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<p>This page describes rEFInd, my fork of the <a href="http://refit.sourceforge.net">rEFIt</a> boot manager for computers based on the <a href="http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface">Extensible Firmware Interface (EFI) and Unified EFI (UEFI).</a> Like rEFIt, rEFInd is a <i>boot manager,</i> meaning that it presents a menu of options to the user when the computer first starts up, as shown below. rEFInd is not a <i>boot loader,</i> which is a program that loads an OS kernel and hands off control to it. Many popular boot managers, such as <a href="http://www.gnu.org/software/grub/">the Grand Unified Bootloader (GRUB),</a> are also boot loaders, which can blur the distinction in many users' minds. rEFInd, though, relies on a separate boot loader to finish the handoff to an OS; it just presents a pretty menu and gives you options for how to proceed prior to booting an OS. All EFI-capable OSes include boot loaders, so this limitation isn't a problem. If you're using Linux, you should be aware that several EFI boot loaders are available, so choosing between them can be a challenge. See <a href="http://www.rodsbooks.com/efi-bootloaders/index.html">my Web page on this topic</a> for more information.</p>
- <br /><center><img src="refind.png" align="center" width="905"
- height="389" alt="rEFInd presents a GUI menu for selecting your boot
+ <br /><center><img src="refind.png" align="center" width="608"
+ height="377" alt="rEFInd presents a GUI menu for selecting your boot
OS." border=2> </center><br />
+<div style="float:right; width:55%">
+
<p>In theory, EFI implementations should provide boot managers. Unfortunately, in practice these boot managers are often so poor as to be useless. The worst I've personally encountered is on <a href="http://www.rodsbooks.com/gb-hybrid-efi/">Gigabyte's Hybrid EFI,</a> which provides you with no boot options whatsoever, beyond choosing the boot device (hard disk vs. optical disc, for instance). I've heard of others that are just as bad. For this reason, a good EFI boot manager—either standalone or as part of a boot loader—is a practical necessity for multi-booting on an EFI computer. That's where rEFIt and rEFInd come into play.</p>
<p>I decided to fork the earlier rEFIt project because, although rEFIt is a useful program, it's got several important limitations, such as poor control over the boot loader detection process and an ability to display at most a handful of boot loader entries on its main screen. I fixed a few of these bugs and released a patched version <a href="http://www.rodsbooks.com/efi-bootloaders/refit.html">here;</a> however, rEFIt's author, Christoph Pfisterer, didn't respond to my e-mails, and the latest official version of rEFIt, 0.14, was released in March of 2010. Thus, it appears that rEFIt has been abandoned. Forking the project to give rEFIt new features seemed like the thing to do.</p>
<p>The <a href="http://refit.sourceforge.net">rEFIt Web page</a> has a distinct Mac bias, and the provided binaries work only on Macs because they're 32-/64-bit "fat" binaries, which Macs can handle but UEFI-based PCs can't. rEFIt can be recompiled to work on UEFI-based PCs, but prebuilt binaries for such systems are relatively rare. Although I do own a Mac Mini, my interest lies more on the side of standard PC hardware, and hence with UEFI. My development platform is Linux, and my installation instructions and binaries are much more platform-neutral. I'm aware that many Mac users will consider this a step backward, but I ask their indulgence; I only have so many hours a week to work on this project, and I prefer to devote my efforts to improvements that will benefit all rEFInd users, at least initially.</p>
-<p>As already noted, rEFInd is a boot manager for EFI and UEFI computers. (I use "EFI" to refer to either version unless the distinction is important.) You're likely to benefit from it on computers that boot multiple OSes, such as two or more of Linux, Mac OS X, and Windows. You will <i>not</i> find rEFInd useful on older BIOS-based computers. Prior to mid-2011, few computers outside of Intel-based Macs used EFI; but starting in 2011, computer manufacturers began adopting UEFI in droves, so most computers bought since then use EFI. Even so, many modern PCs support both EFI-style booting and BIOS-style booting, the latter via a BIOS compatibility mode that's known as the <i>Compatibility Support Module (CSM).</i> Thus, you may be using BIOS-style booting on an EFI-based computer. If you're unsure which boot method your computer uses, check the first of the below subsections.</p>
+</div>
-<p>Subsequent sections of this document are on separate pages. Be aware that you probably don't need to read them all; just skip to the sections that interest you:</p>
+<div class="navbar">
+
+<h4 class="tight">Contents</h4>
<ul>
-<li><a href="bootmode.html">What's Your Boot Mode?</a>—Information to help you determine whether you're using EFI or BIOS booting</li>
+<li class="tight"><a href="bootmode.html">What's Your Boot Mode?</a>—Information to help you determine whether you're using EFI or BIOS booting</li>
-<li><a href="features.html">rEFInd Features</a>—An overview of rEFInd's features</li>
+<li class="tight"><a href="features.html">rEFInd Features</a>—An overview of rEFInd's features</li>
-<li><a href="getting.html">Getting rEFInd</a>—Links to obtain rEFInd</li>
+<li class="tight"><a href="getting.html">Getting rEFInd</a>—Links to obtain rEFInd</li>
-<li><a href="installing.html">Installing rEFInd</a>—Instructions for installing rEFInd, using Linux, OS X, and Windows</li>
+<li class="tight"><a href="installing.html">Installing rEFInd</a>—Instructions for installing rEFInd, using Linux, OS X, and Windows</li>
-<li><a href="using.html">Using rEFInd</a>—Basic usage instructions for the boot loader</li>
+<li class="tight"><a href="using.html">Using rEFInd</a>—Basic usage instructions for the boot loader</li>
-<li><a href="configfile.html">Configuring the Boot Manager</a>—For advanced users, information on customizing a rEFInd installation</li>
+<li class="tight"><a href="configfile.html">Configuring the Boot Manager</a>—For advanced users, information on customizing a rEFInd installation</li>
-<li><a href="drivers.html">Using EFI Drivers</a>—Why and how to have rEFInd launch EFI drivers</li>
+<li class="tight"><a href="drivers.html">Using EFI Drivers</a>—Why and how to have rEFInd launch EFI drivers</li>
-<li><a href="themes.html">Theming rEFind</a>—Information on third-party themes for rEFInd</li>
+<li class="tight"><a href="themes.html">Theming rEFind</a>—Information on third-party themes for rEFInd</li>
-<li><a href="linux.html">Options for Booting Linux</a>—Methods of booting Linux, particularly with the EFI stub loader (distribution maintainers should read this!)</li>
+<li class="tight"><a href="linux.html">Options for Booting Linux</a>—Methods of booting Linux, particularly with the EFI stub loader (distribution maintainers should read this!)</li>
-<li><a href="secureboot.html">Managing Secure Boot</a>—Some pointers on using rEFInd on a computer with Secure Boot active</li>
+<li class="tight"><a href="secureboot.html">Managing Secure Boot</a>—Some pointers on using rEFInd on a computer with Secure Boot active</li>
-<li><a href="revisions.html">Revisions</a>—Information on the history of rEFInd releases</li>
+<li class="tight"><a href="revisions.html">Revisions</a>—Information on the history of rEFInd releases</li>
-<li><a href="todo.html">The Future of rEFInd</a>—Current bugs that need squashing and features that I hope to one day add</a></li>
+<li class="tight"><a href="todo.html">The Future of rEFInd</a>—Current bugs that need squashing and features that I hope to one day add</a></li>
</ul>
+</div>
+
+<p>As already noted, rEFInd is a boot manager for EFI and UEFI computers. (I use "EFI" to refer to either version unless the distinction is important.) You're likely to benefit from it on computers that boot multiple OSes, such as two or more of Linux, Mac OS X, and Windows. You will <i>not</i> find rEFInd useful on older BIOS-based computers. Prior to mid-2011, few computers outside of Intel-based Macs used EFI; but starting in 2011, computer manufacturers began adopting UEFI in droves, so most computers bought since then use EFI. Even so, many modern PCs support both EFI-style booting and BIOS-style booting, the latter via a BIOS compatibility mode that's known as the <i>Compatibility Support Module (CSM).</i> Thus, you may be using BIOS-style booting on an EFI-based computer. If you're unsure which boot method your computer uses, check the first of the subsections, <a href="bootmode.html">What's Your Boot Mode</a>.</p>
+
+<p>Subsequent sections of this document are on separate pages. Be aware that you probably don't need to read them all; just skip to the sections that interest you:</p>
+
<p><b>Note:</b> I consider rEFInd to be <i>beta-quality software!</i> I'm discovering bugs (old and new) and fixing them every few days. That said, rEFInd is a usable program in its current form on many systems. If you have problems, feel free to drop me a line.</p>
<a name="references">
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/31/2012, referencing rEFInd 0.6.2-2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/19/2012; last Web page update:
-12/30/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<hr />
+<div style="float:right; width:55%">
+
<p>Windows and Mac OS X both provide relatively simple EFI boot loader programs. Launch them, and if they're launched from the correct locations and have the correct files in place, they'll boot their respective OSes. This makes rEFInd's job easy; it just locates the boot loader program files and runs them.</p>
+</div>
+
+<div class="navbar">
+
+<h4 class="tight">Contents</h4>
+
+<ul>
+
+<li class="tight"><a href="#traditional">Using a Traditional Linux Boot Loader</li>
+
+<li class="tight"><a href="#quickstart">Using the EFI Stub Loader: Three Configuration Options</a>
+
+<ul>
+
+<li class="tight"><a href="#easiest">For Those With Foresight or Luck: The Easiest Method</a></li>
+
+<li class="tight"><a href="#testing">Preparing a Test Configuration</a></li>
+
+<li class="tight"><a href="#reconfigure">If You Need to Reconfigure Your Partitions....</a></li>
+
+</ul></li>
+
+<li class="tight"><a href="#efistub">EFI Stub Loader Support Technical Details</a></li>
+
+</ul>
+
+</div>
+
<p>Under Linux, by contrast, things can get complicated. As detailed on my <a href="http://www.rodsbooks.com/efi-bootloaders/index.html">Managing EFI Boot Loaders for Linux</a> page, several different EFI boot loaders for Linux exist, and all of them require configuration. If you're lucky, your distribution will have set up a Linux boot loader in a sensible way, in which case rEFInd should detect it and it will work as easily as a Windows or Mac OS X boot loader. If you're not lucky, though, you may need to configure it further. rEFInd offers options to help out with this task. Naturally, rEFInd supports <a href="#traditional">traditional Linux boot loaders.</a> It works even better with the Linux EFI stub loader, so I provide <a href="#quickstart">instructions on starting with it.</a> For those interested in manual configuration, I also provide <a href="#efistub">detailed instructions</a> on how the EFI stub support works and how to configure it.</p>
<a name="traditional">
<p>If you prefer, you can disable automatic scanning and create an entry in <tt>refind.conf</tt> for your distribution, as described on the <a href="configfile.html">Configuring the Boot Manager</a> page. This method is harder to set up but can be preferable if you want to customize your options.</p>
<a name="quickstart">
-<h2>Using the EFI Stub Loader: A Quick Setup Guide</h2>
+<h2>Using the EFI Stub Loader: Three Configuration Options</h2>
</a>
<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>
<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>Preparing a Test Configuration</h3>
</a>
<p>If you're not sure you want to use the EFI stub loader in the long term, you can perform a fairly quick initial test of it. This procedure assumes that you have access to a 3.3.0 or later Linux kernel with EFI stub support compiled into it. (Fedora 17, Ubuntu 12.10, and probably other distributions ship with such kernels.) Creating this configuration poses no risk to your current boot options, provided you don't accidentally delete existing files. The procedure for a quick test is:</p>
<p>You can continue to boot your computer with this type of configuration; however, the drawback is that you'll need to copy your kernel whenever it's updated. This can be a hassle. A better way is to configure you system so that the EFI, and therefore rEFInd, can read your Linux <tt>/boot</tt> directory, where most Linux distributions place their kernels.</p>
-<a name="longterm">
-<h3>Configuring a Maintenance-Free Setup</h3>
+<a name="reconfigure">
+<h3>If You Need to Reconfigure Your Partitions....</h3>
</a>
<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>
<p class="subhead">by Roderick W. Smith, <a
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
-<p>Last Web page update: 12/30/2012</p>
+<p>Last Web page update: 1/6/2013</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<ul>
+<li><b>0.6.3 (1/6/2013)</b>—The installation script and related tools see the biggest changes in this version of the program. The <tt>install.sh</tt> script can now detect a rEFInd installation in <tt>EFI/BOOT</tt> or <tt>EFI/Microsoft/Boot</tt> and update it rather than install to the default location of <tt>EFI/refind</tt>. It will also install to one of these fallback locations if it's run in BIOS mode, thus helping users who want to get a BIOS-mode install of Linux running on an EFI-based computer. A new <tt>mvrefind.sh</tt> script can move the installation between these three locations (or more exotic locations). Outside of scripts, the <tt>dont_scan_dirs</tt> and <tt>also_scan_dirs</tt> tokens can now accept volume specifications, as in <tt>myvol:EFI/bogus</tt> to not scan (or scan) the <tt>EFI/bogus</tt> directory on the <tt>myvol</tt> volume. I've also fixed a bug that caused rEFInd to ignore default boot loaders on removable disks if rEFInd was installed using the fallback filename. I've also modified the ISO-9660 driver so that it works with ISO-9660 images written to non-optical media. This may help with getting "hybrid ISO" images written to USB flash drives to boot.</li>
+
<li><b>0.6.2 (12/30/2012)</b>—This version's biggest changes are "behind-the-scenes" improvements. Specifically, I've completely re-worked the shim/MOK Secure Boot code, based largely on an approach used by James Bottomley in his PreLoader boot loader. This fixes some bugs, such as the inability to launch more than one EFI boot loader in Secure Boot mode. The EFI filesystem drivers can now be built with GNU-EFI, which may help distribution maintainers. I'm also providing RPM packages of rEFInd, although I recommend installing from the binary zip file. Finally, I've changed rEFInd's default text-mode setting behavior to not adjust the text mode. (Recent previous versions forced the system to use text mode 0, which cuased problems on some systems.)</li>
<li><b>0.6.1 (12/21/2012)</b>—(Mayan apocalypse edition!) This version features a number of refinements and minor bug fixes. The <tt>install.sh</tt> script now includes a new <tt>--root</tt> option to enable easier installation of rEFInd to a regular OS installation from an emergency disc. The ext4fs driver now supports the <tt>meta_bg</tt> filesystem feature. I've fixed a number of obscure display resolution-setting bugs and a bug that caused the screen to clear after displaying certain error messages but before prompting you to continue. Instead of displaying a blank filesystem label as the "from" location for a boot loader, rEFInd now describes the filesystem by its type (FAT, ext4fs, etc.) and/or size. rEFInd also now uses the filesystem label as a hint about what type of icon to display for a boot loader.</li>
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 11/13/2012; last Web page update:
-12/30/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<p class="sidebar"><b>Note:</b> My <a href="http://www.rodsbooks.com/efi-bootloaders/">Managing EFI Boot Loaders for Linux</a> Web page includes a much more detailed description of Secure Boot in its <a href="http://www.rodsbooks.com/efi-bootloaders/secureboot.html">Dealing with Secure Boot</a> sub-page. You should consult this page if you want to disable Secure Boot, generate your own keys, or perform other such tasks.</p>
+<div class="navbar">
+
+<h4 class="tight">Contents</h4>
+
+<ul>
+
+<li class="tight"><a href="#basic">Basic Issues</li>
+
+<li class="tight"><a href="#installation">Installation Issues</a></li>
+
+<li class="tight"><a href="#mok">Managing Your MOKs</a></li>
+
+<li class="tight"><a href="#caveats">Secure Boot Caveats</a></li>
+
+</ul>
+
+</div>
+
<p>If you're using a computer that supports Secure Boot, you may run into extra complications. This feature is intended to make it difficult for malware to insert itself early into the computer's boot process. Unfortunately, it also complicates multi-boot configurations such as those that rEFInd is intended to manage. This page describes some <a href="#basic">secure boot basics</a> and two specific aspects of rEFInd and its interactions with Secure Boot: <a href="#installation">installation issues</a> and <a href="#mok">MOK management.</a> It concludes with a look at <a href="#caveats">known bugs and limitations</a> in rEFInd's Secure Boot features.</p>
<a name="basic">
<p>Through 2012, it became obvious that Secure Boot would be a feature that was controlled, to a large extent, by Microsoft. This is because Microsoft requires that non-server computers that display Windows 8 logos ship with Secure Boot enabled. As a practical matter, this also means that such computers ship with Microsoft's keys in their firmware. In the absence of an industry-standard body to manage the signing of Secure Boot keys, this means that Microsoft's key is the only one that's more-or-less guaranteed to be installed on the computer, thus blocking the ability to boot any OS that lacks a boot path through Microsoft's signing key.</p>
-<p>Fortunately, Microsoft will sign third-party binaries with their key. A payment of $99 to Verisign enables a software distributor to sign as many binaries as desired. Red Hat (Fedora), Novell (SUSE), and Canonical (Ubuntu) have all announced plans to take advantage of this system. Unfortunately, using a third-party signing service is an awkward solution for open source software. In fact, for this very reason Red Hat has developed a program that it calls <i>shim</i> that essentially shifts the Secure Boot "train" from Microsoft's proprietary "track" to one that's more friendly to open source authors. Shim is signed by Microsoft and redirects the boot process to another boot loader that can be signed with keys that the distribution maintains and that are built into shim. Fedora 18 is expected to use this system. SUSE has announced that it will use the same system, as does Ubuntu with version 12.10 and later. SUSE has contributed to the shim approach by providing expansions to shim that support a set of keys that users can maintain themselves. These keys are known as Machine Owner Keys (MOKs), and managing them is described later, in <a href="#mok">Managing MOKs.</a> To reiterate, then, there are potentially three ways to sign a binary that will get it launched on a computer that uses shim:</p>
+<p>Fortunately, Microsoft will sign third-party binaries with their key—or more precisely, with a key that Microsoft uses to sign third-party binaries. (Microsoft uses another key to sign its own binaries, and some devices, such as the Microsoft Surface tablet, lack the third-party Microsoft key.) A payment of $99 to Verisign enables a software distributor to sign as many binaries as desired. Red Hat (Fedora), Novell (SUSE), and Canonical (Ubuntu) have all announced plans to take advantage of this system. Unfortunately, using a third-party signing service is an awkward solution for open source software. In fact, for this very reason Red Hat has developed a program that it calls <i>shim</i> that essentially shifts the Secure Boot "train" from Microsoft's proprietary "track" to one that's more friendly to open source authors. Shim is signed by Microsoft and redirects the boot process to another boot loader that can be signed with keys that the distribution maintains and that are built into shim. Fedora 18 is expected to use this system. SUSE has announced that it will use the same system, as does Ubuntu with version 12.10 and later. SUSE has contributed to the shim approach by providing expansions to shim that support a set of keys that users can maintain themselves. These keys are known as Machine Owner Keys (MOKs), and managing them is described later, in <a href="#mok">Managing MOKs.</a> To reiterate, then, there are potentially three ways to sign a binary that will get it launched on a computer that uses shim:</p>
<ul>
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-12/30/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/30/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
and/or initial RAM disks relative to the rEFInd directory (or the
boot loader's directory, in the case of initrds).</li>
- <li>Various options (<tt>dont_scan_dirs</tt>, <tt>also_scan_dirs</tt>,
- <tt>scan_driver_dirs</tt>, etc.) refer to directories or files,
- either on the ESP or on all partitions. A way to identify specific
- partitions for these options would be useful in some
- situations.</li>
-
</ul></li> <!-- Improvements -->
<li><b>Known bugs that need squashing:</b>
<ul>
- <li>When in Secure Boot mode, rEFInd can launch just one driver that's
- signed with a shim key or MOK. The second and later drivers
- generate "access denied" errors. <!-- I think this is because of
- the fast-and-loose sample code I borrowed from shim, which re-uses
- rEFInd's own image handle (the <tt>image_handle</tt> variable in
- <tt>start_image()</tt>) for launching shim/MOK-signed binaries. The
- result is that when the second driver is loaded, it can't register
- itself with the firmware because the firmware believes it's already
- been registered. The solution is likely to involve creating a child
- image handle rather than re-using rEFInd's own image handle, but
- this is likely to be tedious to do—see
- <tt>/usr/local/UDK2010/MyWorkSpace/MdeModulePkg/Core/Dxe/Image/Image.c</tt>
- for the reference UEFI implementation. --> </li>
-
- <li>When setting a resolution higher than about 800x600 (or maybe even
- 640x480) in text mode, the text displayed by rEFInd, and on some
- systems shells and other programs launched from rEFInd, is
- restricted to an 80x24-character area in the top-left corner of the
- screen.</li>
-
<li>The <a href="http://www.rodsbooks.com/gb-hybrid-efi/">Gigabyte
Hybrid EFI</a> has a bug that causes the allegedly case-insensitive
<tt>StriCmp()</tt> function to perform a case-sensitive comparison.
implementation, and a dismal one at that, so I'm inclined to just
let it go.</li>
- <li>The Shutdown option works correctly on Macs, but not on UEFI-based
+ <li>The Shutdown option works correctly on Macs, but not on many UEFI-based
PCs. On such systems, Shutdown reboots the computer. This should be
fixed.</li>
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-12/30/2012, referencing rEFInd 0.6.2</p>
+1/6/2013, referencing rEFInd 0.6.3</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<hr />
+<div style="float:right; width:55%">
+
+<p>For the most part, rEFInd is easy to use; just use your keyboard's arrow keys to select the OS you want to boot or the utility you want to launch and press the Enter key. A few details aren't entirely intuitive, though, so this page describes them.</p>
+
+</div>
+
+<div class="navbar">
+
+<h4 class="tight">Contents</h4>
+
+<ul>
+
+<li class="tight"><a href="#basic">Using Basic rEFInd Features</li>
+
+<li class="tight"><a href="#keyboard">Using Keyboard Shortcuts</a></li>
+
+<li class="tight"><a href="#legacy">Booting Legacy OSes</a></li>
+
+</ul>
+
+</div>
+
+<a name="basic">
<h2>Using Basic rEFInd Features</h2>
+</a>
<p>With rEFInd in place and added to your firmware's list of boot utilities, you can reboot your computer. Depending on your configuration, rEFInd may come up immediately or you may need to select it from your firmware's boot options or reconfigure your firmware to present rEFInd automatically. Unfortunately, I can't offer much specific advice on this score, since EFI implementations differ so much in their user interfaces.</p>
<p>Assuming rEFInd starts up correctly, you should see its main screen, which resembles the following:</p>
- <br /><center><img src="refind.png" align="center" width="905"
- height="389" alt="rEFInd presents a GUI menu for selecting your boot
+ <br /><center><img src="refind.png" align="center" width="608"
+ height="377" alt="rEFInd presents a GUI menu for selecting your boot
OS." border=2 /></center> <br />
-<p>If you don't press any key before the timeout (shown on the last line) expires, the default boot loader will launch. This is normally the first item in the menu, but you can adjust the default by editing the configuration file. (In this example, it's the SUSE loader, which is further identified by text above the timeout as <i>Linux 3.3.0-rc7 from ESP.</i>)</p>
+<p>If you don't press any key before the timeout (shown on the last line) expires, the default boot loader will launch. This is normally the first item in the menu, but you can adjust the default by editing the configuration file. (In this example, it's the SUSE loader, which is further identified by text above the timeout as <i>vmlinuz-3.4.6-2.10-desktop from SUSE boot.</i>)</p>
-<p>This display is dominated by the central set of OS <i>tags</i> (icons), which in this example includes tags for OS X, Windows, Ubuntu, a generic Linux installation (ELILO, in fact), SUSE, and an unkown boot loader. All but the last of these are on hard disks, but the unknown boot loader is on an optical disc, as revealed by the small icons (known as <i>badges</i>) in the lower-right corner of the OS icons.</p>
+<p>This display is dominated by the central set of OS <i>tags</i> (icons), which in this example includes tags for OS X, Windows, SUSE, and an unkown boot loader. All but the last of these are on hard disks, but the unknown boot loader is on an optical disc, as revealed by the small icons (known as <i>badges</i>) in the lower-right corner of the OS icons.</p>
<p>In this example, the SUSE tag is selected. You can move the selection left by pressing the left arrow key and right by pressing the right arrow key. If your system has many boot loaders, an arrow icon will appear to the right of the boot loader list, indicating that the boot loader list will scroll when you move off the right edge. If you do this, an arrow icon will appear to the left of the icon list, indicating that you can scroll back in a similar manner. You can scroll the list by one line full of icons by using the Page Up or Page Down keys to move left and right, respectively. Moving past the final selection or using the down arrow key moves the selection to the second row of small tags, which launch ancillary programs or perform special actions. If you've moved the selection cursor to the second row, pressing the up arrow key or scrolling past the left edge of the second row moves the cursor to the top row. In this figure, these five tags are present:</p>
<li>Launch the EFI shell</li>
-<p class="sidebar">As noted on the <a href="installing.html">Installing rEFInd</a> page, the <tt>gptsync</tt> utility is dangerous, but it's useful on some Mac systems that dual-boot with Windows. If you're using a UEFI-based PC, it's best to <i>not</i> install this utility!</p>
-
-<li>Launch the <tt>gptsync</tt> utility</li>
+<li>Launch the <tt>MokManager</tt> utility</li>
<li>Produce an information page</li>
</ul>
-<p>The last three of these options are always available by default, but the first depends on the presence of the EFI shell program file, as described earlier. To get the <tt>gptsync</tt> icon, you must install <tt>gptsync.efi</tt> and adjust the <tt>showtools</tt> option in <tt>refind.conf</tt>, as well.</p>
+<p>The last three of these options are always available by default, but the first depends on the presence of the EFI shell program file, as described earlier. To get the <tt>MokManager</tt> icon, you must install <tt>MokManager.efi</tt>, as well. Other ancillary tags may be present on other computers.</p>
-<p>To launch an OS or utility, you should select its tag and then press the Enter key. If you press the Insert key, rEFInd will show a menu that may hold additional options, depending on the OS type. The following figure shows the submenu for Mac OS X. You can use this menu much like the main menu; move the cursor to select the option you want to use, then press the Enter key to launch the boot loader with the selected options. Press the Esc key or select <tt>Return to Main Menu</tt> to return to the main menu. You can also press the Insert key again to edit your boot loader options. A simple text-mode line editor opens, enabling you to move a curso back and forth in the line with your arrow keys, delete text, and type in new text. If you want to boot with your edited options, press the Enter key. If you decide you picked the wrong entry, press the Esc key.</p>
+<p>To launch an OS or utility, you should select its tag and then press the Enter key. If you press the Insert, F2, or + key, rEFInd will show a menu that may hold additional options, depending on the OS type. The following figure shows the submenu for Mac OS X. You can use this menu much like the main menu; move the cursor to select the option you want to use, then press the Enter key to launch the boot loader with the selected options. Press the Esc key or select <tt>Return to Main Menu</tt> to return to the main menu. You can also press the Insert key again to edit your boot loader options. A simple text-mode line editor opens, enabling you to move a cursor back and forth in the line with your arrow keys, delete text, and type in new text. If you want to boot with your edited options, press the Enter key. If you decide you picked the wrong entry, press the Esc key.</p>
<br /><center><img src="submenu.png" align="center" width="442"
height="269" alt="rEFInd submenus enable you to set session-specific
options." border=2></center> <br />
-<p class="sidebar"><b>Note:</b> rEFInd defaults to scanning for EFI, but <i>not</i> for BIOS, boot loaders. If you want to launch BIOS-mode OSes from rEFInd, you must edit the <tt>scanfor</tt> line in <tt>refind.conf</tt>, as described on the <a href="configfile.html">Configuring the Boot Manager</a> page. This type of configuration is most likely to be necessary on Macs that dual-boot with Windows.</p>
+<p class="sidebar"><b>Note:</b>On UEFI-based PCs, rEFInd defaults to scanning for EFI, but <i>not</i> for BIOS, boot loaders. If you want to launch BIOS-mode OSes from rEFInd, you must edit the <tt>scanfor</tt> line in <tt>refind.conf</tt>, as described on the <a href="configfile.html">Configuring the Boot Manager</a> page. On Macs, rEFInd scans for BIOS-based OSes by default, since such configurations are a common way to launch Windows on Macs.</p>
<p>Ordinarily, rEFInd displays tags for OSes it finds on internal hard disks, external hard disks (including USB flash drives, CF disks, and so on), and optical discs. Sometimes, though, the firmware hasn't had time to fully examine these devices by the time rEFInd starts; or you might only insert or plug in the media after rEFInd appears. In these cases, you can press the Esc key to have rEFInd re-read its configuration file and re-scan your media for boot loaders. This action can take a few seconds to complete, so be patient. You can also use this feature to detect OSes if you launch a shell and use it to load a driver or edit the <tt>refind.conf</tt> file. If you regularly need to press Esc, you might look into the <tt>scan_delay</tt> configuration file option, described on the <a href="configfile.html">Configuring the Boot Manager</a> page.</p>
+<p>On some computers, the firmware doesn't mount external USB media unless you adjust a firmware option or use the EFI's own boot manager prior to launching rEFInd. If you don't see external media appear in rEFInd's list, consult your computer's manual or examine its firmware to locate a relevant option.</p>
+
<p>If your computer supports Secure Boot, you may find that some of your OSes and tools won't work; they'll produce <tt>Access Denied</tt> error messages. You can overcome this problem by creating a signing key, signing your binaries with it, and adding the public version of that key to your machine owner key (MOK) list. This process is described on the <a href="secureboot.html">Managing Secure Boot</a> page.</p>
+<a name="keyboard">
<h2>Using Keyboard Shortcuts</h2>
+</a>
<p>Although most rEFInd features can be activated via fairly obvious keyboard actions, some are not obvious. <a href="#table1">Table 1</a> summarizes the keystrokes that rEFInd accepts, and the action that each keystroke invokes.</p>
<hr />
-<p>copyright © 2012 by Roderick W. Smith</p>
+<p>copyright © 2012–2013 by Roderick W. Smith</p>
<p>This document is licensed under the terms of the <a href="FDL-1.3.txt">GNU Free Documentation License (FDL), version 1.3.</a></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.6.2.1 " FSW_EFI_STRINGIFY(t) L" File System Driver"
+#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.3 " FSW_EFI_STRINGIFY(t) L" File System Driver"
// function prototypes
TargetIA32=$SourceIA32
SourceShim="shim.efi"
TargetShim=$SourceShim
-SourceDir=${1}
-TargetDir=${2}
+SourceDir=`readlink -f ${1}`
+TargetDir=`readlink -f ${2}`
# Identifies the ESP's location (/boot or /boot/efi); aborts if the ESP isn't
# mounted at either location. Also splits the ESP location from SourceDir and
# for additional boot loaders, but it doesn't recurse into these directories.
# The also_scan_dirs token adds more directories to the scan list.
# 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 the "boot" directory in addition to various
-# hard-coded directories.
+# option applies to ALL the volumes that rEFInd scans UNLESS you include
+# a volume name and colon before the directory name, as in "myvol:/somedir"
+# to scan the somedir directory only on the filesystem named myvol. If a
+# specified directory doesn't exist, it's ignored (no error condition
+# results). The default is to scan the "boot" directory in addition to
+# various hard-coded directories.
#
-#also_scan_dirs boot,EFI/linux/kernels
+#also_scan_dirs boot,ESP2: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
# or non-bootloader utilities provided by a hardware manufacturer. If
# a directory is listed both here and in also_scan_dirs, dont_scan_dirs
# takes precedence. Note that this blacklist applies to ALL the
-# filesystems that rEFInd scans, not just the ESP.
+# filesystems that rEFInd scans, not just the ESP, unless you precede
+# the directory name by a filesystem name, as in "myvol:EFI/somedir"
+# to exclude EFI/somedir from the scan on the myvol volume but not on
+# other volumes.
#
-#dont_scan_dirs EFI/boot,EFI/Dell
+#dont_scan_dirs ESP:/EFI/boot,EFI/Dell
# Files that should NOT be included as EFI boot loaders (on the
# first line of the display). If you're using a boot loader that
Summary: EFI boot manager software
Name: refind
-Version: 0.6.2.1
+Version: 0.6.3
Release: 1%{?dist}
License: GPLv3
URL: http://www.rodsbooks.com/refind/
/etc/refind.d/
%post
+env
PATH=$PATH:/usr/local/bin
# Remove any existing NVRAM entry for rEFInd, to avoid creating a duplicate.
ExistingEntry=`efibootmgr | grep "rEFInd Boot Manager" | cut -c 5-8`
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);
if (SelfVolume->VolName) {
SelfPath = StrDuplicate(SelfVolume->VolName);
VOID ScanVolumes(VOID)
{
EFI_STATUS Status;
- UINTN HandleCount = 0;
- UINTN HandleIndex;
EFI_HANDLE *Handles;
REFIT_VOLUME *Volume, *WholeDiskVolume;
- UINTN VolumeIndex, VolumeIndex2;
MBR_PARTITION_INFO *MbrTable;
+ UINTN HandleCount = 0;
+ UINTN HandleIndex;
+ UINTN VolumeIndex, VolumeIndex2;
UINTN PartitionIndex;
- UINT8 *SectorBuffer1, *SectorBuffer2;
UINTN SectorSum, i, VolNumber = 0;
+ UINT8 *SectorBuffer1, *SectorBuffer2;
MyFreePool(Volumes);
Volumes = NULL;
ScanVolume(Volume);
if (Volume->IsReadable)
Volume->VolNumber = VolNumber++;
+ else
+ Volume->VolNumber = VOL_UNREADABLE;
AddListElement((VOID ***) &Volumes, &VolumesCount, Volume);
#define DISK_KIND_EXTERNAL (1)
#define DISK_KIND_OPTICAL (2)
+#define VOL_DONTSCAN 998
+#define VOL_UNREADABLE 999
+
#define IS_EXTENDED_PART_TYPE(type) ((type) == 0x05 || (type) == 0x0f || (type) == 0x85)
EFI_STATUS InitRefitLib(IN EFI_HANDLE ImageHandle);
//
// variables
-// #ifdef EFIX64
-// foo
-// #endif
-
#define MACOSX_LOADER_PATH L"System\\Library\\CoreServices\\boot.efi"
#if defined (EFIX64)
#define SHELL_NAMES L"\\EFI\\tools\\shell.efi,\\EFI\\tools\\shellx64.efi,\\shellx64.efi"
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
- AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.2.3");
+ AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.3");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
// Returns FALSE if the specified file/volume matches the GlobalConfig.DontScanDirs
// or GlobalConfig.DontScanVolumes specification, or if Path points to a volume
// other than the one specified by Volume. Returns TRUE if none of these conditions
-// is true. Also reduces *Path to a path alone, with no volume specification.
+// is met -- that is, if the path is eligible for scanning. Also reduces *Path to a
+// path alone, with no volume specification.
static BOOLEAN ShouldScan(REFIT_VOLUME *Volume, CHAR16 *Path) {
CHAR16 *VolName = NULL, *DontScanDir;
UINTN i = 0, VolNum;
if (VolName != NULL) {
if ((StriCmp(VolName, Volume->VolName) == 0) && (StriCmp(DontScanDir, Path) == 0))
ScanIt = FALSE;
- if ((VolName[0] == L'f') && (VolName[1] == L's') && (VolName[2] >= L'0') && (VolName[2] <= '9')) {
+ if ((VolName[0] == L'f') && (VolName[1] == L's') && (VolName[2] >= L'0') && (VolName[2] <= L'9')) {
VolNum = Atoi(VolName + 2);
if ((VolNum == Volume->VolNumber) && (StriCmp(DontScanDir, Path) == 0))
ScanIt = FALSE;
REFIT_DIR_ITER EfiDirIter;
EFI_FILE_INFO *EfiDirEntry;
CHAR16 FileName[256], *Directory, *MatchPatterns, *VolName = NULL;
- UINTN i, Length;
+ UINTN i, Length, VolNum;
MatchPatterns = StrDuplicate(LOADER_MATCH_PATTERNS);
if (GlobalConfig.ScanAllLinux)
// Scan user-specified (or additional default) directories....
i = 0;
while ((Directory = FindCommaDelimited(GlobalConfig.AlsoScan, i++)) != NULL) {
+ VolNum = VOL_DONTSCAN;
SplitVolumeAndFilename(&Directory, &VolName);
CleanUpPathNameSlashes(Directory);
Length = StrLen(Directory);
- if ((Length > 0) && ((VolName == NULL) || (StriCmp(VolName, Volume->VolName) == 0)))
+ if ((Length > 0) && (VolName[0] == L'f') && (VolName[1] == L's') && (VolName[2] >= L'0') && (VolName[2] <= L'9'))
+ VolNum = Atoi(VolName + 2);
+ if ((Length > 0) && ((VolName == NULL) || (StriCmp(VolName, Volume->VolName) == 0) || (Volume->VolNumber == VolNum)))
ScanLoaderDir(Volume, Directory, MatchPatterns);
MyFreePool(Directory);
MyFreePool(VolName);