]> code.delx.au - refind/commitdiff
Version 0.8.2 release; refinement to last-booted as default selection
authorsrs5694 <srs5694@users.sourceforge.net>
Sun, 8 Jun 2014 16:46:34 +0000 (12:46 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Sun, 8 Jun 2014 16:46:34 +0000 (12:46 -0400)
code.

24 files changed:
NEWS.txt
debian/changelog
docs/refind/bootmode.html
docs/refind/configfile.html
docs/refind/drivers.html
docs/refind/features.html
docs/refind/getting.html
docs/refind/index.html
docs/refind/installing.html
docs/refind/linux.html
docs/refind/revisions.html
docs/refind/secureboot.html
docs/refind/themes.html
docs/refind/todo.html
docs/refind/using.html
filesystems/fsw_efi.c
gptsync/gptsync.h
refind.conf-sample
refind.spec
refind/config.c
refind/global.h
refind/main.c
refind/menu.c
refind/menu.h

index 1e5686dbc435af11267deaf7e550c1da0e8e6981..61ae5093f857ebdf0b221741e26e0ba7014ac34b 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,5 +1,5 @@
-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
index 03838e3410a3790aa6bbed23a1f831d4aa9f09cf..47f98c5b225bfbd23cb9aea4df78cf20bab030ec 100644 (file)
@@ -1,3 +1,9 @@
+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
index 4499dd508ffa778282d64d5965e218dcad398937..1eb783b14c4f81467a060114dce1effa37749c17 100644 (file)
@@ -15,7 +15,7 @@
 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
index bbc306d014382c0e8758e54e2d05c18d5fb843b6..0aaf3f42781f272fc4c1e63655457a3050d9a6c3 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-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>
@@ -360,7 +360,7 @@ timeout 20
 <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&mdash;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&mdash;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>
index 1913978ee67518d94f31492c0019cf26bdbf9e38..4803830e54abf944bfbfb10ac36413b84cf986ab 100644 (file)
@@ -15,7 +15,7 @@
 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>
index ecf77dfb93392ea3e40de7a940322c5ee5988e8c..2ff417a174388b0005f5befd94f39e1a03e67e49 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-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>
 
@@ -180,7 +180,7 @@ suitable CSM support (as of version 0.4.6, with significant improvements in
 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>
 
index dc989b5604ceac20ab9d9af08f77ecbab13c204e..8e9a33ff3e3782d9cae5d87c48f949dc5a10721d 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-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>
 
@@ -136,7 +136,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></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>&mdash;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
@@ -146,13 +146,13 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     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>&mdash;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
@@ -161,17 +161,19 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     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>&mdash;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
@@ -189,7 +191,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <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>&mdash;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
@@ -213,14 +215,14 @@ 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.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>&mdash;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>&mdash;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
@@ -250,8 +252,8 @@ computer.</p>
 
 <ul>
 
-<li><b>Ubuntu</b>&mdash;Although an official Ubuntu package isn't
-    available, I've created a <a
+<li><a name="ppa"><b>Ubuntu</b></a>&mdash;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
index d9eeb6999bc869281382c25307d20354edb46e01..ca3e9632b13951263c942506b458ce240e34c184 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-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>
index d22af0165742c1632526d119a9296a2c244ebc01..afa6cd0951788b0aa5886db67f6da235182c006b 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-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>
@@ -206,19 +206,27 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></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>
index e85124baa5d7c58f1706391f9b70c72a07a14813..fb9f214b39246adc6195dd7d2e6955faa7425794 100644 (file)
@@ -15,7 +15,7 @@
 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>
index 3f73877fec9997a32e3d6d1dcceb719cf373b368..a190e568dadb8d7b512f8817bc51e9d30f4526ab 100644 (file)
@@ -14,7 +14,7 @@
 <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>
 
@@ -130,6 +130,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
+<li><b>0.8.2 (6/8/2014)</b>&mdash;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>&mdash;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>&mdash;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>
index 1a6b3a64e90005dd3a051adb2971977bc44cc385..273f882d42c53784a8ae0c92f5099bb3bb60cd7f 100644 (file)
@@ -15,7 +15,7 @@
 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>
index 60d90091f7d6ad4a74f323ba5e6e6601d5a6399e..c9412459f8e42335c435920906dcbc679634e053 100644 (file)
@@ -15,7 +15,7 @@
 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>
index f34bdef5df2957a74e93607455b61f5083cd65ad..0bf2271366d1235d0d0513ba54f097df8c0ba449 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-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>
index 8e651a18c1f203d95b829a52879211c4d6c5766d..72998b8eaaafc86846c98ecd018704ed316cbb1d 100644 (file)
@@ -15,7 +15,7 @@
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <p>Originally written: 3/14/2012; last Web page update:
-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>
@@ -164,7 +164,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></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>
 
index 385883147cc5806d655d614ada81c1b72902157e..4c5dafd27337d82b39617ba673ab6cf640bd529e 100644 (file)
@@ -98,7 +98,7 @@ EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO
 /** 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
 
index eab0164dd22d8b50faa408021bc522b1d604abbc..4902d08001a54d69ca64abb8712a6f9af4fb1ea5 100644 (file)
@@ -35,7 +35,7 @@
  */
 /* Changes copyright (c) 2013 Roderick W. Smith */
 
-#define VERSION L"0.8.1"
+#define VERSION L"0.8.2"
 
 //
 // config
index 30f62b7f2efed9c8531fba0827cf0fed1a0f0899..4c6fdd0d1bdda92e39373ac6c53e11862e04c362 100644 (file)
@@ -316,10 +316,13 @@ scan_all_linux_kernels
 # 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
@@ -329,10 +332,11 @@ scan_all_linux_kernels
 # 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
 
index 3bf7d80a07b7115413a237f90218b0ba783c8219..15a37fb4d87c5f04e190de0c53be74eff6fb58f8 100644 (file)
@@ -1,6 +1,6 @@
 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
@@ -159,8 +159,10 @@ fi
 # 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
index e261ef8b4c91d677d9e834400b77d787d02ae98e..e58238b53b55eb4b94366720510398b5e4b66213 100644 (file)
@@ -319,10 +319,20 @@ static VOID HandleInt(IN CHAR16 **TokenList, IN UINTN TokenCount, OUT UINTN *Val
 
 // 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
@@ -460,12 +470,7 @@ VOID ReadConfig(CHAR16 *FileName)
           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
@@ -625,11 +630,6 @@ VOID ReadConfig(CHAR16 *FileName)
 
         } 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));
