]> code.delx.au - refind/commitdiff
0.3.1 release. Fixed bug that caused bogus error message on Macs.
authorsrs5694 <srs5694@users.sourceforge.net>
Fri, 27 Apr 2012 19:14:41 +0000 (15:14 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Fri, 27 Apr 2012 19:14:41 +0000 (15:14 -0400)
15 files changed:
NEWS.txt
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/themes.html
docs/refind/todo.html
docs/refind/using.html
refind/lib.c
refind/main.c

index 65193803b4ea7b230da65ad7036901faa8d11bbc..8805b75a28273cf9e4bc83c54cd5995e52b19ddd 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,9 @@
-0.3.1 (?/??/2012):
+0.3.1 (4/27/2012):
 ------------------
 
+- Fixed bug that caused spurious "Unsupported while scanning the root
+  directory" messages under some conitions on Macs.
+
 - Modified loader scanning code to sort boot loader entries within a
   directory by modification time, so that the most recently-modified loader
   is first among those in a given directory. Thus, if you specify a
index f7478e13e8cf713f81f70aa030f2c415022cdd4b..eaef3d4c608c5956c59f30be6e6cba20c96c0d97 100644 (file)
@@ -14,7 +14,8 @@
   <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: 4/22/2012, referencing rEFInd 0.3.0</p>\r
+<p>Originally written: 3/14/2012; last Web page update:\r
+4/27/2012, referencing rEFInd 0.3.1</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
index 0e736dc28b5306472e9ed7ff0f94c1ff131aa203..35cacb6c3a9664733618fb04e8ea9e7ba1b6e024 100644 (file)
@@ -14,7 +14,8 @@
   <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-  <p>Originally written: 3/14/2012; last Web page update: 4/22/2012, referencing rEFInd 0.3.0</p>
+<p>Originally written: 3/14/2012; last Web page update:
+4/27/2012, referencing rEFInd 0.3.1</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>
@@ -109,7 +110,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <li>You can place a boot loader in a directory with a name that matches one of rEFInd's standard icons, which take names of the form <tt>os_<tt class="variable">name</tt>.icns</tt>. To use this icon, you would place the boot loader in the directory called <tt class="variable">name</tt>.</li>
 
-<li>You can name an icon file after your boot loader, but with an extension of <tt>.icns</tt>. For instance, if you're using <tt class="variable">loader</tt><tt>.efi</tt>, you would name the icon file <tt class="variable">loader</tt><tt>.icns</tt>. These icon files should be 128x128 images in <a href="http://en.wikipedia.org/wiki/Apple_Icon_Image_format">Apple's ICNS format.</a> You can create such files easily in OS X or convert PNG files to ICNS format with <a href="http://icns.sourceforge.net/">libicns.</a> Note that the <tt>scan_all_linux_kernels</tt> option can cause loader-specific icon files for Linux kernels (but not other loaders) to be improperly assigned loader tags, so if you want to use this option, you should not also assign your kernels custom icons in this way.</li>
+<li>You can name an icon file after your boot loader, but with an extension of <tt>.icns</tt>. For instance, if you're using <tt class="variable">loader</tt><tt>.efi</tt>, you would name the icon file <tt class="variable">loader</tt><tt>.icns</tt>. (If you use the <tt>scan_all_linux_kernels</tt> option, you can give an icon for a Linux kernel without a <tt>.efi</tt> extension a name based on the kernel name but with a <tt>.icns</tt> extension&mdash;for instance, <tt>bzImage-3.3.2.icns</tt> will serve as the icon for the <tt>bzImage-3.3.2</tt> kernel.) These icon files should be 128x128 images in <a href="http://en.wikipedia.org/wiki/Apple_Icon_Image_format">Apple's ICNS format.</a> You can create such files easily in OS X or convert PNG files to ICNS format with <a href="http://icns.sourceforge.net/">libicns.</a></li>
 
 <li>If you're booting OS X from its standard boot loader, or if you place a boot loader file in the root directory of a partition, you can create a file called <tt>.VolumeIcon.icns</tt> that holds an icon file. OS X uses this file for its volume icons, so rEFInd picks up these icons automatically, provided they include 128x128 bitmaps.</li>
 
@@ -195,7 +196,7 @@ timeout 20
 <tr>
    <td><tt>scan_all_linux_kernels</tt></td>
    <td>None</td>
-   <td>When set, causes rEFInd to add Linux kernels (files with names that begin with <tt>vmlinuz</tt> or <tt>bzImage</tt>) to the list of EFI boot loaders, even if they lack <tt>.efi</tt> filename extensions. The hope is that this will simplify use of rEFInd on distributions that provide kernels with EFI stub loader support but that don't give those kernels names that end in <tt>.efi</tt>. Of course, the kernels must still be stored on a filesystem that rEFInd can read, and in a directory that it scans. (<a href="drivers.html">Drivers</a> and the <tt>also_scan_dirs</tt> options can help with those issues.) Note that this option can cause unwanted files to be improperly detected and given loader tags, such as older kernels without EFI stub loader support and <tt>.icns</tt> files used to give kernels unique icons. For this reason, it's disabled by default.</td>
+   <td>When set, causes rEFInd to add Linux kernels (files with names that begin with <tt>vmlinuz</tt> or <tt>bzImage</tt>) to the list of EFI boot loaders, even if they lack <tt>.efi</tt> filename extensions. The hope is that this will simplify use of rEFInd on distributions that provide kernels with EFI stub loader support but that don't give those kernels names that end in <tt>.efi</tt>. Of course, the kernels must still be stored on a filesystem that rEFInd can read, and in a directory that it scans. (<a href="drivers.html">Drivers</a> and the <tt>also_scan_dirs</tt> options can help with those issues.) Note that this option can cause unwanted files to be improperly detected and given loader tags, such as older kernels without EFI stub loader support. For this reason, it's disabled by default.</td>
 </tr>
 <tr>
    <td><tt>default_selection</tt></td>
index 60dead38d2c6ebc6f3307dac26a9ca27006aedc1..6d1a4bea36102bc31f83537aec27203315806fc6 100644 (file)
@@ -14,7 +14,8 @@
   <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-  <p>Originally written: 4/19/2012; last Web page update: 4/22/2012, referencing rEFInd 0.3.0</p>
+<p>Originally written: 4/19/2012; last Web page update:
+4/27/2012, referencing rEFInd 0.3.1</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>
index 3d3fb05e3b2e996a6f9b22d64c23c01b4620502b..0896f2038c67090f45862cf78aa0735292f524db 100644 (file)
@@ -14,7 +14,8 @@
 <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-<p>Originally written: 3/14/2012; last Web page update: 4/22/2012, referencing rEFInd 0.3.0</p>
+<p>Originally written: 3/14/2012; last Web page update:
+4/27/2012, referencing rEFInd 0.3.1</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>
 
index da91a3f91feca90022af02834cf153c6d407c016..a7212cf1bbd864b36b544b15beaf3c8fd2adfd2d 100644 (file)
@@ -14,7 +14,8 @@
   <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-  <p>Originally written: 3/14/2012; last Web page update: 4/22/2012, referencing rEFInd 0.3.0</p>
+<p>Originally written: 3/14/2012; last Web page update:
+4/27/2012, referencing rEFInd 0.3.1</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>
 
@@ -96,7 +97,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
-<li><b><a href="http://sourceforge.net/projects/refind/files/0.3.0/refind-src-0.3.0.zip/download">A
+<li><b><a href="http://sourceforge.net/projects/refind/files/0.3.1/refind-src-0.3.1.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="http://sourceforge.net/projects/gnu-efi">GNU-EFI</a> development
@@ -104,16 +105,18 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
     that toolchain is theoretically possible, but I've not attempted
     it.</li>
 
-<li><b><a href="http://sourceforge.net/projects/refind/files/0.3.0/refind-bin-0.3.0.zip/download">A
-    binary zip file</a></b>&mdash;Download this if you want to install rEFInd 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 optical disc. This zip file package includes both
-    <i>x</i>86 (aka IA32) and <i>x</i>86-64 (aka <i>x</i>64, AMD64, or EM64T)
-    versions of rEFInd. Which you install depends on your architecture, as
-    described on the <a href="installing.html">Installing rEFInd</a> page.</li>
+<li><b><a
+    href="http://sourceforge.net/projects/refind/files/0.3.1/refind-bin-0.3.1.zip/download">A
+    binary zip file</a></b>&mdash;Download this if you want to install
+    rEFInd 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 optical disc. This zip file
+    package includes both <i>x</i>86 (aka IA32) and <i>x</i>86-64 (aka
+    <i>x</i>64, AMD64, or EM64T) versions of rEFInd. Which you install
+    depends on your architecture, as described on the <a
+    href="installing.html">Installing rEFInd</a> page.</li>
 
 <li><b><a
-    href="http://sourceforge.net/projects/refind/files/0.3.0/refind-cd-0.3.0.zip/download">A
+    href="http://sourceforge.net/projects/refind/files/0.3.1/refind-cd-0.3.1.zip/download">A
     CD-R image file</a></b>&mdash;This download contains the same files as
     the zip file, but you can burn it to a CD-R to test rEFInd without
     installing it first. (It boots on UEFI PCs, but fails on some older
index be0e0d9180023a4a4d82e36381d7b1758a515369..ccacfa4f9ce41d0337cff2963a2b1165f2169560 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>Originally written: 3/14/2012; last Web page update: 4/22/2012, referencing rEFInd 0.3.0</p>
+  <p>Originally written: 3/14/2012; last Web page update: 4/27/2012, referencing rEFInd 0.3.1</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>
index ee18e526ddb6f87a1b753430da646534a0f0150f..1ac51b7363558b51664b00610323155ba6626fa9 100644 (file)
 <body>
   <h1>The rEFInd Boot Manager:<br />Installing rEFInd</h1>
 
-  <p class="subhead">by Roderick W. Smith, <a
+<p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-  <p>Originally written: 3/14/2012; last Web page update: 4/24/2012, referencing rEFInd 0.3.0</p>
+<p>Originally written: 3/14/2012; last Web page update:
+4/27/2012, referencing rEFInd 0.3.1</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>
index a0e985cf38944f8300d02a5471a121ef69a05142..76801016d2d64ba819ba694b334f518d0c775432 100644 (file)
@@ -14,7 +14,8 @@
 <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-<p>Originally written: 3/19/2012; last Web page update: 4/22/2012, referencing rEFInd 0.3.0</p>
+<p>Originally written: 3/19/2012; last Web page update:
+4/27/2012, referencing rEFInd 0.3.1</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>
@@ -227,7 +228,7 @@ total 17943
 
 <p>Ordinarily, a kernel booted in this way must reside on the ESP, or at least on another FAT partition. On a Macintosh, though, you can use HFS+ to house your kernel files. In fact, that may be necessary; my Mac Mini hangs when I try to boot a Linux kernel via an EFI stub loader from the computer's ESP, but it works fine when booting from an HFS+ partition. If you use <a href="drivers.html">EFI drivers,</a> though, you can place your kernel on any filesystem for which an EFI driver exists. This list is currently rather limited (ext2fs/ext3fs, ReiserFS, ISO-9660, and HFS+), but even just one or two options might help a lot if you've got an undersized ESP or if copying your kernel file to the ESP is a hassle you'd rather avoid.</p>
 
-<p>Beginning with version 0.3.1, rEFInd sorts boot loader entries <i>within each directory</i> by time stamp, so that the most recent entry comes first. Thus, if you specify a directory name (or a volume label, for loaders stored in a volume's root directory) as the <tt>default_selection</tt>, rEFInd will make the most recent loader in the directory the default. This can obviate the need to adjust this configuration parameter when you add a new kernel; chances are you want the most recently-added kernel to be the default, and rEFInd makes it so when you set the <tt>default_selection</tt> in this way. If you <i>don't</i> want the latest kernel to become the default, you can use <tt>touch</tt> to give the desired kernel (or other boot loader) in the directory a more recent time stamp, or you can set <tt>default_selection</tt> to a value that uniquely identifies your desired default loader.</p>
+<p>Beginning with version 0.3.1, rEFInd sorts boot loader entries <i>within each directory</i> by time stamp, so that the most recent entry comes first. Thus, if you specify a directory name (or a volume label, for loaders stored in a volume's root directory) as the <tt>default_selection</tt>, rEFInd will make the most recent loader in the directory the default. This can obviate the need to adjust this configuration parameter when you add a new kernel; chances are you want the most recently-added kernel to be the default, and rEFInd makes it so when you set the <tt>default_selection</tt> in this way. If you <i>don't</i> want the latest kernel to become the default, you can use <tt>touch</tt> to give the desired kernel (or other boot loader) in the directory a more recent time stamp, or you can set <tt>default_selection</tt> to a value that uniquely identifies your desired default loader. One caveat you should keep in mind is that the EFI and Windows interpret the hardware clock as local time, whereas Mac OS X uses <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time">Coordinated Universal Time (UTC)</a>. Linux can work either way. Thus, time stamps for boot loaders can be skewed by several hours depending on the environment in which they were created or last modified.</p>
 
 <p class="sidebar"><b>Tip for distribution maintainers:</b> If you maintain an <tt>EFI/<tt class="variable">distname</tt></tt> directory for your kernels, you can place your version of rEFInd in a directory called <tt>EFI/<tt class="variable">distname</tt>/refind</tt>. This will avoid collisions with duplicate rEFInd installations from other distributions.</p>
 
index 8b53c10b455a6672ac5cbd1cf3684fcc4556a8b1..943f0e15f824dc37148f648010baf0754cc56328 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: 4/22/2012</p>
+<p>Last Web page update: 4/27/2012</p>
 
 
 <p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
@@ -93,6 +93,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
 <ul>
 
+<li><b>0.3.1 (4/27/2012)</b>&mdash;You'll find a few minor enhancements and bug fixes in this version, none of which affect the configuration files. rEFInd now sorts its boot loader entries <i>within each directory</i> by date, with the newest items first. The intent is that you can specify a directory name as the <tt>default_selection</tt> and the most recent boot loader in that directory will become the default. This may obviate the need to adjust the default after adding a new Linux kernel with EFI stub loader support. I've also improved the handling of <tt>.icns</tt> files for Linux kernels that lack <tt>.efi</tt> extensions; loader-specific icons for these kernels should now take the name of the kernel plus <tt>.icns</tt>&mdash;for instance, <tt>vmlinuz-0.3.2.icns</tt> for <tt>vmlinuz-0.3.2</tt>. rEFInd also now hides all <tt>.icns</tt> files from the boot loader list. Finally, this version fixes a bug, introduced in version 0.3.0, that could cause spurious <tt>Unsupported while scanning the root directory</tt> errors under some conditions on Macs.</li>
+
 <li><b>0.3.0 (4/22/2012)</b>&mdash;This version marks the official transition from alpha to beta status for rEFInd. This isn't because of any important objective milestone being passed; it's just that rEFInd has been used by many people who have reported no show-stopping bugs, so I'm now confident that rEFInd is stable enough for general use. That's not to say it's perfect; it still has numerous <a href="todo.html">known bugs and limitations.</a> That's why it's still beta. To get down to specifics, this version adds two new configuration file tokens: <tt>resolution</tt>, which sets the screen resolution; and <tt>scan_all_linux_kernels</tt>, which adds Linux kernel files to the boot loader list even if they lack <tt>.efi</tt> filename extensions. See the <a href="configfile.html">Configuring the Boot Manager</a> page for details on these new options. I've also fixed some bugs: One that sometimes caused Macs to crash when returning from the EFI shell or other programs; another that caused rEFInd to fail to scan filesystems if the filesystem driver didn't return a volume name; and a third that caused rEFInd to fail to detect boot loaders depending on the case of the filename on some EFIs (this is really a workaround for an EFI implementation bug). The first of these is a <i>very</i> tentative fix and it could have negative effects on some systems (non-Mac EFI 1.x systems or Macs that weren't affected by the bug in other recent releases), so be sure to <a href="mailto:rodsmith@rodsbooks.com">contact me</a> if rEFInd crashes or otherwise misbehaves after you use an EFI shell.</li>
 
 <li><b>0.2.7 (4/19/2012)</b>&mdash;I've added two new tokens to the <tt>refind.conf</tt> file, with associated new functionality. The new <tt>scan_driver_dirs</tt> option tells rEFInd where to scan for EFI drivers, in addition to the default of the <tt>drivers</tt> subdirectory of the rEFInd installation directory. For more on EFI drivers, see <a href="drivers.html">Using EFI Drivers.</a> Note that previous versions of rEFInd couldn't load drivers at all, although they could make use of hardware and filesystems activated by drivers loaded before rEFInd launched. The second new token is <tt>also_scan_dirs</tt>, which adds arbitrary directories to the list that rEFInd scans for boot loaders. (Without this option, rEFInd scans each volume's boot directory and every subdirectory of the <tt>/EFI</tt> directory, with the exception of <tt>/EFI/tools</tt> and rEFInd's own directory.) This version also fixes a minor bug that caused rEFInd to sometimes include itself in the list of OS options. Finally, if you build rEFInd yourself, you should be aware that it now requires a newer version of the GNU-EFI library than it required in the past. See the <tt>BUILDING.txt</tt> file, included in the source code package, for details.</li>
index 2049bba3224bd437080174c437d22b6f6d693d67..ab5be393bfc458a32cf2303928cc54c0d2b812b8 100644 (file)
@@ -14,7 +14,8 @@
   <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-  <p>Originally written: 4/19/2012; last Web page update: 4/22/2012, referencing rEFInd 0.3.0</p>
+<p>Originally written: 4/19/2012; last Web page update:
+4/27/2012, referencing rEFInd 0.3.1</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>
index a6e06bf1837fd433874894e0bd0912842ab549f4..2e92da5a630690e2f3ff870dd9ef5bbd0b789cb8 100644 (file)
@@ -14,7 +14,8 @@
   <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-  <p>Originally written: 3/14/2012; last Web page update: 4/22/2012, referencing rEFInd 0.3.0</p>
+<p>Originally written: 3/14/2012; last Web page update:
+4/27/2012, referencing rEFInd 0.3.1</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>
@@ -218,6 +219,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 <li>I'd like to find a way to have rEFInd re-scan removable media when
     they're inserted.</li>
 
+<li>Enabling users to eject removable media would be useful.</li>
+
 <li>I'd like to give the user the ability to set custom options on a
     per-boot basis, similar to what's possible in GRUB.</li>
 
index d9f527a614f81b884d525244d6b8bccf02cb589f..a8b72ac30f2a037d54fccb15ea42264f81ebdd41 100644 (file)
@@ -14,7 +14,8 @@
   <p class="subhead">by Roderick W. Smith, <a
 href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
 
-  <p>Originally written: 3/14/2012; last Web page update: 4/22/2012, referencing rEFInd 0.3.0</p>
+<p>Originally written: 3/14/2012; last Web page update:
+4/27/2012, referencing rEFInd 0.3.1</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>
index 333e0c10e7dc43edc34b17025db7b06d1625e426..fde385f46a595bf8227d3879735bfebc0451ea35 100644 (file)
@@ -232,7 +232,7 @@ VOID AddListElement(IN OUT VOID ***ListPtr, IN OUT UINTN *ElementCount, IN VOID
 VOID FreeList(IN OUT VOID ***ListPtr, IN OUT UINTN *ElementCount)
 {
     UINTN i;
-    
+
     if (*ElementCount > 0) {
         for (i = 0; i < *ElementCount; i++) {
             // TODO: call a user-provided routine for each element here
@@ -265,9 +265,9 @@ VOID ExtractLegacyLoaderPaths(EFI_DEVICE_PATH **PathList, UINTN MaxPaths, EFI_DE
     EFI_LOADED_IMAGE    *LoadedImage;
     EFI_DEVICE_PATH     *DevicePath;
     BOOLEAN             Seen;
-    
+
     MaxPaths--;  // leave space for the terminating NULL pointer
-    
+
     // get all LoadedImage handles
     Status = LibLocateHandle(ByProtocol, &LoadedImageProtocol, NULL,
                              &HandleCount, &Handles);
@@ -281,19 +281,19 @@ VOID ExtractLegacyLoaderPaths(EFI_DEVICE_PATH **PathList, UINTN MaxPaths, EFI_DE
     }
     for (HandleIndex = 0; HandleIndex < HandleCount && PathCount < MaxPaths; HandleIndex++) {
         Handle = Handles[HandleIndex];
-        
+
         Status = refit_call3_wrapper(BS->HandleProtocol, Handle, &LoadedImageProtocol, (VOID **) &LoadedImage);
         if (EFI_ERROR(Status))
             continue;  // This can only happen if the firmware scewed up, ignore it.
-        
+
         Status = refit_call3_wrapper(BS->HandleProtocol, LoadedImage->DeviceHandle, &DevicePathProtocol, (VOID **) &DevicePath);
         if (EFI_ERROR(Status))
             continue;  // This happens, ignore it.
-        
+
         // Only grab memory range nodes
         if (DevicePathType(DevicePath) != HARDWARE_DEVICE_PATH || DevicePathSubType(DevicePath) != HW_MEMMAP_DP)
             continue;
-        
+
         // Check if we have this device path in the list already
         // WARNING: This assumes the first node in the device path is unique!
         Seen = FALSE;
@@ -346,12 +346,12 @@ static VOID ScanVolumeBootcode(IN OUT REFIT_VOLUME *Volume, OUT BOOLEAN *Bootabl
                                  Volume->BlockIO, Volume->BlockIO->Media->MediaId,
                                  Volume->BlockIOOffset, SECTOR_SIZE, SectorBuffer);
     if (!EFI_ERROR(Status)) {
-        
+
         if (*((UINT16 *)(SectorBuffer + 510)) == 0xaa55 && SectorBuffer[0] != 0) {
             *Bootable = TRUE;
             Volume->HasBootCode = TRUE;
         }
-        
+
         // detect specific boot codes
         if (CompareMem(SectorBuffer + 2, "LILO", 4) == 0 ||
             CompareMem(SectorBuffer + 6, "LILO", 4) == 0 ||
@@ -360,12 +360,12 @@ static VOID ScanVolumeBootcode(IN OUT REFIT_VOLUME *Volume, OUT BOOLEAN *Bootabl
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"linux";
             Volume->OSName = L"Linux";
-            
+
         } else if (FindMem(SectorBuffer, 512, "Geom\0Hard Disk\0Read\0 Error", 26) >= 0) {   // GRUB
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"grub,linux";
             Volume->OSName = L"Linux";
-            
+
         } else if ((*((UINT32 *)(SectorBuffer + 502)) == 0 &&
                     *((UINT32 *)(SectorBuffer + 506)) == 50000 &&
                     *((UINT16 *)(SectorBuffer + 510)) == 0xaa55) ||
@@ -373,51 +373,51 @@ static VOID ScanVolumeBootcode(IN OUT REFIT_VOLUME *Volume, OUT BOOLEAN *Bootabl
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"freebsd";
             Volume->OSName = L"FreeBSD";
-            
+
         } else if (FindMem(SectorBuffer, 512, "!Loading", 8) >= 0 ||
                    FindMem(SectorBuffer, SECTOR_SIZE, "/cdboot\0/CDBOOT\0", 16) >= 0) {
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"openbsd";
             Volume->OSName = L"OpenBSD";
-            
+
         } else if (FindMem(SectorBuffer, 512, "Not a bootxx image", 18) >= 0 ||
                    *((UINT32 *)(SectorBuffer + 1028)) == 0x7886b6d1) {
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"netbsd";
             Volume->OSName = L"NetBSD";
-            
+
         } else if (FindMem(SectorBuffer, SECTOR_SIZE, "NTLDR", 5) >= 0) {
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"win";
             Volume->OSName = L"Windows";
-            
+
         } else if (FindMem(SectorBuffer, SECTOR_SIZE, "BOOTMGR", 7) >= 0) {
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"winvista,win";
             Volume->OSName = L"Windows";
-            
+
         } else if (FindMem(SectorBuffer, 512, "CPUBOOT SYS", 11) >= 0 ||
                    FindMem(SectorBuffer, 512, "KERNEL  SYS", 11) >= 0) {
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"freedos";
             Volume->OSName = L"FreeDOS";
-            
+
         } else if (FindMem(SectorBuffer, 512, "OS2LDR", 6) >= 0 ||
                    FindMem(SectorBuffer, 512, "OS2BOOT", 7) >= 0) {
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"ecomstation";
             Volume->OSName = L"eComStation";
-            
+
         } else if (FindMem(SectorBuffer, 512, "Be Boot Loader", 14) >= 0) {
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"beos";
             Volume->OSName = L"BeOS";
-            
+
         } else if (FindMem(SectorBuffer, 512, "yT Boot Loader", 14) >= 0) {
             Volume->HasBootCode = TRUE;
             Volume->OSIconName = L"zeta,beos";
             Volume->OSName = L"ZETA";
-            
+
         } else if (FindMem(SectorBuffer, 512, "\x04" "beos\x06" "system\x05" "zbeos", 18) >= 0 ||
                    FindMem(SectorBuffer, 512, "\x06" "system\x0c" "haiku_loader", 20) >= 0) {
             Volume->HasBootCode = TRUE;
@@ -425,19 +425,19 @@ static VOID ScanVolumeBootcode(IN OUT REFIT_VOLUME *Volume, OUT BOOLEAN *Bootabl
             Volume->OSName = L"Haiku";
 
         }
-        
+
         // NOTE: If you add an operating system with a name that starts with 'W' or 'L', you
         //  need to fix AddLegacyEntry in main.c.
-        
+
 #if REFIT_DEBUG > 0
         Print(L"  Result of bootcode detection: %s %s (%s)\n",
               Volume->HasBootCode ? L"bootable" : L"non-bootable",
               Volume->OSName, Volume->OSIconName);
 #endif
-        
+
         if (FindMem(SectorBuffer, 512, "Non-system disk", 15) >= 0)   // dummy FAT boot sector
             Volume->HasBootCode = FALSE;
-        
+
         // check for MBR partition table
         if (*((UINT16 *)(SectorBuffer + 510)) == 0xaa55) {
             MbrTableFound = FALSE;
@@ -968,7 +968,7 @@ BOOLEAN DirIterNext(IN OUT REFIT_DIR_ITER *DirIter, IN UINTN FilterMode, IN CHAR
     do {
         DirIter->LastStatus = DirNextEntry(DirIter->DirHandle, &(DirIter->LastFileInfo), FilterMode);
         if (EFI_ERROR(DirIter->LastStatus))
-            return FALSE;
+           return FALSE;
         if (DirIter->LastFileInfo == NULL)  // end of listing
             return FALSE;
         if (FilePattern != NULL) {
@@ -982,7 +982,7 @@ BOOLEAN DirIterNext(IN OUT REFIT_DIR_ITER *DirIter, IN UINTN FilterMode, IN CHAR
             // else continue loop
         } else
             break;
-    } while (KeepGoing);
+   } while (KeepGoing);
 
     *DirEntry = DirIter->LastFileInfo;
     return TRUE;
index 21d8aa837579c2403272f46e21b141cf284d032e..572f36aa1214e42c38ebf331f856791eec11df6a 100644 (file)
@@ -104,7 +104,7 @@ static VOID AboutrEFInd(VOID)
 {
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.3.0.2");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.3.1");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
@@ -736,6 +736,7 @@ static VOID ScanLoaderDir(IN REFIT_VOLUME *Volume, IN CHAR16 *Path, IN CHAR16 *P
                 SPrint(FileName, 255, L"\\%s\\%s", Path, DirEntry->FileName);
           else
                 SPrint(FileName, 255, L"\\%s", DirEntry->FileName);
+          CleanUpPathNameSlashes(FileName);
           NewLoader = AllocateZeroPool(sizeof(struct LOADER_LIST));
           if (NewLoader != NULL) {
              NewLoader->FileName = StrDuplicate(FileName);
@@ -792,7 +793,7 @@ static VOID ScanEfiFiles(REFIT_VOLUME *Volume) {
       }
 
       // scan the root directory for EFI executables
-      ScanLoaderDir(Volume, NULL, MatchPatterns);
+      ScanLoaderDir(Volume, L"\\", MatchPatterns);
 
       // scan subdirectories of the EFI directory (as per the standard)
       DirIterOpen(Volume->RootDir, L"EFI", &EfiDirIter);