code.
-0.8.2 (5/??/2014):
-------------------
+0.8.2 (6/8/2014):
+-----------------
- Changed behavior when default_selection is not set: It now boots the
previously-booted loader, assuming it's still available; if not, rEFInd
+refind (0.8.2-0ppa1) trusty; urgency=medium
+
+ * Version bump
+
+ -- Rod Smith <rodsmith@vbu1404> Sun, 08 Jun 2014 12:32:48 -0400
+
refind (0.8.1-0ppa2) trusty; urgency=medium
* Revised Debian package to not use version numbers in /usr/share directory names
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>\r
\r
<p>Originally written: 3/14/2012; last Web page update:\r
-5/15/2014, referencing rEFInd 0.8.1</p>\r
+6/8/2014, referencing rEFInd 0.8.2</p>\r
\r
\r
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>\r
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/15/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<tr>
<td><tt>default_selection</tt></td>
<td>a substring of a boot loader's title, or a numeric position; optionally followed by two times in <tt class="variable">HH:MM</tt> format</td>
- <td>Sets the default boot OS based on the loader's title, which appears in the main menu beneath the icons when you select the loader. You can enter any substring of the title as the <tt>default_selection</tt>, so long as it's two or more characters in length. It's best to use a unique substring, since rEFInd stops searching when it finds the first match. Because rEFInd sorts entries within a directory in descending order by file modification time, if you specify a directory (or volume name, for loaders in a partition's root directory) as the <tt>default_selection</tt>, the most recent loader in that directory will be the default. One-character entries are matched against the first character of the title, except for digits, which refer to the numeric order of the boot loader entries. If you specify a comma-delimited list of names <i><b>in quotation marks,</b></i> rEFInd will search on these in turn until it finds a match. For instance, <tt>default_selection "alpha,beta"</tt> will launch <tt>alpha</tt> if it's available, and <tt>beta</tt> if <tt>alpha</tt> is not available but <tt>beta</tt> is. You may optionally follow the match string by two times, in 24-hour format, in which case the entry applies only between those two times. For instance, <tt>default_selection Safety 1:30 2:30</tt> boots the entry called <tt>Safety</tt> by default between the hours of 1:30 and 2:30. These times are specified in whatever format the motherboard clock uses (local time or UTC). If the first value is larger than the second, as in <tt>23:00 1:00</tt>, it is interpreted as crossing midnight—11:00 PM to 1:00 AM in this example. The last <tt>default_selection</tt> setting takes precedence over preceding ones <i>if</i> the time value matches. Thus, you can set a main <tt>default_selection</tt> without a time specification and then set one or more others to override the main setting at specific times.</td>
+ <td>Sets the default boot OS based on the loader's title, which appears in the main menu beneath the icons when you select the loader. You can enter any substring of the title as the <tt>default_selection</tt>, so long as it's two or more characters in length. It's best to use a unique substring, since rEFInd stops searching when it finds the first match. Because rEFInd sorts entries within a directory in descending order by file modification time, if you specify a directory (or volume name, for loaders in a partition's root directory) as the <tt>default_selection</tt>, the newest loader in that directory will be the default. One-character entries are matched against the first character of the title, except for digits, which refer to the numeric order of the boot loader entries. If you specify a comma-delimited list of names <i><b>in quotation marks,</b></i> rEFInd will search on these in turn until it finds a match. For instance, <tt>default_selection "alpha,beta"</tt> will launch <tt>alpha</tt> if it's available, and <tt>beta</tt> if <tt>alpha</tt> is not available but <tt>beta</tt> is. If the <i>first</i> item in such a list is a plus sign (<tt>+</tt>), that refers to the item that rEFInd launched the last time it ran. You may optionally follow the match string by two times, in 24-hour format, in which case the entry applies only between those two times. For instance, <tt>default_selection Safety 1:30 2:30</tt> boots the entry called <tt>Safety</tt> by default between the hours of 1:30 and 2:30. These times are specified in whatever format the motherboard clock uses (local time or UTC). If the first value is larger than the second, as in <tt>23:00 1:00</tt>, it is interpreted as crossing midnight—11:00 PM to 1:00 AM in this example. The last <tt>default_selection</tt> setting takes precedence over preceding ones <i>if</i> the time value matches. Thus, you can set a main <tt>default_selection</tt> without a time specification and then set one or more others to override the main setting at specific times. If you do not specify a <tt>default_selection</tt>, rEFInd attempts to boot the previously-booted entry, or the first entry if there's no record of that or if the previously-booted entry can't be found.</td>
</tr>
<tr>
<td><tt>include</tt></td>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-5/15/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/15/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
version 0.8.0). Note that some UEFI PCs,
such as those with Gigabyte's Hybrid EFI, lack a usable CSM.</li>
-<li>Improved flexibility in setting the default OS to boot. rEFInd enables specifying the default by any substring in the description. You can also specify multiple defaults, so that if the first isn't available, another will take its place (which is useful when using removable disks). You can also add time specifications to set a default to be used only during certain hours of the day.</li>
+<li>Improved flexibility in setting the default OS to boot. rEFInd enables specifying the default by any substring in the description. You can also specify multiple defaults, so that if the first isn't available, another will take its place (which is useful when using removable disks). You can also add time specifications to set a default to be used only during certain hours of the day. If no default loader is set, rEFInd defaults to the last-booted loader.</li>
<li>Support for partition names or GUID values as fallbacks for filesystem labels in certain configuration file settings. Partition names may be shown as values to be displayed as part of the descriptive text for boot tags on the main menu, too, if a filesystem has no label.</li>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/16/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<ul>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.8.1/refind-bin-0.8.1.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.8.2/refind-bin-0.8.2.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. Some users of Arch
Linux have reported problems booting some specific Arch Linux kernels
with rEFInd and some other tools. For them, a <a
- href="http://sourceforge.net/projects/refind/files/0.8.1/refind-bin-gnuefi-0.8.1.zip/download">variant
+ href="http://sourceforge.net/projects/refind/files/0.8.2/refind-bin-gnuefi-0.8.2.zip/download">variant
package</a> exists in which the <i>x</i>86-64 binary was compiled with
GNU-EFI rather than the usual TianoCore EDK2. This change helps some
users with this problem.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.8.1/refind-0.8.1-1.x86_64.rpm/download">A
+ href="http://sourceforge.net/projects/refind/files/0.8.2/refind-0.8.2-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.8.1/refind-0.8.1-1.src.rpm/download">source
+ href="http://sourceforge.net/projects/refind/files/0.8.2/refind-0.8.2-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.8.1/refind_0.8.1-1_amd64.deb/download">A
+ href="http://sourceforge.net/projects/refind/files/0.8.2/refind_0.8.2-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
- package using <tt>alien</tt>.</li>
+ package using <tt>alien</tt>. Note that an <a href="#ppa">Ubuntu
+ PPA</a> is available, which may install more smoothly and will cause
+ rEFInd to automatically update with other packages.</li>
<!--
<li><b><a
<p class="sidebar"><b>Note:</b> At the moment, neither the bootable CD-R image file nor the bootable USB flash drive image file supports booting with Secure Boot active. The x86-64 version of the <a href="http://en.altlinux.org/Rescue">ALT Linux Rescue disc</a> uses a Secure Boot-enabled rEFInd, though, so you may find that useful in some situations.</p>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.8.1/refind-cd-0.8.1.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.8.2/refind-cd-0.8.2.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
computer.</p>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.8.1/refind-flashdrive-0.8.1.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.8.2/refind-flashdrive-0.8.2.zip/download">A
USB flash drive image file</a></b>—Although you can create
your own rEFInd USB flash drive, you may find it easier to download
this version and copy it to your USB drive with <tt>dd</tt> or some
other low-level disk copying utility.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.8.1/refind-src-0.8.1.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.8.2/refind-src-0.8.2.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
<ul>
-<li><b>Ubuntu</b>—Although an official Ubuntu package isn't
- available, I've created a <a
+<li><a name="ppa"><b>Ubuntu</b></a>—Although an official Ubuntu
+ package isn't available, I've created a <a
href="https://launchpad.net/~rodsmith/+archive/refind">rEFInd PPA</a>
for Ubuntu. To use it, type <tt class="userinput">sudo
apt-add-repository ppa:rodsmith/refind</tt>, then <tt
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/15/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/15/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<h2>Installing rEFInd Using an RPM or Debian Package File</h2>
</a>
-<p>Beginning with version 0.6.2, I've included RPM and Debian package files for rEFInd. If you have a working RPM-based or Debian-based Linux installation that boots in EFI mode, using one of these files is likely to be the easiest way to install rEFInd: You need only download the file and issue an appropriate installation command. In some cases, double-clicking the package in your file manager will install it. If that doesn't work, a command like the following will install the RPM on an RPM-based system:</p>
+<p>Beginning with version 0.6.2, I've included RPM and Debian package files for rEFInd; and starting with version 0.8.2, I'm maintaining an Ubuntu PPA for rEFInd. If you have a working RPM-based or Debian-based Linux installation that boots in EFI mode, using one of these files is likely to be the easiest way to install rEFInd: You need only download the file and issue an appropriate installation command. In some cases, double-clicking the package in your file manager will install it. If that doesn't work, a command like the following will install the RPM on an RPM-based system:</p>
-<pre class="listing"># <tt class="userinput">rpm -Uvh refind-0.8.1-1.x86_64.rpm</tt></pre>
+<pre class="listing"># <tt class="userinput">rpm -Uvh refind-0.8.2-1.x86_64.rpm</tt></pre>
<p>On a Debian-based system, the equivalent command is:</p>
-<pre class="listing"># <tt class="userinput">dpkg -i refind_0.8.1-1_amd64.deb</tt></pre>
+<pre class="listing"># <tt class="userinput">dpkg -i refind_0.8.2-1_amd64.deb</tt></pre>
<p>Either command produces output similar to that described for <a href="#installsh">using the <tt>install.sh</tt> script,</a> so you can check it for error messages and other signs of trouble. The package file installs rEFInd and registers it with the EFI to be the default boot loader. The script that runs as part of the installation process tries to determine if you're using Secure Boot, and if so it will try to configure rEFInd to launch using shim; however, this won't work correctly on all systems. Ubuntu 12.10 users who are booting with Secure Boot active should be wary, since the resulting installation will probably try to use Ubuntu's version of shim, which won't work correctly with rEFInd.</p>
+<p>If you're using Ubuntu, you should be able to install the PPA as follows:</p>
+
+<pre class="listing">$ <tt class="userinput">sudo apt-add-repository ppa:rodsmith/refind</tt>
+$ <tt class="userinput">sudo apt-get update</tt>
+$ <tt class="userinput">apt-get install refind</tt></pre></pre>
+
+<p>The PPA version will update automatically with your other software, which you might or might not want to have happen. It's also built with GNU-EFI rather than with TianoCore. This last detail <i>should</i> have no practical effects, but it might be important if you've got a buggy EFI or if there's some undiscovered rEFInd bug that interacts with the build environment.</p>
+
<p>Since version 0.6.3, the installation script makes an attempt to install rEFInd in a bootable way even if you run the script from a BIOS-mode boot, and therefore the RPM and Debian packages do the same. I cannot guarantee that this will work, though, and even if it does, some of the tricks that <tt>install.sh</tt> uses might not last for long. You might therefore want to use <tt><a href="#mvrefind">mvrefind.sh</a></tt> to move your rEFInd installation to another name after you boot Linux for the first time from rEFInd.</p>
-<p>Since version 0.6.2-2, my package files have installed the rEFInd binaries to <tt>/usr/share/refind-<tt class="variable">version</tt></tt>, the documentation to <tt>/usr/share/doc/refind-<tt class="variable">version</tt></tt>, and a few miscellaneous files elsewhere. Upon installation, the package runs the <tt>install.sh</tt> script to copy the files to the ESP. This enables you to re-install rEFInd after the fact by running <tt>install.sh</tt>, should some other tool or OS wipe the ESP or should the installation go awry. In such cases you can <a href="#installsh">use <tt>install.sh</tt></a> or <a href="#manual">install manually.</a></p>
+<p>Since version 0.6.2-2, my package files have installed the rEFInd binaries to <tt>/usr/share/refind-<tt class="variable">version</tt></tt>, the documentation to <tt>/usr/share/doc/refind-<tt class="variable">version</tt></tt>, and a few miscellaneous files elsewhere. (The PPA package omits the version number from the file paths.) Upon installation, the package runs the <tt>install.sh</tt> script to copy the files to the ESP. This enables you to re-install rEFInd after the fact by running <tt>install.sh</tt>, should some other tool or OS wipe the ESP or should the installation go awry. In such cases you can <a href="#installsh">use <tt>install.sh</tt></a> or <a href="#manual">install manually.</a></p>
<a name="installsh">
<h2>Installing rEFInd Using <tt>install.sh</tt> under Linux or Mac OS X</h2>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/19/2012; last Web page update:
-5/15/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<p class="subhead">by Roderick W. Smith, <a
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
-<p>Last Web page update: 5/15/2014</p>
+<p>Last Web page update: 6/8/2014</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<ul>
+<li><b>0.8.2 (6/8/2014)</b>—I've continued to refine the UEFI BIOS-mode boot code with this version; it now uses the BIOS-mode boot entries provided by the firmware by default, and actively scans for new entries only if the <tt>deep_uefi_legacy_scan</tt> token is present in <tt>refind.conf</tt>. This change is motivated by reports I've received of BIOS-mode boot entries multiplying on some systems; however, a deep scan is required to detect the second and subsequent disks on other computers. A second important change is that the default selection is now the last-booted item rather than the first item in the list. You can still set a fixed default via the <tt>default_selection</tt> token, and in fact if you provide a list that begins with <tt>+</tt>, the default will be the previously-booted item unless it can't be found, in which case the subsequent items in the list will be tried. Minor changes include the addition of an icon for Mageia Linux, a minor bug fix in GUID-parsing code, and an update of my personal build system from TianoCore UDK2010.SR1.UP1.P1 to UDK2014. This last item will affect anybody else who uses TianoCore to build rEFInd, since some default paths have changed, so you may need to update yourself or adjust the path in <tt>Make.tiano</tt>.</li>
+
<li><b>0.8.1 (5/15/2014)</b>—The biggest code change in this version is that rEFInd's UEFI-style BIOS-mode boot code now works when rEFInd is built with GNU-EFI as well as when built with Tianocore. This change won't affect users of my binary builds, which have long been made with Tianocore, but if your distribution builds rEFInd with GNU-EFI, it might interest you. Some user-noticeable bug fixes include a fix to a bug that could cause rEFInd to omit boot loaders on a partition's root directory, a fix to a bug that caused <tt>.VolumeIcon.icns</tt> to take a higher-than-intended precedence on OS X boot volumes, a fix to a bug that could cause a BIOS-mode boot from the wrong device in UEFI mode, and improved centering of BIOS-mode boot descriptions on the screen. Other changes include two new optional bitmap fonts (Ubuntu Mono and Nimbus Mono), omission of messages about scanning of boot loaders when <tt>scan_delay</tt> is set to <tt>1</tt>, a change to the search order for icons (PNG files now override ICNS files), and a conversion of all the icons in the icons directory from ICNS to PNG format. Note that this last change may necessitate changing manual boot stanzas if you refer to icons in the default icon directory, depending on how you upgrade rEFInd.</li>
<li><b>0.8.0 (5/4/2014)</b>—The biggest changes with this version relate to BIOS/CSM/legacy support, particularly on UEFI-based PCs. This version can now boot from the second (or later) hard disk on such computers, and is more likely to be able to cope with removable disks. On both Macs and PCs, you can also now use <tt>dont_scan_volumes</tt> to remove a legacy-boot option from the boot list, so long as it has a unique name (as shown in rEFInd's main menu when you highlight the option). This version also introduces the ability to use partition names and partition GUIDs to refer to devices (in <tt>dont_scan_volumes</tt>, displayed in the rEFInd menu, and so on). Note that partition names are stored in GPT data structures. These are different from filesystem names, which are stored in filesystem data structures. rEFInd now limits the length of the firmware identity string shown in the "About" screen, to prevent problems with the string overrunning the space available on an 800x600 display. Finally, I've fixed a memory-allocation bug that caused error message displays on some systems when re-scanning boot loaders. This bug might conceivably have caused some systems to hang when re-scanning, too.</li>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 11/13/2012; last Web page update:
-5/15/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-5/5/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/15/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-5/15/2014, referencing rEFInd 0.8.1</p>
+6/8/2014, referencing rEFInd 0.8.2</p>
<p>This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
height="552" 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 below the icons and description 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 Ubuntu Linux loader, which is further identified by text above the timeout as <i>vmlinuz-3.5.0-27-generic from UBUNTU BOOT</i>.)</p>
+<p>If you don't press any key before the timeout (shown below the icons and description line) expires, the default boot loader will launch. This is normally the item that you launched the last time rEFInd ran, but you can adjust the default by editing the configuration file. (In this example, it's the Ubuntu Linux loader, which is further identified by text above the timeout as <i>vmlinuz-3.5.0-27-generic from UBUNTU 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 an unknown boot loader, OS X, Windows, and Ubuntu. All but the first 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>
/** 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.8.1 " FSW_EFI_STRINGIFY(t) L" File System Driver"
+#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.8.2 " FSW_EFI_STRINGIFY(t) L" File System Driver"
// function prototypes
*/
/* Changes copyright (c) 2013 Roderick W. Smith */
-#define VERSION L"0.8.1"
+#define VERSION L"0.8.2"
//
// config
# default loader using:
# - A digit between 1 and 9, in which case the Nth loader in the menu
# will be the default.
+# - A "+" symbol at the start of the string, which refers to the most
+# recently booted loader.
# - Any substring that corresponds to a portion of the loader's title
# (usually the OS's name or boot loader's path).
# You may also specify multiple selectors by separating them with commas
-# and enclosing the list in quotes.
+# and enclosing the list in quotes. (The "+" option is only meaningful in
+# this context.)
# If you follow the selector(s) with two times, in 24-hour format, the
# default will apply only between those times. The times are in the
# motherboard's time standard, whether that's UTC or local time, so if
# case the last one to match takes precedence. Thus, you can set a main
# option without a time followed by one or more that include times to
# set different defaults for different times of day.
+# The default behavior is to boot the previously-booted OS.
#
#default_selection 1
#default_selection Microsoft
-#default_selection "bzImage,vmlinuz"
+#default_selection "+,bzImage,vmlinuz"
#default_selection Maintenance 23:30 2:00
#default_selection "Maintenance,OS X" 1:00 2:30
Summary: EFI boot manager software
Name: refind
-Version: 0.8.1
+Version: 0.8.2
Release: 1%{?dist}
Summary: EFI boot manager software
License: GPLv3
# wiping out the just-updated files.
%changelog
+* Sun Jun 8 2014 R Smith <rodsmith@rodsbooks.com> - 0.8.2
+- Updated spec file for 0.8.2
* Thu May 15 2014 R Smith <rodsmith@rodsbooks.com> - 0.8.1
-- Updated spec file for 0.8.0
+- Updated spec file for 0.8.1
* Sun May 4 2014 R Smith <rodsmith@rodsbooks.com> - 0.8.0
- Updated spec file for 0.8.0
* Sun Apr 20 2014 R Smith <rodsmith@rodsbooks.com> - 0.7.9
// handle a parameter with a single string argument
static VOID HandleString(IN CHAR16 **TokenList, IN UINTN TokenCount, OUT CHAR16 **Target) {
- if (TokenCount == 2) {
- MyFreePool(*Target);
- *Target = StrDuplicate(TokenList[1]);
+ if ((TokenCount == 2) && Target) {
+ if ((StrLen(TokenList[1]) > 1) && (TokenList[1][0] == L'+') &&
+ ((TokenList[1][1] == L',') || (TokenList[1][1] == L' '))) {
+ if (*Target) {
+ MergeStrings(Target, TokenList[1] + 2, L',');
+ } else {
+ *Target = StrDuplicate(TokenList[1] + 2);
+ } // if/else
+ } else {
+ MyFreePool(*Target);
+ *Target = StrDuplicate(TokenList[1]);
+ } // if/else
} // if
+ PauseForKey();
} // static VOID HandleString()
// Handle a parameter with a series of string arguments, to replace or be added to a
MyFreePool(GlobalConfig.DefaultSelection);
GlobalConfig.DefaultSelection = NULL;
}
-// GlobalConfig.DefaultSelection = AllocatePool(255 * sizeof(CHAR16));
-// Print(L"About to call EfivarGetRaw()\n");
Status = EfivarGetRaw(&RefindGuid, L"PreviousBoot", (CHAR8**) &(GlobalConfig.DefaultSelection), &i);
-// i = 255 * sizeof(CHAR16);
-// Print(L"About to call RT->GetVariable()\n");
-// Status = refit_call5_wrapper(RT->GetVariable, L"PreviousBoot", &RefindGuid, &Attributes, &i, GlobalConfig.DefaultSelection);
if (Status != EFI_SUCCESS)
GlobalConfig.DefaultSelection = NULL;
} // if
} else if (StriCmp(TokenList[0], L"textonly") == 0) {
GlobalConfig.TextOnly = HandleBoolean(TokenList, TokenCount);
-// if ((TokenCount >= 2) && (StriCmp(TokenList[1], L"0") == 0)) {
-// GlobalConfig.TextOnly = FALSE;
-// } else {
-// GlobalConfig.TextOnly = TRUE;
-// }
} else if (StriCmp(TokenList[0], L"textmode") == 0) {
HandleInt(TokenList, TokenCount, &(GlobalConfig.RequestedTextMode));
typedef struct {
REFIT_MENU_ENTRY me;
REFIT_VOLUME *Volume;
-//#ifndef __MAKEWITH_GNUEFI
BDS_COMMON_OPTION *BdsOption;
-//#endif
CHAR16 *LoadOptions;
BOOLEAN Enabled;
} LEGACY_ENTRY;
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
- AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.1.3");
+ AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.8.2");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2014 Roderick W. Smith");
return err;
}
-// Record the value of the loader's name/description in rEFInd's "PreviousBoot" EFI variable.
+// Record the value of the loader's name/description in rEFInd's "PreviousBoot" EFI variable,
+// if it's different from what's already stored there.
static VOID StoreLoaderName(IN CHAR16 *Name) {
EFI_STATUS Status;
CHAR16 *OldName = NULL;
} // if
MyFreePool(OldName);
} // if
-} // VOID StorePreviousLoader()
+} // VOID StoreLoaderName()
//
// EFI OS loader functions
//
-static VOID StartLoader(LOADER_ENTRY *Entry)
+static VOID StartLoader(LOADER_ENTRY *Entry, CHAR16 *SelectionName)
{
UINTN ErrorInStep = 0;
BeginExternalScreen(Entry->UseGraphicsMode, L"Booting OS");
- StoreLoaderName(Entry->me.Title);
+ StoreLoaderName(SelectionName);
StartEFIImage(Entry->DevicePath, Entry->LoadOptions, TYPE_EFI,
Basename(Entry->LoaderPath), Entry->OSType, &ErrorInStep, !Entry->UseGraphicsMode);
FinishExternalScreen();
#define MAX_DISCOVERED_PATHS (16)
-static VOID StartLegacy(IN LEGACY_ENTRY *Entry)
+static VOID StartLegacy(IN LEGACY_ENTRY *Entry, IN CHAR16 *SelectionName)
{
EFI_STATUS Status;
EG_IMAGE *BootLogoImage;
ExtractLegacyLoaderPaths(DiscoveredPathList, MAX_DISCOVERED_PATHS, LegacyLoaderList);
- StoreLoaderName(Entry->me.Title);
+ StoreLoaderName(SelectionName);
Status = StartEFIImageList(DiscoveredPathList, Entry->LoadOptions, TYPE_LEGACY, L"legacy loader", 0, &ErrorInStep, TRUE);
if (Status == EFI_NOT_FOUND) {
if (ErrorInStep == 1) {
} /* static VOID StartLegacy() */
// Start a device on a non-Mac using the EFI_LEGACY_BIOS_PROTOCOL
-static VOID StartLegacyUEFI(LEGACY_ENTRY *Entry)
+static VOID StartLegacyUEFI(LEGACY_ENTRY *Entry, CHAR16 *SelectionName)
{
BeginExternalScreen(TRUE, L"Booting Legacy OS (UEFI mode)");
- StoreLoaderName(Entry->me.Title);
+ StoreLoaderName(SelectionName);
BdsLibConnectDevicePath (Entry->BdsOption->DevicePath);
BdsLibDoLegacyBoot(Entry->BdsOption);
BOOLEAN MokProtocol;
REFIT_MENU_ENTRY *ChosenEntry;
UINTN MenuExit, i;
- CHAR16 *Selection = NULL;
+ CHAR16 *SelectionName = NULL;
EG_PIXEL BGColor;
// bootstrap
} // if
if (GlobalConfig.DefaultSelection)
- Selection = StrDuplicate(GlobalConfig.DefaultSelection);
+ SelectionName = StrDuplicate(GlobalConfig.DefaultSelection);
while (MainLoopRunning) {
- MenuExit = RunMainMenu(&MainMenu, Selection, &ChosenEntry);
+ MenuExit = RunMainMenu(&MainMenu, &SelectionName, &ChosenEntry);
// The Escape key triggers a re-scan operation....
if (MenuExit == MENU_EXIT_ESCAPE) {
break;
case TAG_LOADER: // Boot OS via .EFI loader
- StartLoader((LOADER_ENTRY *)ChosenEntry);
+ StartLoader((LOADER_ENTRY *)ChosenEntry, SelectionName);
break;
case TAG_LEGACY: // Boot legacy OS
- StartLegacy((LEGACY_ENTRY *)ChosenEntry);
+ StartLegacy((LEGACY_ENTRY *)ChosenEntry, SelectionName);
break;
case TAG_LEGACY_UEFI: // Boot a legacy OS on a non-Mac
- StartLegacyUEFI((LEGACY_ENTRY *)ChosenEntry);
+ StartLegacyUEFI((LEGACY_ENTRY *)ChosenEntry, SelectionName);
break;
case TAG_TOOL: // Start a EFI tool
break;
} // switch()
- MyFreePool(Selection);
- Selection = (ChosenEntry->Title) ? StrDuplicate(ChosenEntry->Title) : NULL;
} // while()
// If we end up here, things have gone wrong. Try to reboot, and if that
return RunGenericMenu(Screen, Style, &DefaultEntry, ChosenEntry);
}
-UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN CHAR16* DefaultSelection, OUT REFIT_MENU_ENTRY **ChosenEntry)
+UINTN RunMainMenu(REFIT_MENU_SCREEN *Screen, CHAR16** DefaultSelection, REFIT_MENU_ENTRY **ChosenEntry)
{
MENU_STYLE_FUNC Style = TextMenuStyle;
MENU_STYLE_FUNC MainStyle = TextMenuStyle;
REFIT_MENU_ENTRY *TempChosenEntry;
+ CHAR16 *MenuTitle;
UINTN MenuExit = 0;
INTN DefaultEntryIndex = -1;
INTN DefaultSubmenuIndex = -1;
TileSizes[0] = (GlobalConfig.IconSizes[ICON_SIZE_BIG] * 9) / 8;
TileSizes[1] = (GlobalConfig.IconSizes[ICON_SIZE_SMALL] * 4) / 3;
- if (DefaultSelection != NULL) {
+ if ((DefaultSelection != NULL) && (*DefaultSelection != NULL)) {
// Find a menu entry that includes *DefaultSelection as a substring
- DefaultEntryIndex = FindMenuShortcutEntry(Screen, DefaultSelection);
+ DefaultEntryIndex = FindMenuShortcutEntry(Screen, *DefaultSelection);
}
if (AllowGraphicsMode) {
MenuExit = RunGenericMenu(Screen, MainStyle, &DefaultEntryIndex, &TempChosenEntry);
Screen->TimeoutSeconds = 0;
+ MenuTitle = StrDuplicate(TempChosenEntry->Title);
if (MenuExit == MENU_EXIT_DETAILS) {
if (TempChosenEntry->SubScreen != NULL) {
MenuExit = RunGenericMenu(TempChosenEntry->SubScreen, Style, &DefaultSubmenuIndex, &TempChosenEntry);
if (ChosenEntry)
*ChosenEntry = TempChosenEntry;
+ if (DefaultSelection) {
+ MyFreePool(*DefaultSelection);
+ *DefaultSelection = MenuTitle;
+ } // if
return MenuExit;
} /* UINTN RunMainMenu() */
inline UINTN ComputeRow0PosY(VOID);
VOID MainMenuStyle(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, IN UINTN Function, IN CHAR16 *ParamText);
UINTN RunMenu(IN REFIT_MENU_SCREEN *Screen, OUT REFIT_MENU_ENTRY **ChosenEntry);
-UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN CHAR16* DefaultSelection, OUT REFIT_MENU_ENTRY **ChosenEntry);
+UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN CHAR16** DefaultSelection, OUT REFIT_MENU_ENTRY **ChosenEntry);
#endif