index 3b22f1d2d612a07b72ac0d1f0cfdf1e63ba590b4..95ac32f19fb6ad00d3bfb9f28d4ffe11ca7c4114 100644 (file)
@@ -237,9 +237,7 @@ typedef struct {
 typedef struct {
    REFIT_MENU_ENTRY  me;
    REFIT_VOLUME      *Volume;
-//#ifndef __MAKEWITH_GNUEFI
    BDS_COMMON_OPTION *BdsOption;
-//#endif
    CHAR16            *LoadOptions;
    BOOLEAN           Enabled;
 } LEGACY_ENTRY;
index f709e598bb767734e2634e8dcf862d432cd6eff3..aacbe93b848a4c5975c273fe17881f7d269d893e 100644 (file)
@@ -169,7 +169,7 @@ static VOID AboutrEFInd(VOID)
 
     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");
@@ -410,7 +410,8 @@ static EFI_STATUS RebootIntoFirmware(VOID) {
    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;
@@ -423,18 +424,18 @@ static VOID StoreLoaderName(IN CHAR16 *Name) {
       } // 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();
@@ -1605,7 +1606,7 @@ static EFI_DEVICE_PATH *LegacyLoaderList[] = {
 
 #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;
@@ -1627,7 +1628,7 @@ static VOID StartLegacy(IN LEGACY_ENTRY *Entry)
 
     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) {
@@ -1641,10 +1642,10 @@ static VOID StartLegacy(IN LEGACY_ENTRY *Entry)
 } /* 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);
@@ -2508,7 +2509,7 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
     BOOLEAN            MokProtocol;
     REFIT_MENU_ENTRY   *ChosenEntry;
     UINTN              MenuExit, i;
-    CHAR16             *Selection = NULL;
+    CHAR16             *SelectionName = NULL;
     EG_PIXEL           BGColor;
 
     // bootstrap
@@ -2553,10 +2554,10 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
     } // 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) {
@@ -2584,15 +2585,15 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
                 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
@@ -2613,8 +2614,6 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
                 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
index 427deda0f70121e6f88903d88f5c0ee42911da71..ebe7cae714e3d562c6914940a9c8eb55b5eda4d1 100644 (file)
@@ -1156,11 +1156,12 @@ UINTN RunMenu(IN REFIT_MENU_SCREEN *Screen, OUT REFIT_MENU_ENTRY **ChosenEntry)
     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;
@@ -1168,9 +1169,9 @@ UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN CHAR16* DefaultSelection, OUT
     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) {
@@ -1182,6 +1183,7 @@ UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN CHAR16* DefaultSelection, OUT
         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);
@@ -1199,5 +1201,9 @@ UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN CHAR16* DefaultSelection, OUT
 
     if (ChosenEntry)
         *ChosenEntry = TempChosenEntry;
+    if (DefaultSelection) {
+       MyFreePool(*DefaultSelection);
+       *DefaultSelection = MenuTitle;
+    } // if
     return MenuExit;
 } /* UINTN RunMainMenu() */
index aeb1c9679e36129cf24400c8c5e2da047ad7799f..5724c4c037b9884052aa4c8249310f8a86e6f199 100644 (file)
@@ -97,7 +97,7 @@ VOID AddMenuEntry(IN REFIT_MENU_SCREEN *Screen, IN REFIT_MENU_ENTRY *Entry);
 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