* The Fatdog Linux icon was created by the Fatdog developers (see
http://distro.ibiblio.org/fatdog/web/ for the Fatdog project).
+* The ALT Linux icon was donated by the ALT Linux developers (see
+ http://www.altlinux.com).
-0.6.5 (1/??/2013):
+0.6.5 (1/16/2013):
------------------
- Improved text color support: rEFInd now uses black text against light
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>\r
\r
<p>Originally written: 3/14/2013; last Web page update:\r
-1/8/2012, referencing rEFInd 0.6.4</p>\r
+1/16/2012, referencing rEFInd 0.6.5</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
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<tr>
<td><tt>banner</tt></td>
<td>filename</td>
- <td>Specifies a custom banner file to replaced the rEFInd banner image. The file should be a BMP image with a color depth of 24, 8, 4, or 1 bits. The file path is relative to the directory where the rEFInd binary is stored.</td>
+ <td>Specifies a custom banner file to replace the rEFInd banner image. The file should be a BMP or PNG image with a color depth of 24, 8, 4, or 1 bits. The file path is relative to the directory where the rEFInd binary is stored.</td>
</tr>
<tr>
<td><tt>selection_big</tt></td>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<li>The ability to specify an additional icon storage directory, to assist in efforts to customize rEFInd's appearance (as of version 0.3.4).</li>
+<li>Support for icons, selection backgrounds, and banner graphics in PNG format, in addition to the ICNS and BMP formats supported by rEFIt.</li>
+
+<li>Support for full-screen banner images.</li>
+
<li>The ability to set the screen's graphics resolution, within limits imposed by the EFI (as of rEFInd 0.3.0). Similarly, as of version 0.6.0, you can specify the text-mode resolution.</li>
<li>Proper handling of more OS options than can fit on the screen. (rEFIt displays an empty list in graphical mode when it detects too many OSes.)</li>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<ul>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.6.4/refind-src-0.6.4.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.5/refind-src-0.6.5.zip/download">A
source code zip file</a></b>—This is useful if you want to compile
the software locally. Note that I use Linux with the <a
href="https://sourceforge.net/projects/tianocore/">TianoCore EFI
development tools are also supported.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.6.4/refind-bin-0.6.4.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.5/refind-bin-0.6.5.zip/download">A
binary zip file</a></b>—Download this if you want to install
rEFInd and/or its filesystem drivers on an <i>x</i>86 or <i>x</i>86-64
computer and have no need to test rEFInd first by booting it on an
href="installing.html">Installing rEFInd</a> page.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.6.4/refind-0.6.4-1.x86_64.rpm/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.5/refind-0.6.5-1.x86_64.rpm/download">A
binary RPM file</a></b>—If you use an RPM-based <i>x</i>86-64
Linux system such as Fedora or openSUSE, you can install the binary RPM
package rather than use the binary zip file. (I don't provide an
rEFInd</a> page) as part of the installation process. Distribution
maintainers can examine the <tt>refind.spec</tt> file in the source
package and tweak it to their needs. The <a
- href="http://sourceforge.net/projects/refind/files/0.6.4/refind-0.6.4-1.src.rpm/download">source
+ href="http://sourceforge.net/projects/refind/files/0.6.5/refind-0.6.5-1.src.rpm/download">source
RPM file</a> might or might not build on your system as-is; it relies
on assumptions about the locations of the GNU-EFI development
files.</li>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.6.4/refind_0.6.4-1_amd64.deb/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.5/refind_0.6.5-1_amd64.deb/download">A
binary Debian package</a></b>—If you use an <i>x</i>86-64 version
of Debian, Ubuntu, Mint, or another Debian-based distribution, you can
install from this package, which was converted from the binary RPM
<p class="sidebar"><b>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.</p>
<li><b><a
- href="http://sourceforge.net/projects/refind/files/0.6.4/refind-cd-0.6.4.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.5/refind-cd-0.6.5.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.6.4/refind-flashdrive-0.6.4.zip/download">A
+ href="http://sourceforge.net/projects/refind/files/0.6.5/refind-flashdrive-0.6.5.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
Tianocore toolkit, and so support booting BIOS/legacy boot loaders on
UEFI-based PCs.</li>
+<li><b>ALT Linux</b>—This RPM-based distribution is experimenting
+ with using rEFInd on EFI-based computers. As I write, the ALT
+ developers haven't yet nailed down booting from an optical disc (it's a
+ tricky and delicate task, especially when preparing a "hybrid" image),
+ but they're working on the problem. They have an RPM of rEFInd, but I
+ don't have a download link.</li>
+
<li><b><a href="http://distro.ibiblio.org/fatdog/web/">Fat
Dog</a></b>—This variant of Puppy Linux uses a combination of
rEFInd and GRUB 2 to boot its installation medium in EFI mode and
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<h2>Installing rEFInd Using an RPM or Debian Package File</h2>
</a>
-<p>Beginning with version 0.6.2, I've included an RPM package file for rEFInd, and I quickly updated this (in 0.6.2-2) to be more sophisticated and to include a Debian package file, as well. 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. 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.6.2-2.x86_64.rpm</tt></pre>
+<pre class="listing"># <tt class="userinput">rpm -Uvh refind-0.6.5-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.6.2-2_amd64.deb</tt></pre>
+<pre class="listing"># <tt class="userinput">dpkg -i refind_0.6.5-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>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/19/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<p class="subhead">by Roderick W. Smith, <a
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
-<p>Last Web page update: 1/8/2013</p>
+<p>Last Web page update: 1/16/2013</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<ul>
+<li><b>0.6.5 (1/16/2013)</b>—Most of this version's changes relate to icon, graphics, and theming features. The biggest code change is in support for PNG files for banners, icons, and selection backgrounds. I've also fixed bugs that prevented large banners from being used; you can now use banners as big as the screen (or bigger, but they'll be cropped), as illustrated on the <a href="themes.html">Theming rEFInd</a> page. The text color also now automatically switches between black and white depending on the background over which it's displayed. If you don't use these features, you're likely to notice some changes in where certain elements are displayed. Most obviously, the banner appears higher on the screen than it did previously, so as to minimize the chance of overlap with text displays such as the information screen. These text displays should appear correctly even on tiny 640x480 displays (they were blank on such small displays in the past). I've added icons for <a href="https://www.haiku-os.org/">Haiku</a> and <a href="http://www.altlinux.com/">ALT Linux.</a> Finally, the only non-graphics development is the addition of a "safe mode" boot option for OS X, which you can disable by adding <tt>safemode</tt> to the <tt>hideui</tt> option in <tt>refind.conf</tt>.</li>
+
<li><b>0.6.4 (1/8/2013)</b>—Bug fixes motivate this release; it corrects a couple of memory management bugs in 0.6.3 that cause rEFInd to hang at startup on some computers (unfortunately not on any of mine, so I missed this). I've also made a small change to the <tt>install.sh</tt> script so that it installs the ext2fs driver rather than the ext4fs driver if the script detects that a Linux kernel is on an ext2fs or ext3fs partition. This can keep rEFInd from scanning ext4fs partitions and picking up non-functional symbolic links to vmlinuz on such partitions.</li>
<li><b>0.6.3 (1/6/2013)</b>—The installation script and related tools see the biggest changes in this version of the program. The <tt>install.sh</tt> script can now detect a rEFInd installation in <tt>EFI/BOOT</tt> or <tt>EFI/Microsoft/Boot</tt> and update it rather than install to the default location of <tt>EFI/refind</tt>. It will also install to one of these fallback locations if it's run in BIOS mode, thus helping users who want to get a BIOS-mode install of Linux running on an EFI-based computer. A new <tt>mvrefind.sh</tt> script can move the installation between these three locations (or more exotic locations). Outside of scripts, the <tt>dont_scan_dirs</tt> and <tt>also_scan_dirs</tt> tokens can now accept volume specifications, as in <tt>myvol:EFI/bogus</tt> to not scan (or scan) the <tt>EFI/bogus</tt> directory on the <tt>myvol</tt> volume. I've also fixed a bug that caused rEFInd to ignore default boot loaders on removable disks if rEFInd was installed using the fallback filename. I've also modified the ISO-9660 driver so that it works with ISO-9660 images written to non-optical media. This may help with getting "hybrid ISO" images written to USB flash drives to boot.</li>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 11/13/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<p>Through 2012, it became obvious that Secure Boot would be a feature that was controlled, to a large extent, by Microsoft. This is because Microsoft requires that non-server computers that display Windows 8 logos ship with Secure Boot enabled. As a practical matter, this also means that such computers ship with Microsoft's keys in their firmware. In the absence of an industry-standard body to manage the signing of Secure Boot keys, this means that Microsoft's key is the only one that's more-or-less guaranteed to be installed on the computer, thus blocking the ability to boot any OS that lacks a boot path through Microsoft's signing key.</p>
-<p>Fortunately, Microsoft will sign third-party binaries with their key—or more precisely, with a key that Microsoft uses to sign third-party binaries. (Microsoft uses another key to sign its own binaries, and some devices, such as the Microsoft Surface tablet, lack the third-party Microsoft key.) A payment of $99 to Verisign enables a software distributor to sign as many binaries as desired. Red Hat (Fedora), Novell (SUSE), and Canonical (Ubuntu) have all announced plans to take advantage of this system. Unfortunately, using a third-party signing service is an awkward solution for open source software. In fact, for this very reason Red Hat has developed a program that it calls <i>shim</i> that essentially shifts the Secure Boot "train" from Microsoft's proprietary "track" to one that's more friendly to open source authors. Shim is signed by Microsoft and redirects the boot process to another boot loader that can be signed with keys that the distribution maintains and that are built into shim. Fedora 18 is expected to use this system. SUSE has announced that it will use the same system, as does Ubuntu with version 12.10 and later. SUSE has contributed to the shim approach by providing expansions to shim that support a set of keys that users can maintain themselves. These keys are known as Machine Owner Keys (MOKs), and managing them is described later, in <a href="#mok">Managing MOKs.</a> To reiterate, then, there are potentially three ways to sign a binary that will get it launched on a computer that uses shim:</p>
+<p>Fortunately, Microsoft will sign third-party binaries with their key—or more precisely, with a key that Microsoft uses to sign third-party binaries. (Microsoft uses another key to sign its own binaries, and some devices, such as the Microsoft Surface tablet, lack the third-party Microsoft key.) A payment of $99 to Verisign enables a software distributor to sign as many binaries as desired. Red Hat (Fedora), Novell (SUSE), and Canonical (Ubuntu) have all announced plans to take advantage of this system. Unfortunately, using a third-party signing service is an awkward solution for open source software. In fact, for this very reason Red Hat has developed a program that it calls <i>shim</i> that essentially shifts the Secure Boot "train" from Microsoft's proprietary "track" to one that's more friendly to open source authors. Shim is signed by Microsoft and redirects the boot process to another boot loader that can be signed with keys that the distribution maintains and that are built into shim. Fedora 18 also uses this system. SUSE has announced that it will use the same system, as does Ubuntu with version 12.10 and later. SUSE has contributed to the shim approach by providing expansions to shim that support a set of keys that users can maintain themselves. These keys are known as Machine Owner Keys (MOKs), and managing them is described later, in <a href="#mok">Managing MOKs.</a> To reiterate, then, there are potentially three ways to sign a binary that will get it launched on a computer that uses shim:</p>
<ul>
href="http://www.codon.org.uk/~mjg59/shim-signed/">Matthew J. Garrett's
download site</a> or from your distribution. (Don't use Ubuntu 12.10's
version, though; as noted earlier, it's inadequate for use with
- rEFInd.) The most recent beta versions of Fedora 18 reportedly ship
- with a signed shim, but I've not yet tested them.</li>
+ rEFInd.) Fedora 18 ships with a signed shim, but I've not yet tested
+ it.</li>
<p class="sidebar"><b>Tip:</b> If you're running Linux, you can save some effort by using the <tt>install.sh</tt> script with its <tt>--shim <tt class="variable">/path/to/shim.efi</tt></tt> option rather than installing manually, as in steps 4–6 of this procedure. If you've installed <tt>openssl</tt> and <tt>sbsign</tt>, using <tt>--localkeys</tt> will generate local signing keys and re-sign the rEFInd binaries with your own key, too. You can then use <tt>sbsign</tt> and the keys in <tt>/etc/refind.d/keys</tt> to sign your kernels or boot loaders.</p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 4/19/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
<h2>Theming Basics</h2>
-<p>As described on various other pages of this document, rEFInd relies on icon files located in its <tt>icons</tt> subdirectory, and occasionally elsewhere, to define its overall appearance. You can adjust rEFInd's theme in a few ways:</p>
+<p>As described on various other pages of this document, rEFInd relies on icon files located in its <tt>icons</tt> subdirectory, and occasionally elsewhere, to define its overall appearance. It also uses a built-in banner and two selection images, which you may replace by using the <tt>banner</tt>, <tt>selection_big</tt>, and <tt>selection_small</tt> tokens in <tt>refind.conf</tt>. You can adjust rEFInd's theme in a few ways:</p>
<ul>
<li>You can adjust the selection background (used to highlight a selected icon) by creating new icons in PNG or in Microsoft's <a href="http://en.wikipedia.org/wiki/BMP_file_format">BMP format</a>. You should create both 144x144 and 64x64 images and tell rEFInd about them by using the <tt>selection_big</tt> and <tt>selection_small</tt> tokens, respectively, in <tt>refind.conf</tt>. If you omit the large icon, rEFInd will stretch the small icon to fit the larger space; if you omit the small icon, rEFInd will use the default small icon. Because BMP doesn't support transparency (alpha channels), you must use the PNG format if you want your selection background to show the underlying image beneath it. (You can create the illusion of transparency on a solid background by matching the colors, though.)</li>
-<li>You can create a new background image and logo by placing a PNG or BMP file in rEFInd's main directory and passing its filename to rEFInd with the <tt>banner</tt> option in <tt>refind.conf</tt>. If the image is smaller than the screen, the color in the top-left corner of the image will be used for the rest of the display.</li>
+<li>You can create a new background image and logo by placing a PNG or BMP file in rEFInd's main directory and passing its filename to rEFInd with the <tt>banner</tt> option in <tt>refind.conf</tt>. If the image is smaller than the screen, the color in the top-left corner of the image will be used for the rest of the display. This pixel's color is also used as the background color for submenu text. Using a full-screen background image can produce a dramatically different "look" for rEFInd:</li>
</ul>
+ <br /><center><img src="refind-background.png" align="center"
+ width="750" height="472" alt="rEFInd provides extensive theming
+ options." border=2> </center><br />
+
+<p>Note that in this example, the text immediately below the icons is white, whereas the hint text at the bottom of the screen is black. The text color is determined by the brightness of the background; rEFInd uses black text against light backgrounds and light text against dark backgrounds. This adjustment is done on a line-by-line basis, so it copes better with horizontal lines than with vertical lines.</p>
+
<p>Of course, not all of these elements are likely to be included in themes. A minimal rEFInd theme would provide just a new icons subdirectory, to be set via <tt>icons_dir</tt>. A more thorough theme would include a changed background image or selection backgrounds.</p>
<p><b>Note:</b> If you'd like to design a logo for rEFInd, please do so! I lack the sort of artistic talent required for creating logos, so I just used plain text. I'd like to have something more eye-catching, though. I don't promise to use the first logo I'm given, but if you have some ideas, or would like to discuss some ideas, feel free to <a href="mailto:rodsmith@rodsbooks.com">e-mail me.</a></p>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</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>
like to add detection for Itanium and ARM systems, but I have no
way to test such changes.</li>
- <li>The code could be more flexible in its handling of the sizes of
- various graphical elements, and particularly drawn text. Prior to
- version 0.2.2, submenu text was invisible on UEFI-based PCs with
- 800x600 and smaller displays because of an inability to properly
- crop the graphics fields that hold the text. With version 0.2.2,
- I've put a band-aid on this problem by reducing the field size so
- that it now works on 800x600 displays, but smaller displays still
- suffer from this problem. This is just an example of the
- inflexibility of certain layout issues within rEFInd.</li>
-
<li>Although the ICNS file format used by rEFInd supports multiple
image sizes, if a size that rEFInd needs isn't present in the file,
rEFInd can't use the icon. The ability to scale images to the
substitutes the size, so you get displays like <tt>boot
EFI\foo\bar.efi from 90 GiB volume</tt>. I'd like to add more
checks to substitute the GPT <i>partition</i> label if the
- <i>filesystem</i> label comes up empty, or add a filesystem type
- identifier to the size.</li>
-
- <li>The default_selection option in refind.conf could be improved by
- supporting a list of default options, so that if the first item
- isn't found, rEFInd will try to boot the second one in the list,
- and so on. This could be handy in case a driver fails to load, or
- to provide an override in case the user inserts a specific
+ <i>filesystem</i> label comes up empty.</li>
+
+ <li>The <tt>default_selection</tt> option in <tt>refind.conf</tt> could
+ be improved by supporting a list of default options, so that if the
+ first item isn't found, rEFInd will try to boot the second one in
+ the list, and so on. This could be handy in case a driver fails to
+ load, or to provide an override in case the user inserts a specific
removable disk—by placing the removable disk's name first in
the list, it will take precedence over the normal hard disk
default.</li>
href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com</a></p>
<p>Originally written: 3/14/2012; last Web page update:
-1/8/2013, referencing rEFInd 0.6.4</p>
+1/16/2013, referencing rEFInd 0.6.5</p>
<p>I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!</p>
/** Helper macro for stringification. */
#define FSW_EFI_STRINGIFY(x) #x
/** Expands to the EFI driver name given the file system type name. */
-#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.4 " FSW_EFI_STRINGIFY(t) L" File System Driver"
+#define FSW_EFI_DRIVER_NAME(t) L"rEFInd 0.6.5 " FSW_EFI_STRINGIFY(t) L" File System Driver"
// function prototypes
you would use to add a key to the MOK list maintained by MokManager and
used by shim.
-The files in this directory are:
+The files in this directory are, in alphabetical order:
+
+- altlinux.cer -- The public key for ALT Linux (http://www.altlinux.com).
- canonical-uefi-ca.der -- Canonical's public key, used to sign Ubuntu
boot loaders and kernels.
// Loading images from files and embedded data
//
-static CHAR16 * egFindExtension(IN CHAR16 *FileName)
-{
- UINTN i;
-
- for (i = StrLen(FileName); i >= 0; i--) {
- if (FileName[i] == '.')
- return FileName + i + 1;
- if (FileName[i] == '/' || FileName[i] == '\\')
- break;
- }
- return FileName + StrLen(FileName);
-}
-
-// Decode the specified data as the specified format. The IconSize parameter is
-// relevant only for ICNS, for which it selects which ICNS sub-image is decoded.
+// static CHAR16 * egFindExtension(IN CHAR16 *FileName)
+// {
+// UINTN i;
+//
+// for (i = StrLen(FileName); i >= 0; i--) {
+// if (FileName[i] == '.')
+// return FileName + i + 1;
+// if (FileName[i] == '/' || FileName[i] == '\\')
+// break;
+// }
+// return FileName + StrLen(FileName);
+// }
+
+// Decode the specified image data. The IconSize parameter is relevant only
+// for ICNS, for which it selects which ICNS sub-image is decoded.
// Returns a pointer to the resulting EG_IMAGE or NULL if decoding failed.
-static EG_IMAGE * egDecodeAny(IN UINT8 *FileData, IN UINTN FileDataLength,
- IN CHAR16 *Format, IN UINTN IconSize, IN BOOLEAN WantAlpha)
+static EG_IMAGE * egDecodeAny(IN UINT8 *FileData, IN UINTN FileDataLength, IN UINTN IconSize, IN BOOLEAN WantAlpha)
{
EG_IMAGE *NewImage = NULL;
- // Note: The UEFI implementation in Gigabyte's Hybrid EFI is buggy and does
- // a case-sensitive comparison in StriCmp rather than the case-insensitive
- // comparison that the spec says should be done. As a workaround, we repeat
- // the comparison twice here.
- // dispatch by extension
- if ((StriCmp(Format, L"BMP") == 0) || (StriCmp(Format, L"bmp") == 0)) {
- NewImage = egDecodeBMP(FileData, FileDataLength, IconSize, WantAlpha);
- } else if ((StriCmp(Format, L"ICNS") == 0) || (StriCmp(Format, L"icns") == 0)) {
- NewImage = egDecodeICNS(FileData, FileDataLength, IconSize, WantAlpha);
- } else if ((StriCmp(Format, L"PNG") == 0) || (StriCmp(Format, L"png") == 0)) {
+ NewImage = egDecodeICNS(FileData, FileDataLength, IconSize, WantAlpha);
+ if (NewImage == NULL)
NewImage = egDecodePNG(FileData, FileDataLength, IconSize, WantAlpha);
- } // if/else
+ if (NewImage == NULL)
+ NewImage = egDecodeBMP(FileData, FileDataLength, IconSize, WantAlpha);
return NewImage;
}
return NULL;
// decode it
- NewImage = egDecodeAny(FileData, FileDataLength, egFindExtension(FileName), 128, WantAlpha);
+ NewImage = egDecodeAny(FileData, FileDataLength, 128, WantAlpha);
FreePool(FileData);
return NewImage;
}
// decode it
- NewImage = egDecodeAny(FileData, FileDataLength, egFindExtension(Path), IconSize, TRUE);
+ NewImage = egDecodeAny(FileData, FileDataLength, IconSize, TRUE);
FreePool(FileData);
if ((NewImage->Width != IconSize) || (NewImage->Height != IconSize)) {
Print(L"Warning: Attempt to load icon of the wrong size from '%s'\n", Path);
return NewImage;
} // EG_IMAGE *egLoadIcon()
-EG_IMAGE * egDecodeImage(IN UINT8 *FileData, IN UINTN FileDataLength, IN CHAR16 *Format, IN BOOLEAN WantAlpha)
-{
- return egDecodeAny(FileData, FileDataLength, Format, 128, WantAlpha);
-}
-
EG_IMAGE * egPrepareEmbeddedImage(IN EG_EMBEDDED_IMAGE *EmbeddedImage, IN BOOLEAN WantAlpha)
{
EG_IMAGE *NewImage;
// compose
if (CompWidth > 0) {
-// if (CompImage->HasAlpha) {
-// CompImage->HasAlpha = FALSE;
-// egSetPlane(PLPTR(CompImage, a), 0, CompImage->Width * CompImage->Height);
-// }
-
if (TopImage->HasAlpha) {
egRawCompose(CompImage->PixelData + PosY * CompImage->Width + PosX, TopImage->PixelData,
CompWidth, CompHeight, CompImage->Width, TopImage->Width);
CompWidth, CompHeight, CompImage->Width, TopImage->Width);
}
}
-}
+} /* VOID egComposeImage() */
EG_IMAGE * egEnsureImageSize(IN EG_IMAGE *Image, IN UINTN Width, IN UINTN Height, IN EG_PIXEL *Color)
{
egFreeImage(Image);
return NULL;
}
+ Image->HasAlpha = FALSE;
egComposeImage(NewImage, Image, 0, 0);
egFreeImage(Image);
EG_IMAGE * egLoadImage(IN EFI_FILE* BaseDir, IN CHAR16 *FileName, IN BOOLEAN WantAlpha);
EG_IMAGE * egLoadIcon(IN EFI_FILE* BaseDir, IN CHAR16 *FileName, IN UINTN IconSize);
-EG_IMAGE * egDecodeImage(IN UINT8 *FileData, IN UINTN FileDataLength, IN CHAR16 *Format, IN BOOLEAN WantAlpha);
EG_IMAGE * egPrepareEmbeddedImage(IN EG_EMBEDDED_IMAGE *EmbeddedImage, IN BOOLEAN WantAlpha);
EG_IMAGE * egEnsureImageSize(IN EG_IMAGE *Image, IN UINTN Width, IN UINTN Height, IN EG_PIXEL *Color);
UINT8 ImageValue = 0, AlphaValue;
EG_PIXEL *PixelPtr;
UINTN Index, BitIndex;
-
+
// read and check header
if (FileDataLength < sizeof(BMP_IMAGE_HEADER) || FileData == NULL)
return NULL;
if (BmpHeader->BitPerPixel != 1 && BmpHeader->BitPerPixel != 4 &&
BmpHeader->BitPerPixel != 8 && BmpHeader->BitPerPixel != 24)
return NULL;
-
+
// calculate parameters
ImageLineOffset = BmpHeader->PixelWidth;
if (BmpHeader->BitPerPixel == 24)
// check bounds
if (BmpHeader->ImageOffset + ImageLineOffset * BmpHeader->PixelHeight > FileDataLength)
return NULL;
-
+
// allocate image structure and buffer
NewImage = egCreateImage(BmpHeader->PixelWidth, BmpHeader->PixelHeight, WantAlpha);
if (NewImage == NULL)
return NULL;
AlphaValue = WantAlpha ? 255 : 0;
-
+
// convert image
BmpColorMap = (BMP_COLOR_MAP *)(FileData + sizeof(BMP_IMAGE_HEADER));
ImagePtrBase = FileData + BmpHeader->ImageOffset;
name, so that you can easily change them to others related to your platform in
this one location if needed. Everything else in the code calls these.*/
+// EFI's equivalent of realloc requires the original buffer's size as an
+// input parameter, which the standard libc realloc does not require. Thus,
+// I've modified mymalloc() to allocate more memory to store this data,
+// and myrealloc() can then read it when required. Because the size is
+// stored at the start of the allocated area, these functions are NOT
+// interchangeable with the standard EFI functions; memory allocated via
+// mymalloc() should be freed via myfree(), and myfree() should NOT be
+// used with memory allocated via AllocatePool() or AllocateZeroPool()!
+
static void *mymalloc(size_t size) {
void *ptr;
-// size += sizeof (size_t);
ptr = AllocateZeroPool(size + sizeof(size_t));
if (ptr) {
*(size_t *) ptr = size;
(ScreenPosX > egScreenWidth) || (ScreenPosY > egScreenHeight))
return;
-// if (Image->HasAlpha) {
-// Image->HasAlpha = FALSE;
-// egSetPlane(PLPTR(Image, a), 0, Image->Width * Image->Height);
-// }
-
if ((GlobalConfig.ScreenBackground == NULL) || ((Image->Width == egScreenWidth) && (Image->Height == egScreenHeight))) {
CompImage = Image;
} else if (GlobalConfig.ScreenBackground == Image) {
if (AreaWidth == 0)
return;
-// if (Image->HasAlpha) {
-// Image->HasAlpha = FALSE;
-// egSetPlane(PLPTR(Image, a), 0, Image->Width * Image->Height);
-// }
-
if (GraphicsOutput != NULL) {
refit_call10_wrapper(GraphicsOutput->Blt, GraphicsOutput, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)Image->PixelData,
EfiBltBufferToVideo, AreaPosX, AreaPosY, ScreenPosX, ScreenPosY, AreaWidth, AreaHeight,
WhiteFontImage->PixelData[i].r = 255 - WhiteFontImage->PixelData[i].r;
WhiteFontImage->PixelData[i].g = 255 - WhiteFontImage->PixelData[i].g;
WhiteFontImage->PixelData[i].b = 255 - WhiteFontImage->PixelData[i].b;
-// WhiteFontImage->PixelData[i].a = 255 - WhiteFontImage->PixelData[i].a;
} // for
} // if
FontImage = WhiteFontImage;
FontImage = BlackFontImage;
} // if/else
-// // load the font
-// if (FontImage == NULL) {
-// FontImage = egPrepareEmbeddedImage(&egemb_font, TRUE);
-// } // if font not yet loaded.
-
// render it
BufferPtr = CompImage->PixelData;
BufferLineOffset = CompImage->Width;
# disk's label in various OSes' file browsers.
# The default is an empty list (all volumes are scanned).
#
-#dont_scan_volumes
+#dont_scan_volumes "Recovery HD"
# Directories that should NOT be scanned for boot loaders. By default,
# rEFInd doesn't scan its own directory or the EFI/tools directory.
# all files in scanned directories with names that begin with "vmlinuz"
# or "bzImage" to be included as loaders, even if they lack ".efi"
# extensions. The drawback to this option is that it can pick up kernels
-# that lack EFI stub loader support and other files. Most notably, if you
-# want to give a kernel a custom icon by placing an icon with the kernel's
-# filename but a ".icns" extension in the same directory as the kernel, this
-# option will cause the icon file to show up as a non-functional loader tag.
-# Passing this option a "0" value causes kernels without ".efi" extensions
-# to NOT be scanned; passing it alone or with any other value causes all
-# kernels to be scanned.
+# that lack EFI stub loader support and other files. Passing this option
+# a "0" value causes kernels without ".efi" extensions to NOT be scanned;
+# passing it alone or with any other value causes all kernels to be scanned.
# Default is to NOT scan for kernels without ".efi" extensions.
#
scan_all_linux_kernels
Summary: EFI boot manager software
Name: refind
-Version: 0.6.4.7
+Version: 0.6.5
Release: 1%{?dist}
+Summary: EFI boot manager software
License: GPLv3
URL: http://www.rodsbooks.com/refind/
Group: System Environment/Base
# wiping out the just-updated files.
%changelog
-* Sun Jan 6 2013 R Smith <rodsmith@rodsbooks.com> - 0.6.3-2
-- Fixed accidental inclusion of "env" as part of installation script
-* Sun Jan 6 2013 R Smith <rodsmith@rodsbooks.com> - 0.6.3
-- Created spec file for 0.6.3 release
+* Wed Jan 16 2013 R Smith <rodsmith@rodsbooks.com> - 0.6.5
+- Created spec file for 0.6.5 release
if (AboutMenu.EntryCount == 0) {
AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
- AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.4.7");
+ AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.6.5");
AddMenuInfoLine(&AboutMenu, L"");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012 Roderick W. Smith");
}
if (SelectionImages[1] == NULL)
SelectionImages[1] = egPrepareEmbeddedImage(&egemb_back_selected_small, TRUE);
- SelectionImages[1] = egEnsureImageSize(SelectionImages[1],
- ROW1_TILESIZE, ROW1_TILESIZE, &MenuBackgroundPixel);
+ SelectionImages[1] = egEnsureImageSize(SelectionImages[1], ROW1_TILESIZE, ROW1_TILESIZE, &MenuBackgroundPixel);
if (SelectionImages[1] == NULL)
return;
// load big selection image
if (GlobalConfig.SelectionBigFileName != NULL) {
SelectionImages[0] = egLoadImage(SelfDir, GlobalConfig.SelectionBigFileName, TRUE);
- SelectionImages[0] = egEnsureImageSize(SelectionImages[0],
- ROW0_TILESIZE, ROW0_TILESIZE, &MenuBackgroundPixel);
+ SelectionImages[0] = egEnsureImageSize(SelectionImages[0], ROW0_TILESIZE, ROW0_TILESIZE, &MenuBackgroundPixel);
}
if (SelectionImages[0] == NULL) {
// calculate big selection image from small one
// graphical generic style
//
-
+//
// Display a submenu
+//
+
+// Display text with a solid background (MenuBackgroundPixel or SelectionBackgroundPixel)
static VOID DrawText(IN CHAR16 *Text, IN BOOLEAN Selected, IN UINTN FieldWidth, IN UINTN XPos, IN UINTN YPos)
{
EG_IMAGE *TextBuffer;
// Finds the average brightness of the input Image.
// NOTE: Passing an Image that covers the whole screen can strain the
// capacity of a UINTN on a 32-bit system with a very large display.
-// As the intended use for this function is to handle a single text
-// string's background, this shouldn't be a problem, but it may need
-// addressing if it's applied more broadly....
+// Using UINT64 instead is unworkable, since the code won't compile
+// on a 32-bit system. As the intended use for this function is to handle
+// a single text string's background, this shouldn't be a problem, but it
+// may need addressing if it's applied more broadly....
static UINT8 AverageBrightness(EG_IMAGE *Image) {
UINTN i;
UINTN Sum = 0;
return (UINT8) (Sum / (Image->Width * Image->Height * 3));
} // UINT8 AverageBrightness()
+// Display text against the screen's background image
static VOID DrawTextWithTransparency(IN CHAR16 *Text, IN UINTN XPos, IN UINTN YPos)
{
UINTN TextWidth, TextPosX;
// Compute the size & position of the window that will hold a subscreen's information.
static VOID ComputeSubScreenWindowSize(REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN *XPos, UINTN *YPos, UINTN *Width, UINTN *Height, UINTN *LineWidth) {
- UINTN i, ItemWidth, HintTop, BannerBottomEdge, TitleWidth, CenteredTop;
+ UINTN i, ItemWidth, HintTop, BannerBottomEdge, TitleWidth;
- *Width = 1;
+ *Width = 20;
*Height = 5;
TitleWidth = StrLen(Screen->Title);
if ((Screen->TitleImage) && (TitleWidth > (Screen->TitleImage->Width / FONT_CELL_WIDTH))) {
*Width = TEXT_XMARGIN * 2 + *Width * FONT_CELL_WIDTH;
*LineWidth = *Width;
if (Screen->TitleImage)
- *Width += (Screen->TitleImage->Width + TITLEICON_SPACING + FONT_CELL_WIDTH);
+ *Width += (Screen->TitleImage->Width + TITLEICON_SPACING * 2 + FONT_CELL_WIDTH);
else
*Width += FONT_CELL_WIDTH;
HintTop = UGAHeight - (FONT_CELL_HEIGHT * 3); // top of hint text
*Height *= TEXT_LINE_HEIGHT;
- if (Screen->TitleImage && (*Height < (Screen->TitleImage->Height + TEXT_LINE_HEIGHT * 3)))
- *Height = Screen->TitleImage->Height + TEXT_LINE_HEIGHT * 3;
+ if (Screen->TitleImage && (*Height < (Screen->TitleImage->Height + TEXT_LINE_HEIGHT * 4)))
+ *Height = Screen->TitleImage->Height + TEXT_LINE_HEIGHT * 4;
if (GlobalConfig.BannerBottomEdge >= HintTop) { // probably a full-screen image; treat it as an empty banner
BannerBottomEdge = 0;
} else {
BannerBottomEdge = GlobalConfig.BannerBottomEdge;
}
- if (*Height > (HintTop -BannerBottomEdge - FONT_CELL_HEIGHT * 2)) {
+ if (*Height > (HintTop - BannerBottomEdge - FONT_CELL_HEIGHT * 2)) {
BannerBottomEdge = 0;
}
- if (*Height > (HintTop -BannerBottomEdge - FONT_CELL_HEIGHT * 2)) {
+ if (*Height > (HintTop - BannerBottomEdge - FONT_CELL_HEIGHT * 2)) {
// TODO: Implement scrolling in text screen.
*Height = (HintTop - BannerBottomEdge - FONT_CELL_HEIGHT * 2);
}
- *YPos = BannerBottomEdge + FONT_CELL_HEIGHT + (HintTop - BannerBottomEdge - *Height) / 2;
- // Above often produces a text field that feels bottom-weighted, so adjust
- // upward a bit, if possible....
- CenteredTop = ((UGAHeight - *Height) / 2);
- if ((*YPos > CenteredTop) && (CenteredTop > BannerBottomEdge))
- *YPos = CenteredTop;
+
+ *YPos = ((UGAHeight - *Height) / 2);
+ if (*YPos < BannerBottomEdge)
+ *YPos = BannerBottomEdge + FONT_CELL_HEIGHT + (HintTop - BannerBottomEdge - *Height) / 2;
} // VOID ComputeSubScreenWindowSize()
// Displays sub-menus
DrawText(Screen->Title, FALSE, (StrLen(Screen->Title) + 2) * FONT_CELL_WIDTH,
EntriesPosX + (MenuWidth - ItemWidth) / 2, EntriesPosY += TEXT_LINE_HEIGHT);
if (Screen->TitleImage) {
- BltImageAlpha(Screen->TitleImage, EntriesPosX, EntriesPosY + TEXT_LINE_HEIGHT * 2, BackgroundPixel);
- EntriesPosX += (Screen->TitleImage->Width + TITLEICON_SPACING);
+ BltImageAlpha(Screen->TitleImage, EntriesPosX + TITLEICON_SPACING, EntriesPosY + TEXT_LINE_HEIGHT * 2,
+ BackgroundPixel);
+ EntriesPosX += (Screen->TitleImage->Width + TITLEICON_SPACING * 2);
}
EntriesPosY += (TEXT_LINE_HEIGHT * 2);
if (Screen->InfoLineCount > 0) {
} // static VOID PaintIcon()
inline UINTN ComputeRow0PosX(VOID) {
-// return ((UGAHeight / 2) - (5 * ROW0_TILESIZE / 6));
return ((UGAHeight / 2) - ROW0_TILESIZE / 2);
} // UINTN ComputeRow0PosX()